Running an impulse with custom STM32 firmware; Eclipse errors


I have been following the tutorial here to set up CubeMX for compiling my own firmware for an STM32 target (I’m using the same board as the tutorial, the B-L475E-IOT01A).

I’ve created a new project in CubeMX, converted to C++ (and renamed main.c to main.cpp) and ensured everything compiled ok and runs on the target (I’m using STM32CubeIDE). However after adding the CMSIS-PACK to the project it will no longer compile.

I also noticed that in step 11 of the tutorial it states that I should add the library by hand in the G++ Linker section of the project’s properties, though I only have an option for ‘GCC Linker’, not G++:

When compiling the project (with the library reference added to the GCC Linker section in Eclipse) I get errors with multiple definitions (of ‘_sbrk’ in ‘/Debug/…/Src/sysmem.c’) and ‘Default_Handler’ (in ‘/Debug/…/Startup/startup_stm32l475xx.s’).

Has anyone come across this? Any help would be appreciated!


@angus sorry for the late reply. It’s weird though, I have the C++ Settings here:

Could you email me the project folder? I’ll take a look.

Thanks @janjongboom!

Odd that I don’t have this option - I’ll keep digging… (oh, and sorry for tagging it as a bug - I know it’s nothing to do with Edge Impulse code!).

Email with the project on its way.