当前位置:网站首页>Error reported by Huada MCU Keil_ Weak's solution
Error reported by Huada MCU Keil_ Weak's solution
2022-06-27 19:21:00 【Sushoukun】
1. Keil Unrecognized compilation __WEAK The list of questions is as follows :
In the use of Keil Sometimes unrecognized errors occur in compilation __WEAK The problem of , The screenshot is as follows :

The error message prompted is as follows :
..\..\..\..\mcu\common\interrupts_hc32l13x.c(72): error: #77-D: this declaration has no storage class or type specifier
__WEAK void Uart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(72): error: #65: expected a ";"
__WEAK void Uart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(73): error: #77-D: this declaration has no storage class or type specifier
__WEAK void LpUart0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(73): error: #65: expected a ";"
__WEAK void LpUart0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(74): error: #77-D: this declaration has no storage class or type specifier
__WEAK void LpUart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(74): error: #65: expected a ";"
__WEAK void LpUart1_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(75): error: #77-D: this declaration has no storage class or type specifier
__WEAK void Spi0_IRQHandler(void);
..\..\..\..\mcu\common\interrupts_hc32l13x.c(75): error: #65: expected a ";" terms of settlement :
Because in Keil Need to be defined as __weak To be recognized ( Not capitalized _WEAK), So in the header file base_types.h Add the following lines to the file to define , Compile it OK La !
#if defined (__ICCARM__)
#define __WEAK __WEAK __ATTRIBUTES
#elif defined (__CC_ARM)
#define __WEAK __weak
#else
#error "unsupported compiler!!"
#endif2、 Cause analysis
ARM Series compilation tool chain :__CC_ARM、__ICCARM__、__GNUC__、__TASKING__
In order to solve the problem of error reporting above , Defined __ICCARM__ and __CC_ARM, Here's an explanation :
__CC_ARM The corresponding platform is :ARM RealView:
RealView, Is a set that includes compiling 、 Development tools for debugging and simulation , It needs to be combined with the development environment, such as uvision、eclipse perhaps CodeWarrior, Form an integrated development environment to use .
__ICCARM__ The corresponding platform is :IAR EWARM:
Embedded Workbench for ARM yes IARSystems Company as ARM An integrated development environment for microprocessor development ( Hereinafter referred to as IAR EWARM). Compare other ARM development environment ,IAR EWARM It's easy to get started 、 Easy to use and compact code .
__GNUC__ The corresponding platform is :GNU Compiler Collection:
GCC The original intention is to GNU A compiler specially written by the operating system .GNU Systems are completely free software .
边栏推荐
- Industry university cooperation cooperates to educate people, and Kirin software cooperates with Nankai University to complete the practical course of software testing and maintenance
- Market status and development prospect forecast of global epoxy resin active toughener industry in 2022
- Redis Series 2: data persistence improves availability
- International School of Digital Economics, South China Institute of technology 𞓜 unified Bert for few shot natural language understanding
- 过关斩将,擒“指针”(下)
- Blink SQL built in functions
- 国际数字经济学院、华南理工 | Unified BERT for Few-shot Natural Language Understanding(用于小样本自然语言理解的统一BERT)
- Exporting coordinates of points in TXT format in ArcGIS
- The IPO of Yuchen Airlines was terminated: Guozheng was proposed to raise 500million yuan as the major shareholder
- VSCode 建议你启用 gopls,它到底是个什么东东?
猜你喜欢

Hi,你有一份Code Review攻略待查收!

What is ICMP? What is the relationship between Ping and ICMP?

How to use the low code platform of the Internet of things for picture management?

Buzzer experiment based on stm32f103zet6 library function

im即时通讯开发之双进程守护保活实践

openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题

中国工业软件市场研究报告出炉,力控SCADA、MES丰富国产工业软件生态

xctf攻防世界 MISC薪手进阶区

实施MES管理系统前,要对哪些问题进行评估

在线文本按行批量反转工具
随机推荐
网上期货开户安全么?
China's Industrial Software Market Research Report is released, and SCADA and MES of force control enrich the ecology of domestic industrial software
[notice of the Association] notice on holding summer special teacher training in the field of artificial intelligence and Internet of things
如何封装调用一个库
Cucumber自动化测试框架使用
New Zhongda chongci scientific and Technological Innovation Board: annual revenue of 284million and proposed fund-raising of 557million
DFS and BFS simple principle
【ELT.ZIP】OpenHarmony啃论文俱乐部—数据密集型应用内存压缩
IDEA 官网插件地址
通过 G1 GC Log 重新认识 G1 垃圾回收器
Redis Series 2: data persistence improves availability
Blink SQL内置函数大全
可靠的分布式锁 RedLock 与 redisson 的实现
9.OpenFeign服务接口调用
Function key input experiment based on stm32f103zet6 Library
Core dynamic Lianke rushes to the scientific innovation board: with an annual revenue of 170million yuan, Beifang Electronics Institute and Zhongcheng venture capital are shareholders
如何实现IM即时通讯“消息”列表卡顿优化
External interrupt experiment based on stm32f103zet6 library function
How to arrange digital collections on online platforms such as reading and Chinese online? Will "read/write-to-earn" products be launched in the future?
Using WebDAV instead of 445 port file share