Topic : STM8s208 booltoader problem

Forum : ST7/STM8

Original Post
Post Information Post
November 11, 2015 - 11:40am
Ivan Orlov

Hello, Raisonance team!

I'm looking for some help with my stm8 bootloader. It located from 0x8000 with standard intvector table (I don't use interrupts in bototloader). Application locate form 0x9000 and it's intvec table too. Bootloader receive application code and write it to flash memory. There are no errors. After all write cycles bootloader do jump to the first vector of application invec table. Application begins working, but immediately stops.

I think I must not only jump to the application but also relocate intvec table to allow application use it's table in right way. I think application try to use vec table from 0x8000-0x8080 and go to the wrong address in flash memory. But I tried to correct .hex file of bootloader in that way: each vector in 0x8004-0x8080 was corrected to 0x82 00 90 04 (for example) to point the same vector of application table. But in is not working.

I saw your appnote 61 with example of intvec table trampoline, but I didn't understand how it can works. I use IAR 1.42 for STM and it cannot compile code from appnote like this: "at 0x8008 code unsigned char vect0_head = 0x82;
at 0x8009 code ISR vect0 = (ISR)(USER_INTERRUPT_TABLE_ADDRESS + 0x08);"

Help me, please. Show me how code of vector trampoline should looks.

Replies
Post Information Post
+1
0
-1
November 20, 2015 - 10:28am
Etienne Cassin

Dear Ivan,

Thank you for the feedback.

I'm glad you managed to solve your issue.

Best Regards,

+1
0
-1
November 20, 2015 - 10:33am
Ivan Orlov

I already solve my problem. The deal was in deinitialization periphery of CPU before jumping to the main application. Periphery must be cleaned.