|
发表于 2020-1-12 14:07:55
|
显示全部楼层
//uint8_t plc_eu_backup[4] __attribute__((at(0x20002000))); //编译仿真都ok
uint8_t plc_eu_backup[4] __attribute__((section(".ARM.__at_0x20002000")));
硬汉哥,我的ac6编译也是不行,报错:
Build started: Project: Demo
*** Using Compiler 'V6.13.1', folder: 'c:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'ac6'
compiling main.c...
linking...
.\Demo\Demo.axf: Error: L6971E: main.o(.ARM.__at_0x20002000) type RW incompatible with startup_stm32f103xe.o(STACK) type ZI in er RW_IRAM1.
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\Demo\Demo.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01
ac5编译是可以的。
我还在sct里面定义了一个分区:
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00080000 { ; load region size_region
ER_IROM1 0x08000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00010000 { ; RW data
.ANY (+RW +ZI)
}
MYRAM 0x20002000 UNINIT 0x0000200 {
.ANY (NO_INIT)
}
}
|
|