打印

请问硬汉哥,ac6的分散加载文件的语法和ac6一样吗?

[复制链接]
224|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
稻花香1号|  楼主 | 2018-8-3 21:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如题,我使用同一个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("NO_INIT"),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  
".\Demo\Demo.axf" - 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("NO_INIT"),zero_init));        //ac6.13.1 <B1><E0><D2><EB><B7><C2><D5>娑紀k
这个报警在ac5中收没有的。

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

381

主题

382

帖子

1

粉丝