cancel
Showing results for 
Search instead for 
Did you mean: 

How to build a STM32CubeIDE project in a Docker image?

JNoon.1
Associate III

Hi,

I am fairly new to the CI/CD processes. I am currently trying to use Bitbucket to run a pipeline to build my STM32CubeIDE project.

I have set up the project on Windows in the STM32CubeIDE, I have then setup a pipeline using the image circutor/stm32cubeide from DockerHub (https://hub.docker.com/r/circutor/stm32cubeide).

To first test this Docker image, I am using WSL to run the docker container and jump into it. Once in the container I am cloning my repo and running the command:

/opt/stm32cubeide/stm32cubeide -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import . -build all

It looks to generate the makefiles in the Debug and Release folders, but it fails. The project is using a STM32WB15CCU. I get the following output:

In file included from ../Drivers/CMSIS/Include/cmsis_compiler.h:54:0,
                 from ../Core/Inc/utilities_conf.h:29,
                 from ../Utilities/lpm/tiny_lpm/stm32_lpm.c:22:
../Drivers/CMSIS/Include/cmsis_gcc.h: In function '__get_CONTROL':
../Drivers/CMSIS/Include/cmsis_gcc.h:219:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 {
 ^
arm-none-eabi-gcc "../Middlewares/ST/STM32_WPAN/utilities/stm_list.c" -std=gnu11 -DUSE_HAL_DRIVER -DSTM32WB15xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/ST/STM32_WPAN/utilities/stm_list.d" -MT"Middlewares/ST/STM32_WPAN/utilities/stm_list.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/ST/STM32_WPAN/utilities/stm_list.o"
In file included from ../Drivers/CMSIS/Include/cmsis_compiler.h:54:0,
                 from ../Drivers/CMSIS/Include/core_cm4.h:162,
                 from ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb15xx.h:134,
arm-none-eabi-gcc "../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c" -std=gnu11 -DUSE_HAL_DRIVER -DSTM32WB15xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/ST/STM32_WPAN/utilities/stm_queue.d" -MT"Middlewares/ST/STM32_WPAN/utilities/stm_queue.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/ST/STM32_WPAN/utilities/stm_queue.o"
                 from ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h:98,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h:29,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h:28,
                 from ../Core/Inc/stm32wbxx_hal_conf.h:204,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h:29,
                 from ../Core/Inc/main.h:30,
                 from ../STM32_WPAN/App/p2p_server_app.c:22:
../Drivers/CMSIS/Include/cmsis_gcc.h: In function '__get_CONTROL':
../Drivers/CMSIS/Include/cmsis_gcc.h:219:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 {
 ^
In file included from ../Drivers/CMSIS/Include/cmsis_compiler.h:54:0,
                 from ../Drivers/CMSIS/Include/core_cm4.h:162,
                 from ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb15xx.h:134,
                 from ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h:98,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h:29,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h:28,
                 from ../Core/Inc/stm32wbxx_hal_conf.h:204,
                 from ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h:29,
                 from ../Core/Inc/main.h:30,
                 from ../STM32_WPAN/App/app_ble.c:22:
../Drivers/CMSIS/Include/cmsis_gcc.h: In function '__get_CONTROL':
../Drivers/CMSIS/Include/cmsis_gcc.h:219:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 {
 ^
In file included from ../Drivers/CMSIS/Include/cmsis_compiler.h:54:0,
                 from ../Core/Inc/utilities_conf.h:29,
                 from ../Utilities/sequencer/stm32_seq.c:23:
../Drivers/CMSIS/Include/cmsis_gcc.h: In function '__get_CONTROL':
../Drivers/CMSIS/Include/cmsis_gcc.h:219:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 {
 ^
make: *** [Utilities/lpm/tiny_lpm/subdir.mk:18: Utilities/lpm/tiny_lpm/stm32_lpm.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h:30:0,
                 from ../Middlewares/ST/STM32_WPAN/utilities/otp.c:21:
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h: In function '__sputc_r':
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h:687:39: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
                                       ^~~~~~
make: *** [Utilities/sequencer/subdir.mk:18: Utilities/sequencer/stm32_seq.o] Error 1
In file included from ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h:30:0,
                 from ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:21:
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h: In function '__sputc_r':
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h:687:39: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
                                       ^~~~~~
In file included from ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h:30:0,
                 from ../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:23:
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h: In function '__sputc_r':
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h:687:39: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
                                       ^~~~~~
In file included from ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h:30:0,
                 from ../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:22:
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h: In function '__sputc_r':
/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.5.0.202011040924/tools/arm-none-eabi/include/stdio.h:687:39: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
                                       ^~~~~~
make: *** [STM32_WPAN/App/subdir.mk:23: STM32_WPAN/App/p2p_server_app.o] Error 1
make: *** [Middlewares/ST/STM32_WPAN/utilities/subdir.mk:29: Middlewares/ST/STM32_WPAN/utilities/otp.o] Error 1
make: *** [STM32_WPAN/App/subdir.mk:21: STM32_WPAN/App/app_ble.o] Error 1
make: *** [Middlewares/ST/STM32_WPAN/utilities/subdir.mk:27: Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o] Error 1
make: *** [Middlewares/ST/STM32_WPAN/utilities/subdir.mk:31: Middlewares/ST/STM32_WPAN/utilities/stm_list.o] Error 1
make: *** [Middlewares/ST/STM32_WPAN/utilities/subdir.mk:33: Middlewares/ST/STM32_WPAN/utilities/stm_queue.o] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
 
13:29:47 Build Failed. 17 errors, 0 warnings. (took 313ms)

Has anyone had any success in building a Windows based STM32CubeIDE project in a Docker image before?

I want to keep the project using the generated makefiles as I am developing on Windows and using the Docker image in the pipeline. Any help would be appreciated, thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
JNoon.1
Associate III

I worked out how to achieve this.

I created a docker image, which in the dockerfile I copied the STM32CubeIDE folder into /opt. This allowed me to have STM32CubeIDE inside of the docker image.

I also added a path to the stm32cubeide executable to the PATH variable in the dockerfile.

This allowed me to use the headless build options to generate makefiles and build my STM32 projects inside a ubuntu based docker image. I can now run:

"stm32cubeide -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import . -build all".

View solution in original post

2 REPLIES 2
JNoon.1
Associate III

I worked out how to achieve this.

I created a docker image, which in the dockerfile I copied the STM32CubeIDE folder into /opt. This allowed me to have STM32CubeIDE inside of the docker image.

I also added a path to the stm32cubeide executable to the PATH variable in the dockerfile.

This allowed me to use the headless build options to generate makefiles and build my STM32 projects inside a ubuntu based docker image. I can now run:

"stm32cubeide -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import . -build all".

did you get this working in bitbucket pipelines? Would you be willing to share your yml file set up?