2014-02-06 03:42 PM
Hi,
I'm trying to implement IAP on an stm32f051 device, but get a linker error when specifing VectorTable address is 0x20000000. __IO uint32_t VectorTable[48] __attribute__((at(0x20000000))); STM32F0-Discovery_Demo.axf: Error: L6985E: Unable to automatically place AT section main.o(.ARM.__AT_0x20000000) with required base address 0x20000000. Please manually place in the scatter file using the --no_autoat option. The program compiles and links when I don't mention a particular address __IO uint32_t VectorTable[48]; Program Size: Code=46848 RO-data=2976 RW-data=1312 ZI-data=6712 and I can see it in the map file.. VectorTable 0x200011e4 Data I know I don't have a lot of RAM so is this the issue? If I could get a workaround without using the scatter file (never used it before), that would be good as well. Hopefully someone can give me a few pointers. Regards Bob2015-07-16 08:57 AM
I can't edit my older posts. The cut-n-paste came from the ST ISP example, shouldn't be Resetting the SYSCFG, rather enabling the Clock
uint32_t *VectorTable = (uint32_t *)0x20000000; // Carve space here via linker script, or attributes
// Copy the vector table from the Flash (mapped at the base of the application
// load address 0x08003000) to the base address of the SRAM at 0x20000000.
for(i = 0; i < 48; i++) // Check Vector count on your part
VectorTable[i] = *(__IO uint32_t*)(0x08003000 + (i<<2));
// Enable the SYSCFG peripheral clock
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
// Remap SRAM at 0x00000000
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);