cancel
Showing results for 
Search instead for 
Did you mean: 

Converting STM32CubeIDE project to Makefile issues

Pkarra
Visitor

Hello,

I've been running into issues porting a simple blinking LED program from STM32CubeIDE to a Makefile based app. I have the exact Drivers (as a submodule that links to the one STM32l0x from github: https://github.com/STMicroelectronics/STM32CubeL0) and the source code is pretty simple. I'm able to create a build directory where I build all the libraries, source code and assembly file. The linking process also seems to work. However, the generated elf on the STM32l031k6 nucleo board doesn't run. 

I wondered if the GNU make tools were different and possibly causing an issue. The STM32CubeIDE uses gnu-tools patched by stm (https://github.com/STMicroelectronics/gnu-tools-for-stm32) compared to the one I'm using on Windows wsl (gnu v10.3.1). I ran into issues with installing the `gnu-tools-for-stm32` and a previous forum mentioned using the --skip_steps but that didn't work either. I doubt using a regular version of gnu toolchain will have caused this error. 

I tried using the CubeIDE to debug the elf file I created. I ran into a HardFault_Interrupt.

I compared the make outputs from the IDE with the Makefile one that I created and they're pretty identical (besides the include path which will be different).

Attached is my Makefile.

Any help will be appreciated.

0 REPLIES 0