Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not install the runtime DFU on MHP30 #15

Open
doegox opened this issue Mar 20, 2023 · 8 comments
Open

Could not install the runtime DFU on MHP30 #15

doegox opened this issue Mar 20, 2023 · 8 comments

Comments

@doegox
Copy link

doegox commented Mar 20, 2023

Hello,

I successfully installed your DFU bootloader on 3 TS100, then I bricked my TS80P 😅 (flash was locked, now fixed with a st-link) but I've an issue with the MHP30: original bootloader (2.2B) refuses to install the RUNTIME.HEX, it always returns RUNTIME.NOT (and RUNTIME.ERR if I try directly again). Tested on a Windows.
While flashing the latest MHP30_EN.HEX works fine...

Any idea ?

Edit: I just saw that the same issue was mentioned in this comment

@doegox
Copy link
Author

doegox commented Mar 21, 2023

I investigated a bit with the st-link.
I did a backup of the bootloader (32k as mentioned in https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/BackUp.md):
st-flash read iron_os-dfu/backups/MHP30_v2.2B/backup.bin 0x8000000 32k
MD5:
f4519531b28a1884f01bb7ca033e0767 backup.bin

Then I flashed the new bootloader
st-flash --format ihex write iron_os-dfu/releases/0.2/MHP30/bootloader.hex

Since then, when I enter DFU, the screen remains black but the device is visible on USB.
I test it, flashing again the main fw:
dfu-util -D iron_os/releases/v2.20/MHP30_EN.dfu

The MHP30 is working fine, the screen too, except that when I enter DFU the screen remains black.

@doegox
Copy link
Author

doegox commented Mar 21, 2023

Testing install of runtime.dfu from the new bootloader:

dfu-util -D iron_os-dfu/releases/0.2/MHP30/runtime.dfu
Parsing element 1, address = 0x08004000, size = 5244
dfu-util: Last page at 0x0800547b is not writeable

MHP30 runtime image is to be written at 0x4000, shouldn't it be at 0x8000 ?

While at it, there is something I don't understand : it's a STM32F103T8, 64kb, bootloader is between 0x0000 and 0x8000 then firmware should be between 0x8000 and 0x10000 but MHP30_EN releases are > 32k, how that fits ?
When I do a full image with the st-link I indeed see a match for the first 32+32k but then I don't see the end of the main firmware in my dump...

@damex
Copy link

damex commented Jul 27, 2023

I investigated a bit with the st-link.

could you please describe the process of getting st-link/swd working with mhp30? i have found few unmarked spots on base board but that's pretty much it. did you solder directly to 'stm32' legs? is there other way around?

@doegox
Copy link
Author

doegox commented Jul 27, 2023

SWD is exposed on USB, cf Ralim/IronOS#822 (comment)

@damex
Copy link

damex commented Jul 27, 2023

SWD is exposed on USB, cf Ralim/IronOS#822 (comment)

do i butcher usb cable for that and expose pins so it could be connected to stlink or there is other way to do so?

@doegox
Copy link
Author

doegox commented Jul 27, 2023

yes it's probably the easiest and fastest way if you don't have USB breakout boards. (google "usb breakout")

@damex
Copy link

damex commented Aug 4, 2023

I investigated a bit with the st-link. I did a backup of the bootloader (32k as mentioned in https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/BackUp.md): st-flash read iron_os-dfu/backups/MHP30_v2.2B/backup.bin 0x8000000 32k MD5: f4519531b28a1884f01bb7ca033e0767 backup.bin

Then I flashed the new bootloader st-flash --format ihex write iron_os-dfu/releases/0.2/MHP30/bootloader.hex

Since then, when I enter DFU, the screen remains black but the device is visible on USB. I test it, flashing again the main fw: dfu-util -D iron_os/releases/v2.20/MHP30_EN.dfu

The MHP30 is working fine, the screen too, except that when I enter DFU the screen remains black.

i can confirm that mhp30 works well with 0.2 ironos-dfu and last trunk version of ironos-dfu.
both time screen remains blank when you go to dfu mode.

i made breakout board without destroying cable. desoldered type-c port from donor board, soldered type-c port to weactstudio 'prototype pcb' and connected 5v, gnd, d+ (dio), d- (clk) to weactstudio stlink

ElementW added a commit to ElementW/IronOS-dfu that referenced this issue Aug 10, 2023
@corndog2000
Copy link

corndog2000 commented Nov 12, 2024

Bump, I cannot install runtime.hex on the MHP30. Every time I copy the file to the hotplate it returns as RUMTIME.ERR.

image

I'm using the latest build of IronOS-dfu. The hotplate says DFU:2.3B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants