Cannot compile RT-STM32F446ZE-NUCLEO144 demo

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

Moderator: RoccoMarco

Post Reply
falcon
Posts: 2
Joined: Sun Jun 17, 2018 11:41 am

Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by falcon »

Hi everybody, first post here.

I can't compile the F446ZE RT demo.
Using SVN rev. 12109 and ChibiStudio v20.
When importing the RT-STM32F446ZE-NUCLEO144 demo i get the following error:

Code: Select all

./mcuconf.h:72:45: warning: "STM32_CK48MSEL_PLLSAI" is not defined, evaluates to 0 [-Wundef]
 #define STM32_CK48MSEL                      STM32_CK48MSEL_PLLSAI


GCC suggests:

Code: Select all

./mcuconf.h:72:45: error: 'STM32_CK48MSEL_PLLSAI' undeclared (first use in this function); did you mean 'STM32_CK48MSEL_PLLALT'?


But changing STM32_CK48MSEL_PLLSAI to STM32_CK48MSEL_PLLALT on mcuconf.h produces:

Code: Select all

In file included from ../../chibios_trunk/os/hal/include/hal.h:118:0,
                 from ../../chibios_trunk/os/hal/src/hal.c:25:
../../chibios_trunk/os/hal/ports/STM32/STM32F4xx/hal_lld.h:184:25: warning: "STM32_CK48MSEL_PLLI2S" is not defined, evaluates to 0 [-Wundef]
 #elif STM32_CK48MSEL == STM32_CK48MSEL_PLLI2S
                         ^~~~~~~~~~~~~~~~~~~~~
In file included from ../../chibios_trunk/os/hal/include/hal.h:118:0,
                 from ../../chibios_trunk/os/hal/src/hal_st.c:25:
../../chibios_trunk/os/hal/ports/STM32/STM32F4xx/hal_lld.h:184:25: warning: "STM32_CK48MSEL_PLLI2S" is not defined, evaluates to 0 [-Wundef]
 #elif STM32_CK48MSEL == STM32_CK48MSEL_PLLI2S
                         ^~~~~~~~~~~~~~~~~~~~~
In file included from ../../chibios_trunk/os/hal/include/hal.h:118:0,
                 from ../../chibios_trunk/os/hal/src/hal_queues.c:40:
../../chibios_trunk/os/hal/ports/STM32/STM32F4xx/hal_lld.h:184:25: warning: "STM32_CK48MSEL_PLLI2S" is not defined, evaluates to 0 [-Wundef]
 #elif STM32_CK48MSEL == STM32_CK48MSEL_PLLI2S
                         ^~~~~~~~~~~~~~~~~~~~~
In file included from ../../chibios_trunk/os/hal/include/hal.h:118:0,
                 from ../../chibios_trunk/os/hal/src/hal_buffers.c:41:
../../chibios_trunk/os/hal/ports/STM32/STM32F4xx/hal_lld.h:184:25: warning: "STM32_CK48MSEL_PLLI2S" is not defined, evaluates to 0 [-Wundef]
 #elif STM32_CK48MSEL == STM32_CK48MSEL_PLLI2S
                         ^~~~~~~~~~~~~~~~~~~~~
../../chibios_trunk/os/hal/ports/STM32/STM32F4xx/hal_lld.h:191:2: error: #error "invalid source selected for PLL48CLK clock"
 #error "invalid source selected for PLL48CLK clock"


Any ideas?
Btw, thanks for ChibiOS, i'm learning much more from it than playing with Arduino :D

Falcon
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by tfAteba »

Hello Falcon,

STM32_CK48MSEL_PLLSAI is define in the file os/hal/ports/STM32/STM32F7xx/hal_lld.h
where as in the make file, the file pointed is os/hal/ports/STM32/STM32F4xx/hal_lld.h and in this file, STM32_CK48MSEL_PLLSAI is not define.

In your board there is an STM32F4 if i'm rigth, so in that case I tnink that a wrong mcuconf.h file is use in the demo.

Falcon wrote:
Btw, thanks for ChibiOS, i'm learning much more from it than playing with Arduino

You are right, but You can also combine the both, ChibiOs and Arduino, and you will have a fun and strong system to play with :)
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by RoccoMarco »

Hello falcon. Just opened a fresh installation of ChibiStudio 20. I have imported the demo from ChibiOS 18.2 demo folder and I have successfully compiled it.
I suggest you to use that demo instead of trunk.

I have verified that the trunk does not compile: this because we had a major review of F4 clock tree in these days and maybe mcuconf is out of sync. Going to fix it on trunk.

Thanks for reporting.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by tfAteba »

Hello Marco, I can also confirm that the demo don't compile in the trunk.
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by RoccoMarco »

Yes we know. Giovanni just fixed that problem. Updating the trunk it compiles now.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by tfAteba »

Nice :) ,
I also sow that it was the same case for the demos/STM32/RT-STM32F446RE-NUCLEO64/ but Giovanni have also fixed that too, Great.
falcon
Posts: 2
Joined: Sun Jun 17, 2018 11:41 am

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by falcon »

Hi!

Wow, that was fast, specially considering it's Sunday! Can confirm the demo compiles and works on my board.

Lots of thanks to you all.

Falcon
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: Cannot compile RT-STM32F446ZE-NUCLEO144 demo

Post by RoccoMarco »

falcon wrote: considering it's Sunday!Falcon


we are faster on weekend (a lot of spare time) :mrgreen:
Post Reply