Page 1 of 1

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

Posted: Tue May 05, 2020 4:26 pm
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
...

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

Posted: Tue May 05, 2020 5:40 pm
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

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

Posted: Tue May 05, 2020 6:37 pm
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
..

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

Posted: Tue May 05, 2020 7:11 pm
by Giovanni
It is a bug then, moving to bug reports.

Giovanni

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

Posted: Mon May 18, 2020 1:33 pm
by Giovanni
Hi,

Fixed as bug #1097.

Giovanni