STM32CubeMX generates gcc makefiles now

Rick Kimball
Sat Jul 15, 2017 4:17 pm
I’ve been using STM32CubeMX for a while now with the SW4STM32 ide. However, I missed that they recently added the ability to generate simple makefiles that work with arm-none-eabi-gcc

Good job ST!

http://hackaday.com/2017/07/15/stm32cub … makefiles/


sheepdoll
Sat Jul 15, 2017 6:13 pm
Nice to see official support for makefiles. There have been a number of 3rd party scripts to do this, including mine.

I have been busy with other projects recently so have not upgraded the Cube MX tool. Probably time to do so.


goran.mahovlic
Sat Jul 15, 2017 7:34 pm
Im using Makefile from cubeMx for a few days.
And there are some issues :)

If you generate some simple stuff like few GPIOa.
Then next time add something like i2c or any other peripheral.
It will not add c files in Makefile (you need to add them manualy)
If you delete Makefile it will not recreate it.

I think that rest was ok, and using it with gdb -tui then is great to ;)


Rick Kimball
Sat Jul 15, 2017 8:04 pm
[goran.mahovlic – Sat Jul 15, 2017 7:34 pm] –
If you generate some simple stuff like few GPIOa.
Then next time add something like i2c or any other peripheral.
It will not add c files in Makefile (you need to add them manualy)
If you delete Makefile it will not recreate it.

I just tried this with the STM32VLDIscovery board. I deleted the Makefile, then added a UART to the pinmap. It recreated the Makefile and added the hal_uart.c file. Maybe you are using different code generation features than me?

stm32cubemx.png
stm32cubemx.png (32.08 KiB) Viewed 1127 times

RogerClark
Sat Jul 15, 2017 9:12 pm
Rick,

Is “Copy” the default for you?

Are you using Linux or Windows?


Rick Kimball
Sat Jul 15, 2017 10:22 pm
Yes copy is the default for me. I’m using Ubuntu 16.04 LTS

RogerClark
Sun Jul 16, 2017 1:31 am
[Rick Kimball – Sat Jul 15, 2017 10:22 pm] –
Yes copy is the default for me. I’m using Ubuntu 16.04 LTS

Thanks


goran.mahovlic
Sun Jul 16, 2017 9:35 am
Tnx.
Will retest now.
I see I do not have newest cubeMx (downloading now), and did not set copy all (instead I have selected copy necessary)

goran.mahovlic
Sun Jul 16, 2017 10:21 am
For now all seams to work…
I still cannot read or write to eeprom that is connected to I2C but that is probably some other problem …

ddrown
Sun Jul 16, 2017 4:57 pm
I used this with my latest project. It got the name of the USB middleware filenames wrong, but otherwise worked.

zmemw16
Sun Jul 16, 2017 5:52 pm
no doubt it was a rtfm issue or a noddy, had to set the binpath for the arm compiler.
stephen

Leave a Reply

Your email address will not be published. Required fields are marked *