STM32F103C8T6 load problem when code exceeding 64kB FLASH
Hello,
my MCU is STM32F103C8T6, which should have 64kB FLASH, but it has been confirmed multiple times, that in fact it has 128kB of FLASH memory (just like STM32F103CBT6). This was also confirmed by me by writing to various FLASH pages (exceeding 64kB) by using standard functions, like:
FLASH_ProgramHalfWord(0x801000, 0xDE); //writes to (START+64kB) addressFLASH_ProgramHalfWord(0x801002, 0xAD); FLASH_ProgramHalfWord(0x801F00, 0xDE); //writes to (START+124kB) addressFLASH_ProgramHalfWord(0x801F02, 0xAD); and then checking this data with STM32 ST-LINK utility.Having explained that first, I have following problem, which is best to explain using different situations:
-Main program code size is 10K & FLASH_START_ADDRESS in linker file is 0x8000000 - I can upload .hex file normally
FLASH (rx) : ORIGIN = 0x08000000
-Main program code size is 10K & FLASH_START_ADDRESS in linker file is 0x800FC00 (10k below 64kB) - I can upload .hex file normallyFLASH (rx) : ORIGIN = 0x0800F800
-Main program code size is 10K & FLASH_START_ADDRESS in linker file is 0x8010000 (right at 64kB) - I can not upload file. I get 'load failed' error,
FLASH (rx) : ORIGIN =
0x8010000
-Main program code size is 10K & FLASH_START_ADDRESS in linker file is 0x801FC00 (10k below 128kB) - I can not upload file. I get 'load failed' error,FLASH (rx) : ORIGIN =
0x801F
C
00
It seems like whenever my program reaches 0x8010000 address (64kB), then I can't upload my code into MCU via Atollic, nor via ST-Link Utility (uploading hex file).How can I solve this problem? Maybe there is some kind of a DEVICE signature check before uploading the code, and it won't upload 100kB code size into 64kB (even though this MCU has 128kB)? Thanks in advance!
#size #flash #load #stm32f103c8t6