STM32CubeMX generates gcc makefiles now

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

STM32CubeMX generates gcc makefiles now

Post by 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/
-rick

User avatar
sheepdoll
Posts: 241
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: STM32CubeMX generates gcc makefiles now

Post by 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
Posts: 53
Joined: Fri May 26, 2017 9:01 pm

Re: STM32CubeMX generates gcc makefiles now

Post by 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 ;)

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: STM32CubeMX generates gcc makefiles now

Post by Rick Kimball » Sat Jul 15, 2017 8:04 pm

goran.mahovlic wrote:
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 529 times
-rick

User avatar
RogerClark
Posts: 7686
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32CubeMX generates gcc makefiles now

Post by RogerClark » Sat Jul 15, 2017 9:12 pm

Rick,

Is "Copy" the default for you?

Are you using Linux or Windows?

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: STM32CubeMX generates gcc makefiles now

Post by Rick Kimball » Sat Jul 15, 2017 10:22 pm

Yes copy is the default for me. I'm using Ubuntu 16.04 LTS
-rick

User avatar
RogerClark
Posts: 7686
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32CubeMX generates gcc makefiles now

Post by RogerClark » Sun Jul 16, 2017 1:31 am

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

goran.mahovlic
Posts: 53
Joined: Fri May 26, 2017 9:01 pm

Re: STM32CubeMX generates gcc makefiles now

Post by 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
Posts: 53
Joined: Fri May 26, 2017 9:01 pm

Re: STM32CubeMX generates gcc makefiles now

Post by 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 ...

User avatar
ddrown
Posts: 154
Joined: Sat Jan 09, 2016 4:49 am

Re: STM32CubeMX generates gcc makefiles now

Post by 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.

Post Reply