硬汉嵌入式论坛

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

[有问必答] IAR8.3编译V4板子报错问题

[复制链接]

1

主题

3

回帖

6

积分

新手上路

积分
6
发表于 2021-11-1 15:55:12 | 显示全部楼层 |阅读模式
V4停产了,只能过来这边问了。我想重新用编译,编译器是IAR8.3,请问什么设置才可以编译成功不报错。原编译器是6.3的可以
回复

使用道具 举报

1

主题

3

回帖

6

积分

新手上路

积分
6
 楼主| 发表于 2021-11-1 16:34:07 | 显示全部楼层
问题解决了,分享一下方法吧。
1: Project options > General Options > Library
Configuration 里选择 USE CMSIS ;

2:在Project>Options>C/C++Compiler>Preprocessor里删除所有的 CMSIS header files ,
“$PROJ_DIR$\..\..\..\Libraries\CMSIS\CM3\CoreSupport”
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106886
QQ
发表于 2021-11-1 17:12:43 | 显示全部楼层
3k.sky886 发表于 2021-11-1 16:34
问题解决了,分享一下方法吧。
1: Project options > General Options > Library
Configuration 里选择 ...

IAR的更新,兼容性太差了。
回复

使用道具 举报

1

主题

3

回帖

6

积分

新手上路

积分
6
 楼主| 发表于 2021-11-1 17:59:04 | 显示全部楼层

   startup_stm32f10x_hd.s
文件,报错内容如:
    Warning[25]: Label 'Reset_Handler' is defined pubweak in a section implicitly declared root
等,产生的map文件中:
           .intvec            ro code  0x08000000    0x130  startup_stm32f10x_hd.o [1]
                                            - 0x08000130    0x130


解决方法:

Problem

After upgrading to EWARM 7.10.1 the Warning[25] is issued during assembly of a file that assembled without warning on earlier version of EWARM.

Background

The assembler (iasmarm) is (from EWARM 7.10.1) issuing Warning[25] for a deprecated assembler construction.

The deprecated assembler source construction looks like this:

      PUBWEAK NMI_Handler
      SECTION .text:CODE:REORDER(1)
  NMI_Handler
Solution

To avoid the warning, add ":NOROOT" to the "SECTION" statement:

      PUBWEAK NMI_Handler
      SECTION .text:CODE:REORDER:NOROOT(1)
  NMI_Handler
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106886
QQ
发表于 2021-11-2 08:59:52 | 显示全部楼层
3k.sky886 发表于 2021-11-1 17:59
startup_stm32f10x_hd.s
文件,报错内容如:
    Warning[25]: Label 'Reset_Handler' is defined p ...

这个就是IAR兼容性性极差的表现。最早2015年的IAR7.X就开始出现这个问题了,使用IAR一定要使用指定版本就是这个道理。

升级IAR到7.XX,多处Warning[25]: Label 'x' is defined pubweak in a sec
http://www.armbbs.cn/forum.php?m ... 3747&fromuid=58
(出处: 硬汉嵌入式论坛)
回复

使用道具 举报

1

主题

3

回帖

6

积分

新手上路

积分
6
 楼主| 发表于 2021-11-2 09:32:27 | 显示全部楼层
最简单的方式是用IAR下载一个例程下来后,直接套例程的.S文件就好了。不用手改.S文件
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-9 08:42 , Processed in 0.267108 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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