I'm trying to create a STM32CubeMX project using Makefiles. I implemented a simple Blink example which toggles PC13 pin of a stm32f103c8t6 MCU.
When I launch the "make" command, several errors of "multiple definitions" are shown, but they are easily fixable by removing duplicated source files in Makefile (it might be a bug).
After fixing this, the "make" command generates an elf, a bin and an hex file. I tried to flash bin and hex files in different ways: using stm32flash through serial, using st-flasher through st-link and using openOCD, but nothing made the led blinks.
After that, I tried using SW4STM Eclipse-based IDE, using exactly the same program, but in this case, compilation is successful, flashing is successful, and then, the program works.
I'm trying to replicate the building and flashing proccess that Eclipse follows in order to replicate it in that Makefile.
Any ideas of what is wrong?
I'm using Ubuntu 18.04, with arm-gcc ubuntu repository version.