STM32F4 USB DFU trying to write to external memory?
Hello everyone,
I'm having issues with programming a STM32F429IIT using USB DFU. Im able to program it without issue with a STLinkv3 and the hardware is fully working.
The issue is strictly when using ST-Prog, the firmware download will reach 54% and then fail. The device seems to working as indented even though it failed to complete the programming.
I believe the issue is that the externally mapped SRAM (FMC) is included in the ELF & Hex file and the programming utility tries to program it but fails. The external SRAM is only used as a display buffer so i'm not interested in filling it with data during the programming stage.
I'm not completely sure if this is the case and even less sure of how to fix it while still keeping the external SRAM memory region in the linker script.
Any help is appreciated :)
Linker script
/* Memories definition */
MEMORY
{
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2M
/*NOR_FLASH (rw) : ORIGIN = 0x60000000, LENGTH = 2M*/
SRAM (xrw) : ORIGIN = 0x64000000, LENGTH = 1M
BACKUP_SRAM (rw) : ORIGIN = 0x40024000, LENGTH = 4K
}Relevant part of the programming log.
15:36:12:946 : sending packet nbr: 305
15:36:12:946 : downloading data
15:36:12:983 : DFU status = 0
15:36:12:983 : DFU State = 4
15:36:13:021 : DFU status = 0
15:36:13:021 : DFU State = 5
15:36:13:022 : sending packet nbr: 306
15:36:13:022 : downloading data
15:36:13:055 : DFU status = 0
15:36:13:055 : DFU State = 4
15:36:13:088 : DFU status = 0
15:36:13:088 : DFU State = 5
15:36:13:089 : Segment[0] downloaded successfully
15:36:13:089 : Size : 523776 Bytes
15:36:13:089 : Address : 0x64000000
15:36:13:092 : DFU status = 0
15:36:13:092 : DFU State = 5
15:36:13:092 : Status: 0, State: 5
15:36:13:092 : setting the address pointer to address: 0x64000000
15:36:13:109 : DFU status = 0
15:36:13:109 : DFU State = 4
15:36:13:109 : DFU status = 1
15:36:13:109 : DFU State = 10
15:36:13:127 : DFU status = 1
15:36:13:127 : DFU State = 10
15:36:13:150 : DFU status = 1
15:36:13:150 : DFU State = 10
15:36:13:176 : DFU status = 1
15:36:13:176 : DFU State = 10
15:36:13:196 : DFU status = 1
15:36:13:196 : DFU State = 10
15:36:13:219 : DFU status = 1
15:36:13:219 : DFU State = 10
15:36:13:245 : DFU status = 1
15:36:13:245 : DFU State = 10
15:36:13:272 : DFU status = 1
15:36:13:272 : DFU State = 10
15:36:13:292 : DFU status = 1
15:36:13:292 : DFU State = 10
15:36:13:313 : DFU status = 1
15:36:13:313 : DFU State = 10
15:36:13:342 : DFU status = 1
15:36:13:342 : DFU State = 10
15:36:13:364 : DFU status = 1
15:36:13:365 : DFU State = 10
15:36:13:381 : DFU status = 1
15:36:13:381 : DFU State = 10
15:36:13:403 : DFU status = 1
15:36:13:404 : DFU State = 10
15:36:13:442 : DFU status = 1
15:36:13:442 : DFU State = 10
15:36:13:462 : DFU status = 1
15:36:13:462 : DFU State = 10
15:36:13:483 : DFU status = 1
15:36:13:483 : DFU State = 10
15:36:13:503 : DFU status = 1
15:36:13:503 : DFU State = 10
15:36:13:524 : DFU status = 1
15:36:13:524 : DFU State = 10
15:36:13:543 : DFU status = 1
15:36:13:543 : DFU State = 10
15:36:13:569 : DFU status = 1
15:36:13:569 : DFU State = 10
15:36:13:589 : DFU status = 1
15:36:13:589 : DFU State = 10
15:36:13:617 : DFU status = 1
15:36:13:617 : DFU State = 10
15:36:13:637 : DFU status = 1
15:36:13:637 : DFU State = 10
15:36:13:656 : DFU status = 1
15:36:13:656 : DFU State = 10
15:36:13:686 : DFU status = 1
15:36:13:687 : DFU State = 10
15:36:13:687 : received memory address is wrong or unsupported
15:36:13:687 : Status: errTARGET, State: dfuERROR
15:36:13:687 : Error: failed to download Segment[3]
15:36:13:687 : Error: failed to download the File
