#define FLASH_BOOTLOADER_SIZE (uint32_t)(0x3000)
#define APPLICATION_ADDRESS (uint32_t)(0x08000000+FLASH_BOOTLOADER_SIZE)
#if (defined ( __CC_ARM ))
__IO uint32_t VectorTable[48] __attribute__((at(0x20000000)));
#elif (defined (__ICCARM__))
#pragma location = 0x20000000
__no_init __IO uint32_t VectorTable[48];
#elif defined ( __GNUC__ )
__IO uint32_t VectorTable[48] __attribute__((section(".RAMVectorTable")));
#elif defined ( __TASKING__ )
__IO uint32_t VectorTable[48] __at(0x20000000);
#endif
uint32_t i = 0;
/* 设置中断向量表地址 */
/* Relocate by software the vector table to the internal SRAM at 0x20000000 ***/
/* 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++)
{
VectorTable = *(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2));
}
编译之后报错:.\Objects\zxkj501.axf: Error: L6985E: Unable to automatically place AT section app.o(.ARM.__AT_0x20000000) with required base address 0x20000000. Please manually place in the scatter file using the --no_autoat option.Not enough information to list image symbols.
我的CPU是stm32f030C8T6,有那位大神遇到过吗?怎么解决的呢?非常感谢
|