cancel
Showing results for 
Search instead for 
Did you mean: 

bootloader and atollic

pcu
Associate II
Posted on September 05, 2013 at 17:11

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.s

FLASH (rx): ORIGIN = 0x08010000, LENGTH = 1024K in stm32f4_flash.ld

The 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.
3 REPLIES 3
Posted on September 05, 2013 at 17:48

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pcu
Associate II
Posted on September 07, 2013 at 11:54

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
Posted on September 07, 2013 at 12:24

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..