Page 4 of 4

Re: Need to change Vector table Address

Posted: Sat Jun 06, 2020 11:12 am
by stevestrong
I have no idea if this is resetting or jumping to 8010000, the debugger should show you the stack pointer.

Re: Need to change Vector table Address

Posted: Sat Jun 06, 2020 11:44 am
by sankarAMP2
In keil
Registers window

Code: Select all

R0:0x08010145
R13(SP):0x20000458
in debugger window the pointer showing

Code: Select all

0x8010E62 421   CMP    r1,r4
I'm in very big confusion now, why it this bootloader is working with keil generated code not Arduino?

Re: Need to change Vector table Address

Posted: Sat Jun 06, 2020 1:08 pm
by stevestrong
You should track step by step with the debugger what is happening with Arduino generated code.
If the bootloader jumps to 0x8010xxxx address then it is the application which is faulty.

You could also compare the MAP files for the code generated with Keil and Arduino to figure out the difference.

Re: Need to change Vector table Address

Posted: Sat Jun 06, 2020 3:29 pm
by darkspr1te
It could be a module in arduino being enabled (eg usb) that might be conflicting with the bootloader , that is just a assumption thought.

Re: Need to change Vector table Address

Posted: Mon Jun 08, 2020 6:50 am
by sankarAMP2
thank you @stevestrong and @darkspr1te.
bootloader is jumping to 0x8010000 perfectly but application not going forward. I assume that the problem with arduino generated file.
Now I want to generate same simple blinky example in STM32CUBE IDE. I'm new to use this IDE.
I found linker file STM32F103RET6_FLASH.ld and I changed flash address there, Is that enough or need to change any other files?

Re: Need to change Vector table Address

Posted: Mon Jun 08, 2020 7:54 am
by stas2z
sankarAMP2 wrote: Mon Jun 08, 2020 6:50 am I found linker file STM32F103RET6_FLASH.ld and I changed flash address there, Is that enough or need to change any other files?
VECT_TAB_OFFSET inside the system_stm32f1xx.c

Re: Need to change Vector table Address

Posted: Mon Jun 08, 2020 8:08 am
by sankarAMP2
stas2z wrote: Mon Jun 08, 2020 7:54 am VECT_TAB_OFFSET inside the system_stm32f1xx.c
Thank you @stas2z
After changing flash address in both files, this blinky application generated in cude ide also not working with that bootloader. Bootloader might be buggy.. :roll:

Re: Need to change Vector table Address

Posted: Mon Jun 08, 2020 8:23 am
by stas2z
First check if your jump from bl is working properly, just flash generated bin to exact offset using cubeprog

Re: Need to change Vector table Address

Posted: Mon Jun 08, 2020 10:26 am
by sankarAMP2
Thank you every one for your great support.
Now its working fine.
bug in bootloader code only.
by commenting __set_MSP(*mcuFirstPageAddr); this line is going to work.

Re: Need to change Vector table Address

Posted: Wed Aug 25, 2021 9:30 am
by phanyec
It was an exceptional failure when I failed the exam in this subject. I tried to find the physical address of the exception vector table. I know it is the virtual address 0xffffff0000. (I can print its value through the kernel module). I also know that the translation of most of the kernel virtual address (to physical address) is done by the substation value 0x8000000. But not so long ago I tried to import google sheets data to bigquery and I almost succeeded. I have a device that can read data directly from device memory and I want to get an exception vector table. But it doesn't match well with the new integration system. Who has encountered this problem?