cancel
Showing results for 
Search instead for 
Did you mean: 

Keep getting error ""make -j12 all" terminated with exit code 2. Build might be incomplete"

BRich.1
Associate II

Keep getting this error after compiling a new project that only contains one header file. I'm using STM32CubeIDE version 1.3.0 on Linux Ubuntu. I try to use clean project and it cleans it only for this same error to re-appear when starting up the debugging. How do I get around this error?

Full error description:

make: *** [makefile:43: STM32F446RE_Drivers.elf] Error 1

"make -j12 all" terminated with exit code 2. Build might be incomplete.

12 REPLIES 12

And there's nothing else in the output just these two lines?

JW

BRich.1
Associate II

Correct - just those 2, everything else came out normal

berendi
Principal

> a new project that only contains one header file

There should be at least a .c or .s source file as well.

What's exactly "everything else came out normal"?

Remove the parallel call to make (i.e. the -j switch) and rebuild. Capture and post the complete command-line and the complete console output.

I loathe the eclipsoids so don't know how to do this.

> There should be at least a .c or .s source file as well.

It's CubeIDE so it's unlikely there are less than several dozens of .c sources from the "library" and auto-generated. The very purpose of *any* IDE is to hide the "nasty details" from the users, so they are unaware of the real working of things. This is great until the first glitch, whatever is its cause. It's the very same paradigm as that behind the clicky generator and the "libraries".

JW

CubeIDE will generate a really empty project if you ask it nicely. But I've tried it now, it is smart enough to complain when there are no compilable source files in it.

BRich.1
Associate II

Actually yes - I wasn't clear, I apologize- there is a main.c and the header file is #include in it and THAT part compiles fine since I added it in the build settings. Is there a way I can show it to make it easier to see? WHen I said "everything else came out normal" - i.e. no other errors or anything that would stand out.

Remove the parallel call to make (i.e. the -j switch) and rebuild. Capture and post the complete command-line and the complete console output.

BRich.1
Associate II

Seemed to work after adjusting the builder settings such that 'Builder Type' = 'Internal Builder' and 'Build Command' = make. Attached is the build script, theres 4 warnings and no errors, guess that means it's ok

Build is shown below:

23:20:47 **** Incremental Build of configuration Debug for project STM32F446RE_Drivers ****

Info: Internal Builder is used for build

arm-none-eabi-gcc ../Src/main.c -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DDEBUG -c -I../Inc -I/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/drivers/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfloat-abi=hard -mthumb -o Src/main.o

arm-none-eabi-gcc ../drivers/src/GPIO_STM32F446RE.c -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DDEBUG -c -I../Inc -I/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/drivers/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfloat-abi=hard -mthumb -o drivers/src/GPIO_STM32F446RE.o

arm-none-eabi-gcc ../drivers/src/SPI_STM32F446RE.c -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DDEBUG -c -I../Inc -I/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/drivers/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfloat-abi=hard -mthumb -o drivers/src/SPI_STM32F446RE.o

arm-none-eabi-gcc ../Src/sysmem.c -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DDEBUG -c -I../Inc -I/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/drivers/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfloat-abi=hard -mthumb -o Src/sysmem.o

arm-none-eabi-gcc ../Src/syscalls.c -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DSTM32F4 -DSTM32F446RETx -DDEBUG -c -I../Inc -I/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/drivers/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfloat-abi=hard -mthumb -o Src/syscalls.o

../drivers/src/SPI_STM32F446RE.c: In function 'SPI_TXE_INTERRUPT_HANDLE':

../drivers/src/SPI_STM32F446RE.c:481:51: warning: assignment makes integer from pointer without a cast [-Wint-conversion]

    pSPIHandle->pSPIx->SPI_DR = pSPIHandle->TxLen = pSPIHandle->pTxBuffer; //dereference (get value) given SPI data register to equal dereferenced temp value stored in the functions buffer

                                                  ^

../drivers/src/SPI_STM32F446RE.c:489:5: warning: implicit declaration of function 'SPI_ApplicationEventCallBack' [-Wimplicit-function-declaration]

    SPI_ApplicationEventCallBack(pSPIHandle, SPI_EVENT_TX_COMPLETE);

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/src/SPI_STM32F446RE.c: In function 'SPI_OVR_ERR_INTERRUPT_HANDLE':

../drivers/src/SPI_STM32F446RE.c:533:9: warning: assignment makes integer from pointer without a cast [-Wint-conversion]

   temp = NULL;

        ^

../drivers/src/SPI_STM32F446RE.c:526:11: warning: variable 'temp' set but not used [-Wunused-but-set-variable]

  uint8_t temp;

          ^~~~

arm-none-eabi-gcc -o STM32F446RE_Drivers.elf Src/main.o Src/syscalls.o Src/sysmem.o drivers/src/GPIO_STM32F446RE.o drivers/src/SPI_STM32F446RE.o -mcpu=cortex-m4 -T/home/brendan/STM32CubeIDE/workspace_1.3.0/STM32F446RE_Drivers/STM32F446RETX_FLASH.ld --specs=nosys.specs -Wl,-Map=STM32F446RE_Drivers.map -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: Src/main.o uses VFP register arguments, STM32F446RE_Drivers.elf does not

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file Src/main.o

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: Src/syscalls.o uses VFP register arguments, STM32F446RE_Drivers.elf does not

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file Src/syscalls.o

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: Src/sysmem.o uses VFP register arguments, STM32F446RE_Drivers.elf does not

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file Src/sysmem.o

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: drivers/src/GPIO_STM32F446RE.o uses VFP register arguments, STM32F446RE_Drivers.elf does not

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file drivers/src/GPIO_STM32F446RE.o

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: drivers/src/SPI_STM32F446RE.o uses VFP register arguments, STM32F446RE_Drivers.elf does not

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file drivers/src/SPI_STM32F446RE.o

/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol Reset_Handler; defaulting to 0000000008000000

collect2: error: ld returned 1 exit status

Info: Parallel threads used: 5

23:20:48 Build Finished. 0 errors, 4 warnings. (took 1s.91ms)

So it's solved? If so please chose your post as Best so that the thread is marked as solved.

JW