STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
Post Reply
User avatar
ahull
Posts: 1597
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by ahull » Tue Aug 22, 2017 10:08 am

Youtube suggested this three part tutorial to me.

They look pretty useful, however my lack of free time precludes me from going through them.







Let me know your thoughts. :D
- Andy Hull -

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

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by Rick Kimball » Tue Aug 22, 2017 8:53 pm

I took a quick look at the beginning of the first video and he is focused on using a strange mix of eclipse + gnu eclipse plugin + jlink tools. This might have been a reasonable approach some 5 years ago.

The path of least resistance solution in 2017 is:
Once you have everything installed you end up with the STM32CubeMX code generator that is integrated with SW4STM32 with a gnu-arm-none-eabi toolchain w/openocd already configured for st-link devices. STM32CubeMX will generate code for SW4STM32 and then offer you the option to launch an eclipse project after the end of code generation. All you need to provide is any stm32 dev board and an st-link programmer device. The easiest route for those in the US is to buy a Nucleo-F103RB board (assuming you also want to work stm32duino/libmaple) or buy a BluePill and an ST-Link Clone from ebay.

SW4STM32 is an eclipse distribution that includes all the required binary tools and configuration files for STM32 chips integrated as a single download. It has been put together by http://www.ac6.fr/ and "I think/I'm guessing" funded by ST.

While Jan is providing a way that works, it is certainly more painful than the above solution.
-rick

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

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by RogerClark » Tue Aug 22, 2017 10:01 pm

I briefly looked at the videos, but found them very slow and yet did not explain clearly what he was doing.

In addition to what Rick said..
On Windows you can download and use Atollic True Studio for free, and the STMCube directly outputs project files for it.
AFIK, The license on True Studio allows full free use of the basic version without and restrictions e.g allows for commercial dev.

zmemw16
Posts: 1420
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by zmemw16 » Tue Aug 29, 2017 3:25 am

@Rick,
surprisingly easy, hal stm32f103ze from cubemx compiled, etc, etc.
debug, just watching a variable changing, nothing further.

any ideas on how i can apply it's already configured debug setup with an arduino stm32 elf/bin ?
another thought is how would i export the arduino source tree into sw4stm32 ?

stephen

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

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by Rick Kimball » Tue Aug 29, 2017 3:59 am

zmemw16 wrote:
Tue Aug 29, 2017 3:25 am
any ideas on how i can apply it's already configured debug setup with an arduino stm32 elf/bin ?
another thought is how would i export the arduino source tree into sw4stm32 ?
A long time ago I posted an eclipse project that imported the stm32 arduino libmaple stuff. It is a lot of work to keep it up to date. You have to setup all the configuration variables / settings / paths ... not worth the effort.

Sloeber is an attempt to make using the eclipse + arduino a simple thing. However, that seems to have its own set of issues.

My personal take is that if you want to do arduino, you should just use arduino. If you want to do HAL coding just do HAL coding and use STM32CUBEMX + SW4STM32. You can always use an external editor to make the coding easier for Arduino.
-rick

User avatar
Pito
Posts: 1531
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by Pito » Tue Aug 29, 2017 7:58 am

What are the issues with Sloeber actually?
Pukao Hats Cleaning Services Ltd.

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

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by RogerClark » Tue Aug 29, 2017 8:00 am

Pito wrote:
Tue Aug 29, 2017 7:58 am
What are the issues with Sloeber actually?
There is are several threads about Sloeber issues already. Its probably best not to go through things all over again in this thread

Its best to not go too far off topic, as this thread is about those videos that were recommended (by youtube) for Andy

User avatar
Pito
Posts: 1531
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by Pito » Tue Aug 29, 2017 8:05 am

A rhetorical question.. :)
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1420
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: STM32 with Eclipse, STM32Cube, GNU ARM and J-Link.

Post by zmemw16 » Tue Aug 29, 2017 11:22 am

easy to in arduino, array of pa8,pb7,pc4 etc, set all as outputs and high in a loop, sweep over them with a low and and high. checks the wiring and easy to check on logic sniffer - blips in a nice row of ducks across & down the screen - doddle
even after umteen years i still have to work at c/really hard for c++,, bare metal even in cubemx and sw4stm32;it's still a bit steep. all the little snippets just to get to a serial o/p, printf - keep going et al; all freebies in arduino.

stephen

Post Reply