硬汉嵌入式论坛

 找回密码
 立即注册
查看: 2744|回复: 2
收起左侧

[开发工具] 请问硬汉哥,ac6的分散加载文件的语法和ac6一样吗?

[复制链接]

74

主题

1206

回帖

1428

积分

至尊会员

积分
1428
发表于 2020-1-12 14:47:11 | 显示全部楼层 |阅读模式
如题,我使用同一个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中收没有的。

回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
107294
QQ
发表于 2020-1-12 19:31:41 | 显示全部楼层
这个坛友分享过一个帖子,可以看下:

分享MDK 下的位置定义,和字节对齐申请,变量不初始化方法
http://www.armbbs.cn/forum.php?m ... 1369&fromuid=58
(出处: 硬汉嵌入式论坛)
回复

使用道具 举报

74

主题

1206

回帖

1428

积分

至尊会员

积分
1428
 楼主| 发表于 2020-1-13 08:33:50 | 显示全部楼层
eric2013 发表于 2020-1-12 19:31
这个坛友分享过一个帖子,可以看下:

分享MDK 下的位置定义,和字节对齐申请,变量不初始化方法

好的谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-25 03:50 , Processed in 0.180423 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表