Compilation error in file NVIC.C (KEIL) Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
alexblack
Posts: 277
Joined: Mon Sep 24, 2012 3:52 pm
Been thanked: 33 times

Compilation error in file NVIC.C (KEIL)

Post by alexblack »

Hi.
I tried to move my old project from ChibiOS v.17.x to current modern ChibiOS 20.x and have trouble.
MCU is STM32L051, ChibiOS - current trunk, Compiler - KEIL.

Code: Select all

compiling nvic.c...
..\lib\ChibiOS\os\hal\ports\common\ARMCMx\nvic.c(83): error:  #20: identifier "SCnSCB" is undefined
    uint32_t n = SCnSCB->ICTR;

Code: Select all

file "..\os\hal\ports\common\ARMCMx\nvic.c"
...
76 /**
77  * @brief   NVIC clearing and initialization.
78  */
79 void nvicInit(void) {
80 #if defined(__CORE_CM0_H_GENERIC) || defined(__CORE_CM23_H_GENERIC)
81   uint32_t n = 0U;
82 #else
83   uint32_t n = SCnSCB->ICTR;
84 #endif
...
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Compilation error in file NVIC.C (KEIL)

Post by Giovanni »

Apparently those macros are not defined for some reason, not sure why, you should look at the definition point in cmsis headers.

Giovanni
alexblack
Posts: 277
Joined: Mon Sep 24, 2012 3:52 pm
Been thanked: 33 times

Re: Compilation error in file NVIC.C (KEIL)

Post by alexblack »

I found.
There is no macros "__CORE_CM0_H_GENERIC" because there is a macros "__CORE_CM0PLUS_H_GENERIC":

Code: Select all

file "..\os\common\ext\ARM\CMSIS\Core\Include\core_cm0plus.h"
..
31 #ifndef __CORE_CM0PLUS_H_GENERIC
32 #define __CORE_CM0PLUS_H_GENERIC
..
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Compilation error in file NVIC.C (KEIL)

Post by Giovanni »

It is a bug then, moving to bug reports.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Compilation error in file NVIC.C (KEIL)

Post by Giovanni »

Hi,

Fixed as bug #1097.

Giovanni
Post Reply