board.c: unknown type name 'PALConfig' Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
TheSlowGrowth
Posts: 2
Joined: Sat Apr 14, 2018 12:19 am
Has thanked: 2 times

board.c: unknown type name 'PALConfig'

Post by TheSlowGrowth »

Hello,

I'm trying to get ChibiOS 18.2.0 running on my custom board with an STM32F427. I generated the board.c/h files with ChibiStudio (Preview 19).
During compilation, I get this:

Compiling board.c
board.c:30:1: error: unknown type name 'PALConfig'
const PALConfig pal_default_config = {
^


Which suprises me. I have not changed the auto-generated files and PAL is enabled in halconf.h. I see that PALConfig is only defined in the GPIOv1 files of the HAL port, e.g. in os/hal/ports/STM32/LLD/GPIOv1/hal_pal_lld.h but the STM32F427 uses GPIOv2 (and correctly, those are also included by the chibios makefile). PALConfig is not defined anywhere in the GPIOv2 files, as far as I can tell.
I'm wondering if I made a mistake during generation of these files or if I'm having a problem with my build system.

Maybe you can give me some hints as searching brings up zero information. I can attach some more files if that helps. Please let me know, which ones.

Thank you so much!
Attachments
sourcefiles.zip
board.c, board.h, halconf.h board.chcfg
(14.13 KiB) Downloaded 312 times
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

Re: board.c: unknown type name 'PALConfig'

Post by faisal »

ChibiStudio board configuration plugin is not up to date. If you're okay using the command line, you can generate the .c/.h/.mk files using fmpp -C board.fmpp . Check out os/hal/boards in 18.2 . The board files expected by 18.2 are not backwards compatible with 17.6.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: board.c: unknown type name 'PALConfig'

Post by Giovanni »

Correct, you need to generate using FMPP or update ChibiStudio. I will upload new plugins during weekend.

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: board.c: unknown type name 'PALConfig'

Post by Giovanni »

I updated the plugins, see here: viewtopic.php?f=13&t=4606

Giovanni
TheSlowGrowth
Posts: 2
Joined: Sat Apr 14, 2018 12:19 am
Has thanked: 2 times

Re: board.c: unknown type name 'PALConfig'

Post by TheSlowGrowth »

Ah, thank you so much. Now the board.c is identical to the one of the STM32F429DISCOVERY board and it compiles just fine. Thank you for your help!
Post Reply