2013-09-05 08:11 AM
Hello,
I work on the bootloader IAP_ethernet from ST.I use the TFTP transfer.When I use the image ''Ethernet_IAP_STM3240 \ binary \ STM324xG_EVAL_SysTick.bin'' provided in the example AN3376, it works correctly.When I use the same project compiled by myself, the program does not start.But I have changed the settings to build:# define VECT_TAB_OFFSET 0x10000 in system_stmf4xx.sFLASH (rx): ORIGIN = 0x08010000, LENGTH = 1024K in stm32f4_flash.ldThe compilation is done well with the offset. I do not have too many ideas where to look.I'm on atollic 3.3.Thank you for your time.2013-09-05 08:48 AM
You might want to shrink the length to 960KB as you've shaved 64K off the front.
Check the .HEX, and .MAP files, confirm things are at the new address. Examine system_stm32fxxx.c and SystemInit() Use a debugger and step from your boot loader into your application code.2013-09-07 02:54 AM
Thank you Clive1.
I found the problem in the bootloader itself:if (((*(__IO uint32_t*)USER_FLASH_FIRST_PAGE_ADDRESS) & 0x2FFE0000 ) == 0x20000000)
I removed this line from the example and the bootloader jump to the correct offset.
Why ST check this? Unfortunaly it is always false with my own image.
Pierre
2013-09-07 03:24 AM
It is doing a sanity check of vector table entry zero, Stack Pointer (SP), is in RAM.
Basically 0x20000000 .. 0x02001FFFF, this might be a problem if you place your stack in CCMRAM around 0x1000xxxx, or explicitly to 0x20020000 which while valid fails the cheap test. Check the .MAP, .LST, .BIN or .HEX to confirm the value placed at the front of the image.