This only seems to work when connected to the emulator (IAR EWARM 5.20 J-Link).
The micro appears to hang when not connected to the emulator.
On 25-09-2008 at 13:01, Anonymous wrote:
I've found a solution to my problem - thanks to those who investigated. Solution follows below. Note that it only works with IAR EWARM 5.X:
Step 1: Set .intvec start in the linker to the desired address:
Step 2: The interrupt table start address needs to be exported in the .icf file. Manually edit the project .icf file to add the following line, taking care to add it after the "/**** End of ICF editor section. ###ICF###*/" section:
export symbol __ICFEDIT_intvec_start__;
Step 3: Expose the symbol in a global area of the .c file:
extern u32 __ICFEDIT_intvec_start__;
Step 4: In the .c file, load the SCB_VTOR register using the library function 'NVIC_SetVectorTable' in the following way:
offset = (u32)&__ICFEDIT_intvec_start__;
offset &= SCB_VTOR_TBLOFF;
NVIC_SetVectorTable(NVIC_VectTab_FLASH, offset );
ps. Unlike this method, the ST 'Vector Table Relocation' example doesn't auto synchronise the linker with code, probably because it needs to be linker agnostic.
Retrieving data ...