Hello,I have bootloader at page 0,1,2,3 in STM32C051F8P6.uVision is configured to flash application from page 6.uVision erases first page when flashing.When I generate a hex file from uVision and uses STM32CubeProgrammer to flash then it does not erase the first page.
What I always need to do now in uVision is to flash application first then bootloader because flashing the application destroys the first page of the bootloader.How to prevent uVision erasing page 0 at 0x08000000 even though it is configured to flash from 0x08003000?
I updated the IROM1 setting in uVision Options > Target from 0x08000000 to 0x08003000. This successfully flashes the application from 0x08003000, but during flashing, page 0 still gets erased. However, pages 1, 2, and 3 remain intact. Additionally, the scatter file or the linker file is generated:; *************************************************************; *** Scatter-Loading Description File generated by uVision ***; *************************************************************LR_IROM1 0x08003000 0x00008000 { ; load region size_region ER_IROM1 0x08003000 0x00008000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) .ANY (+XO) } RW_IRAM1 0x20000000 0x00003000 { ; RW data .ANY (+RW +ZI) }}I tried modifying the address range under Programming Algorithm fromstart=0x08000000, size=0x00010000 tostart=0x08003000, size=0x0000D000But it still erases page 0.But I also get this when I change the address range under Programming Algorithm:No Algorithm found for: 08002000H - 0800202FHNo Algorithm found for: 08002800H - 0800282FHPartial Erase Done (areas with no algorithms skipped!)No Algorithm found for: 08002000H - 0800202FHNo Algorithm found for: 08002800H - 0800282FHPartial Programming Done (areas with no algorithms skipped!)Partial Verify OK (areas with no algorithms skipped!)Application running ...
0x08000000
0x08003000
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
LR_IROM1 0x08003000 0x00008000 { ; load region size_region
ER_IROM1 0x08003000 0x00008000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00003000 { ; RW data
.ANY (+RW +ZI)
start=0x08000000, size=0x00010000 tostart=0x08003000, size=0x0000D000
No Algorithm found for: 08002000H - 0800202FH
No Algorithm found for: 08002800H - 0800282FH
Partial Erase Done (areas with no algorithms skipped!)
Partial Programming Done (areas with no algorithms skipped!)
Partial Verify OK (areas with no algorithms skipped!)
Application running ...