IAR报Warning[25]: Label 'HardFault_Handler' is defined pubweak in a section implicitly declared root

调试LPC1768单片机

 

在iar7.1的单片机编译出现如下警告

Warning[25]: Label 'HardFault_Handler' is defined pubweak in a section implicitly declared root

Warning[25]: Label 'xxx' is defined pubweak in a section implicitly declared root

解决办法:所有warming都添加下面红色字体

:NOROOT

 

 

     THUMB

        PUBWEAK Reset_Handler
        SECTION .text:CODE:REORDER:NOROOT(2)
Reset_Handler
        LDR     R0, =SystemInit
        BLX     R0
        LDR     R0, =__iar_program_start
        BX      R0

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

        PUBWEAK HardFault_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(KEIL或IAR编译链的使用)