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

Report here problems in any of ChibiOS components. This forum is NOT for support.
alexblack
Posts: 241
Joined: Mon Sep 24, 2012 3:52 pm
Location: Donetsk
Been thanked: 27 times
Contact:

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

Postby alexblack » Tue May 05, 2020 4:26 pm

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: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

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

Postby Giovanni » Tue May 05, 2020 5:40 pm

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: 241
Joined: Mon Sep 24, 2012 3:52 pm
Location: Donetsk
Been thanked: 27 times
Contact:

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

Postby alexblack » Tue May 05, 2020 6:37 pm

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: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

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

Postby Giovanni » Tue May 05, 2020 7:11 pm

It is a bug then, moving to bug reports.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

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

Postby Giovanni » Mon May 18, 2020 1:33 pm

Hi,

Fixed as bug #1097.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests