如题,我使用同一个sct文件,但是ac5收可以达到变量noinit,但是ac6就不行提示编译出错
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 0x20 {
.ANY (NO_INIT)
}
}
使用uint8_t plc_eu_backup[4] __attribute__((section("NO_INIT"),zero_init));
编译后:
Rebuild started: Project: Demo
*** Using Compiler 'V6.13.1', folder: 'c:\Keil_v5\ARM\ARMCLANG\Bin'
Rebuild target 'ac6'
assembling startup_stm32f103xe.s...
compiling gpio.c...
compiling usart.c...
../Core/Src/main.c(70): warning: unknown attribute 'zero_init' ignored [-Wunknown-attributes]
uint8_t plc_eu_backup[4] __attribute__((section(&quot;NO_INIT&quot;),zero_init)); //ac6.13.1 <B1><E0><D2><EB><B7><C2><D5>娑紀k
^
1 warning generated.
compiling main.c...
compiling stm32f1xx_it.c...
compiling stm32f1xx_hal_msp.c...
compiling stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_uart.c...
compiling stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_flash.c...
compiling system_stm32f1xx.c...
compiling stm32f1xx_hal_flash_ex.c...
linking...
Program Size: Code=10830 RO-data=622 RW-data=28 ZI-data=1136
&quot;.\Demo\Demo.axf&quot; - 0 Error(s), 1 Warning(s).
Build Time Elapsed: 00:00:03
../Core/Src/main.c(70): warning: unknown attribute 'zero_init' ignored [-Wunknown-attributes]
uint8_t plc_eu_backup[4] __attribute__((section(&quot;NO_INIT&quot;),zero_init)); //ac6.13.1 <B1><E0><D2><EB><B7><C2><D5>娑紀k
这个报警在ac5中收没有的。 |