How can two projects use different vector tables?
VTOR address is in the userguide page 57 in rev a
Can you provide more details on what the problem is?
Two separate projects are independent of each other so they can use whatever vector table they include.
Thank you for your reply. Now I develop a boot-loader project and a user application. In boot-loader part, if there is no code updating, it will jump to the user application memory. The boot-loader use the flash from address 0x00000000 to 0x00005FFF. And the user application use flash from address 0x00006000 to 0x0000FFFF. Now at address 0x00000000 there is a vector table for boot-loader code and there is also a vector table at address 0x00006000. And at the beginning of all vector tables, it is __iar_program_start. The problem is in boot-loader part, it jumps to address 0x00006000, but in this location, it will go to _iar_program_start. But it uses 0x00000000 vector table to look for _iar_program_start rather than 0x00006000 vector table. When it uses 0x00000000 vector table, it cause unused Handler problem.
Any suggestions about this? Thank you.
You would not jump to address 0x6000 when starting the user application; you would jump to the address contained in that location to switch over program control to your user application. (Maybe that is what you are actually doing but I have to go on what you write as you do not supply a sample project).
You would need to update the NVIC VTOR register for when the user application is running so that the vector table of the user application is used when interrupts or exceptions happen.
"But it uses 0x00000000 vector table to look for _iar_program_start rather than 0x00006000 vector table."
You will have to be very specific on what "it" is before I can help.
"You would need to update the NVIC VTOR register for when the user application is running so that the vector table of the user application is used when interrupts or exceptions happen."
I am new to this, can you give me some advice how can I do this?
Actually, I use the sample code in ftp site under folder ADuCMxxxV1.2. And edit ADCMeter for bootloader part. I don't know if you need I upload it or not.
Now for testing, I just use Blink code for user project. And in boot-loader code part, I only did
unsigned long UserAppPTR = 0x00006000;
int main (void)
int indicator = 0;
if( indicator == 1)
ModbusEventRTU(); //Modbus protocol
else // Jump to user application
RunUserApp = (void (*) (void))(UserAppPTR);
For this I took a screen shot, at address 0x00000000, it has vector table like this
and the corresponding __iar_program_start address is like this
And at address 0x00006000 it has vector table like
and corresponding __iar_program_start address is
What is the address for NVIC VTOR register on ADuCM360MKZ-Eval board?
Retrieving data ...