Closed stefanofante closed 3 years ago
STM32F103C8T6 is 64 KB flash size, not 128KB. Sorry for the typo. Therefore, the user code only allows ~48KB only.
By default, it supports 32bit extended linear record. uint32_t address = TRANSFORM_ADDR(address_hi, address_lo); // if extended linear address: ( (((uint32_t)(addr_hi)) << 16) | ((uint32_t)(addr_lo)) )
I ported the code to STM32F103Z and I faced this problem :-) To solve the problem I add a piece of code to the pc code in order to manage flash code greater than 64K.
Hi, I also encountered this problem and failed to fix the bug. Can anyone modify the code?
In btldr_config.h, please try to extend the flash size. Currently it is set to 64KB.
I tried this but unfortunately the problem has not been resolved yet
@sfyip and All, Hi, I use this repo code, generated 4 ICs MSD Bootloader, flash size should be not a problem, please check: YAB_STM32F103_F407_L433_F723
Hi,
I tried the ihex file (fill to 128KB). During parsing ihex EOF record type, soft reset is called immediately inside the USB interrupt handler which caused Windows reported the file is corrupt and stop at 67%. (Actually, the flash is already prog)
Please try the updated one.
Thanks :)
Hello, there is a bug for program size greater than 64K You need to add a extended linear record (code 04) if the address range exceeded 64K
something like that: extended_address = false; inside the loop: if (extended_address) { print "EXTENDED LINEAR RECORD" with args address >> 16 extended_address = false; }
write data records..... ..... increment address ..... if ((address & 0x0000FFFF) == 0) { extended_address = true; }