Closed shadow578 closed 3 months ago
I may be able to help, what is the process?
tbh, i'm not quite sure about the exact process myself....
for a start, you could do the following things:
0
to BFFF
, this should be the entire bootloader.txt
and .bin
files the utility creates (there might still be some issues with the dumping utility, so keeping the raw response could be useful)also, is there a way to communicate outside of github messages? i'm not quite sure about some of the licensing of the tools and documents i'd like to provide to you, and i'm not quite comfortable uploading them publicly
I believe everything I have is exactly as the picture is referring to.
I don't think there are 512k chips on any other board. I asked this question before and it seems all are 256k.
for my board does it matter if I already have another firmware than stock installed? or how should this be done now?
I don't think there are 512k chips on any other board. I asked this question before and it seems all are 256k.
would it be possible to check by opening the printer? for future steps, you'll also need access to the mainboard...
for my board does it matter if I already have another firmware than stock installed? or how should this be done now?
i don't quite understand what you mean by this, goal of this testing is to a) dump and b) re-flash a bootloader using external tools. The firmware you've installed does not affect the bootloader at all, so it does not matter. tho for the 2. part, you'll need to flash a modified version of marlin to allow dumping the bootloader.
ill be doing the flash dump thing soon, just had it all set up.
what I asked before was does it matter if the firmware is not originally stock? but i guess it doesnt matter.
so should the .bin binaries be a maximum of 208k?
because it seems to be an issue, if the .ini is defined with 208k the max file size for firmware.bin is 208k. and i think that these H32 cant have anything more because of that limit. for instance a nomal Aquila G32 has a 256K chip, however the max size for the .bin is 228K. it cant compile any larger, and I tested it cant flash with anything more than 228K.
so what I'm saying is these chips should actually be limited to 208K rather than 256K, granted they are 256K but as you say the bootloader takes room. so binaries shouldnt be anymore than the 208K threshold.
so should the .bin binaries be a maximum of 208k?
because it seems to be an issue, if the .ini is defined with 208k the max file size for firmware.bin is 208k. and i think that these H32 cant have anything more because of that limit. for instance a nomal Aquila G32 has a 256K chip, however the max size for the .bin is 228K. it cant compile any larger, and I tested it cant flash with anything more than 228K.
so what I'm saying is these chips should actually be limited to 208K rather than 256K, granted they are 256K but as you say the bootloader takes room. so binaries shouldnt be anymore than the 208K threshold.
yes, binaries must be below 212992 bytes in size, so about 208K. I'm currently looking into this in more detail, but it might take some time...
for now, i've created a issue https://github.com/shadow578/Marlin-H32/issues/40 to track this problem
solved by knowledge gained in currently ongoing https://github.com/shadow578/OpenHC32Boot rewrite.
TL;DR
ISP programming (e.g. for unbricking of a printer) can be done using a SWD debug probe (CMSIS-DAP via raspberry pi pico debug probe tested) and pyOCD. required changes have been implemented into the platformio packages and are currently beign tested
looking for a person that is willing to help in testing the unbricking procedure (ISP programming) of HC32-based printers.
to my information, programming the chip directly should be fairly straightforward. but i only have the one board in my only printer and i'd like to not risk breaking it...
please leave a comment under this issue if you're willing to help
update: i've since started development of a custom bootloader for HC32, which takes less space than the stock one. This could allow for larger Marlin builds to be used, unlocking the ability to use more & more advanced features. See shadow578/OpenHC32Boot for the bootloader repo.