Page 1 of 1

Nucleo 144 F303ZE not supported

Posted: Fri Jan 14, 2022 6:36 pm
by rachdatu
Hello

Is there anybody who already worked on that board?
I am following the instructions how to add a specific board.
For boards that are already supported, there are 2 cpp and 3 h files defined in the corresponding folders.

Questions:
How do you go about generating these, for example variant_NUCLEO_F303ZE.cpp and variant_NUCLEO_F303ZE.h?
Is that a manual process?
Is there a board that would be similar enough I can "re-use" its files and modify them?

Thanks for your help

Re: Nucleo 144 F303ZE not supported

Posted: Sun Jan 16, 2022 3:11 am
by mrburnette
From the WiKi:

https://github.com/stm32duino/wiki/wiki ... nt-(board)

Most take the "closest board config with the same or same family uC" and do a copy, paste, edit.
Supported: https://github.com/stm32duino/Arduino_C ... ted-boards

Re: Nucleo 144 F303ZE not supported

Posted: Tue Jan 18, 2022 9:54 pm
by rachdatu
Thanks for the links

I have followed the wiki about adding a variant (created the linker script, system clock config, defined all the board pins,
declared the variant in the boards.txt file)

I have then removed from the variant_NUCLEO_F303ZETX.cpp and variant_NUCLEO_F303ZETX.h all the pins definition except the one
for the LED_GREEN. No changes

When I compile the blink sketch, I get the following error message:

Code: Select all

/<userhome>/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: libraries/SrcWrapper/stm32/hw_config.c.o: in function `hw_config_init':
hw_config.c:(.text.hw_config_init+0x16): undefined reference to `SystemClock_Config'
<userhome>/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: core/core.a(wiring_digital.c.o): in function `pinMode':
wiring_digital.c:(.text.pinMode+0xb4): undefined reference to `digitalPin'
<userhome>/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: wiring_digital.c:(.text.pinMode+0xc0): undefined reference to `analogInputPin'
<userhome>/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: core/core.a(wiring_digital.c.o): in function `digitalWrite':
wiring_digital.c:(.text.digitalWrite+0x60): undefined reference to `digitalPin'
<userhome>/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: wiring_digital.c:(.text.digitalWrite+0x6c): undefined reference to `analogInputPin'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Nucleo-144.

I would appreciate help from someone.

Thanks

Re: Nucleo 144 F303ZE not supported

Posted: Tue Jan 18, 2022 10:57 pm
by ag123
try using the Nucleo F303RE variant to see if it works, there is a chance it may work.
Probably not all the peripherals, but the commons ones likely works.
https://github.com/stm32duino/Arduino_C ... -64-boards
once that work, you can then copy the variant files accordingly and try to make a new variant for the ZE board.

Re: Nucleo 144 F303ZE not supported

Posted: Wed Jan 19, 2022 6:18 am
by fpiSTM
Probably the boards.txt have an issue then it does not build the variant_*.cpp

Re: Nucleo 144 F303ZE not supported

Posted: Wed Jan 19, 2022 10:56 am
by rachdatu
Thanks for your help
It does compile now.

boards.txt did indeed have an issue.
I shortened the different entries by 2 chars (from NUCLEO_F303ZETX to NUCLEO_F303ZE)
Is there a limitation or is it bound to something else?

Blink sketch does work as well. 8-)

Re: Nucleo 144 F303ZE not supported

Posted: Wed Jan 19, 2022 12:45 pm
by fpiSTM
No limitation but should be coherent. Some entries are used as define (build.boards,...) so if it does not match this will not build properly ;)