cancel
Showing results for 
Search instead for 
Did you mean: 

Can't build STM32WL FUOTA example with STM32CubeIDE

meloon
Associate II

Hi,

i'm trying to run example of LoRaWAN FUOTA firmware, but build attempt ends with fail. It looks like running postbuld.sh script fails, but it only gives an information about 4 errors without any comment.

After run ./build.bat I got following logs:

###########################################
# 0- Set all global variables
###########################################
###########################################
# 1- Compile all BFU projects
###########################################
Create.
Opening '1_Image_KMS_Blob'.
Building All Projects...
10:20:32 **** Clean-only build of configuration Debug for project 1_Image_KMS_Blob ****
make -j24 clean
rm -rf ./Application/User/kms_blob_example_keys.cyclo ./Application/User/kms_blob_example_keys.d ./Application/User/kms_blob_example_keys.o ./Application/User/kms_blob_example_keys.su
rm -rf KMS_Blob.bin KMS_Blob.elf KMS_Blob.list KMS_Blob.map default.size.stdout


10:20:32 Build Finished. 0 errors, 0 warnings. (took 158ms)

10:20:32 **** Build of configuration Debug for project 1_Image_KMS_Blob ****
make -j24 all
arm-none-eabi-gcc "C:/Users/dmilcarek/Documents/STM32_Workspace/STM32Cube_FW_WL_V1.3.0/Projects/NUCLEO-WL55JC/Applications/LoRaWAN_FUOTA/1_Image_KMS_Blob/Src/kms_blob_example_keys.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32WL55xx -DCORE_CM4 -DDEBUG -c -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc -I../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy -I../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/BSP/STM32WLxx_Nucleo -I../../../../../../../Middlewares/ST/STM32_Key_Management_Services/Core -I../../../1_Image_SECoreBin/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Application/User/kms_blob_example_keys.d" -MT"Application/User/kms_blob_example_keys.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Application/User/kms_blob_example_keys.o"
arm-none-eabi-gcc -o "KMS_Blob.elf" @"objects.list"   -mcpu=cortex-m4 -T"C:\Users\dmilcarek\Documents\STM32_Workspace\STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\1_Image_KMS_Blob\STM32CubeIDE\KMS_Blob.ld" --specs=nosys.specs -Wl,-Map="KMS_Blob.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp\libc_nano.a(libc_a-closer.o): in function `_close_r':
(.text._close_r+0xc): warning: _close is not implemented and will always fail
C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp\libc_nano.a(libc_a-readr.o): in function `_read_r':
(.text._read_r+0x10): warning: _read is not implemented and will always fail
C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp\libc_nano.a(libc_a-writer.o): in function `_write_r':
(.text._write_r+0x10): warning: _write is not implemented and will always fail
Finished building target: KMS_Blob.elf

arm-none-eabi-size   KMS_Blob.elf
arm-none-eabi-objdump -h -S  KMS_Blob.elf  > "KMS_Blob.list"
arm-none-eabi-objcopy  -O binary  KMS_Blob.elf  "KMS_Blob.bin"
   text    data     bss     dec     hex filename
   1200       0       0    1200     4b0 KMS_Blob.elf
Finished building: default.size.stdout

Finished building: KMS_Blob.bin
Finished building: KMS_Blob.list


"../postbuild.sh" ".." "KMS_Blob" "1"
Windows_NT
prepareimage with windows executable
C:/Users/dmilcarek/Documents/STM32_Workspace/STM32Cube_FW_WL_V1.3.0/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/prepareimage.exe enc -k ../../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin -i ../../Binary/iv.bin KMS_Blob.bin ../../Binary/KMS_Blob.kmsu
C:/Users/dmilcarek/Documents/STM32_Workspace/STM32Cube_FW_WL_V1.3.0/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/prepareimage.exe sha256 KMS_Blob.bin ../../Binary/KMS_Blob.sign -p 16
C:/Users/dmilcarek/Documents/STM32_Workspace/STM32Cube_FW_WL_V1.3.0/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/prepareimage.exe pack -k ../../Binary/ECCKEY.txt -m KMSB -r 28 -v 1 -i ../../Binary/iv.bin -f ../../Binary/KMS_Blob.kmsu -t ../../Binary/KMS_Blob.sign -o 320 ../../Binary/KMS_Blob.kmsb


10:20:35 Build Failed. 4 errors, 4 warnings. (took 2s.827ms)

Stm32cubeidec:
Java was started but returned exit code=1
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.13.0
-Declipse.buildId=Version 1.13.0
-DproductMaturityGrade=mm
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT
-Djava.class.path=C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\stm32cubeidec.exe
-name Stm32cubeidec
--launcher.library C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.700.v20221108-1024\eclipse_11801.dll
-startup C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.overrideVmargs
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-data C:\Users\dmilcarek\Documents\STM32_Workspace\STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\Scripts\STM32CubeIDE\..\..\LoRaWAN_End_Node\ws
-import C:\Users\dmilcarek\Documents\STM32_Workspace\STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\Scripts\STM32CubeIDE\..\..\1_Image_KMS_Blob\STM32CubeIDE
-build all
-vm C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\\plugins/com.st.stm32cube.ide.jre.win64_3.0.0.202305091045/jre/bin\server\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.13.0
-Declipse.buildId=Version 1.13.0
-DproductMaturityGrade=mm
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT
-Djava.class.path=C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
Error: Compilation of C:\Users\dmilcarek\Documents\STM32_Workspace\STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\Scripts\STM32CubeIDE\..\..\1_Image_KMS_Blob\STM32CubeIDE Failed. Abort of compile batch ...
PS C:\Users\dmilcarek\Documents\STM32_Workspace\STM32Cube_FW_WL_V1.3.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\Scripts\STM32CubeIDE>

I have STM32CubeIDE v.1.9.0 and STM32CubeWL MCU Firmware Package V1.3.0. Any ideas why this example doesn't compile on the newest STM32CubeIDE?

3 REPLIES 3
KDJEM.1
ST Employee

Hello @meloon and welcome to the Community :),

I confirm the issue by using the last STM32CubeIDE1.13.1. 

The workaround is:

Go to Windows > Preferences
Open the tab Error Parsers into C/C++ > Build > Settings
Select GNU Linker Error Parser, double click on the pattern for the 1st severity Ignore
Changer :
(.*?):?(\(\.[^\s+]+\+.*\))?:\s*(In function [`'"](.*)['"]:)
to :
(.*?):?(\(\.[^\s+]+\+.*\))?:\s*([Ii]n function [`'"](.*)['"]:)

For more information, I advise you to take a look to this Post.

Please let me know, if the issue is solved?.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@KDJEM.1 Your solution helps only with LoRaWAN_End_Node project build in STM32CubeIDE, but doesn't work in the whole project build using build.bat script. As a quick solution I've downgraded to STM32CubeIDE V1.12.1

KDJEM.1
ST Employee

Hi @meloon ,

Thank you for updating your post.

Could you please share the build errors you got, with which project example and which STM32cubeIDE are you using?

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.