Hi all,
I’ve been working on ST demo code for the disco_l072cz_lrwan1, however I can not get it to compile…
The project is quite messy and I wanted to make it work first before removing all the useless stuff bit by bit. At the moment I just dumped everything into the pio root project folder and indicated file location to the compiler using build_flags.
The error appears during the linking stage:
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 (15.6.0) > ST DISCO-L072CZ-LRWAN1
HARDWARE: STM32L0XX 32MHz, 20KB RAM, 192KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES:
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Linking .pio\build\disco_l072cz_lrwan1\firmware.elf
.pio\build\disco_l072cz_lrwan1\src\LoRaWAN\App\src\main.o: In functionOnledEvent': main.c:(.text.OnledEvent+0x4): undefined reference to
TimerStart’
.pio\build\disco_l072cz_lrwan1\src\LoRaWAN\App\src\main.o: In functionOnTxDone': main.c:(.text.OnTxDone+0x10): undefined reference to
TraceSend’
main.c:(.text.OnTxDone+0x18): undefined reference toRadio' .pio\build\disco_l072cz_lrwan1\src\LoRaWAN\App\src\main.o: In function
OnTxTimeout’:
main.c:(.text.OnTxTimeout+0x10): undefined reference to `TraceSend’
…
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\disco_l072cz_lrwan1\firmware.elf] Error 1
I have reduced the number of error lines to maintain readability, but you get the idea, compiler seems unable to find some variables/functions during the linking stage.
Here is my platformio.ini configuration, if it is of any help:
[env:disco_l072cz_lrwan1]
build_flags =
-D USE_STM32L0XX_NUCLEO
-D USE_BAND_868
-D USE_MODEM_LORA
-I src/LoRaWAN/App/inc
-I src/Core/inc
-I Drivers/STM32L0xx_HAL_Driver/Inc
-I Drivers/STM32L0xx_HAL_Driver/Src
-I Drivers/CMSIS/Device/ST/STM32L0xx/Include
-I Drivers/CMSIS/Device/ST/STM32L0xx/Source
-I Drivers/CMSIS/Include
-I Drivers/CMSIS/Source
-I Drivers/BSP/STM32L0xx_Nucleo
-I Middlewares/Third_Party/LoRaWAN/Utilities
-I Middlewares/Third_Party/LoRaWAN/Phy
platform = ststm32
board_build.mcu = STM32L0xx
board = disco_l072cz_lrwan1
extra_scripts = add_nanolib.py
Can any of you point me in the right direction to solve this ?
Thanks in advance,