Author Topic: stm32f4-discovery toolchain help  (Read 15592 times)

0 Members and 1 Guest are viewing this topic.

Offline Joshuamcd22Topic starter

  • Contributor
  • Posts: 25
  • Country: ca
stm32f4-discovery toolchain help
« on: March 08, 2014, 08:34:42 pm »
Hi,

I've had an stm32f4-discovery board laying around, for a while, and have decided that I want to use it in my next project (a flight controller for my tricopter) but, I am having some trouble getting a toolchain setup, anything free that I have found, is next to impossible to get setup, or has "try before you buy" code size limits. 

As I potentially want to be able to sell my project, I don't want to buy a $200 personal licence, and have to buy a $2000 commercial licence later.  I want to get something for at most $200 (free would be better) that will allow me to (legally) sell a product developed with it.

Any recomendations would be GREAT!

Thanks,
Josh
 

Offline pablintino

  • Contributor
  • Posts: 10
  • Country: es
Re: stm32f4-discovery toolchain help
« Reply #1 on: March 08, 2014, 09:31:57 pm »
Hi, have you checked Coide?. It's free and it works quite good (eclipse based). You only need to install the Coide package and an external compiler (in the past i had tried it with yagarto gcc).
Here are some links:
http://www.coocox.org/coocox_coide.htm
http://www.yagarto.org/
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: stm32f4-discovery toolchain help
« Reply #2 on: March 09, 2014, 12:45:13 am »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #3 on: March 09, 2014, 12:47:57 am »
Quote
I don't want to buy a $200 personal licence,

Easy:

1) make a $199 donation to a charity of your choice; and
2) download a copy of CoIDE.

I would also 2nd the suggestion for the gcc-arm compiler above.
================================
https://dannyelectronics.wordpress.com/
 

Offline Lizerd

  • Contributor
  • Posts: 36
  • Country: se
    • www.lizerd.se
Re: stm32f4-discovery toolchain help
« Reply #4 on: March 09, 2014, 07:27:19 am »
http://www.emblocks.org based on Code:Blocks is great
 

Offline luky315

  • Regular Contributor
  • *
  • Posts: 226
  • Country: at
Re: stm32f4-discovery toolchain help
« Reply #5 on: March 09, 2014, 11:58:11 am »
I have to agree: Em::Blocks is great. Small, fast, direct support for ST-link and the GNU compiler is integrated.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #6 on: March 09, 2014, 01:43:51 pm »
I would 2nd that recommendation for emblocks: it has been my exclusive platform for anything pic24 - I have been an advocate since its beta days. It is an absolute joy to use and infinitely better than anything Microchip has produced.
================================
https://dannyelectronics.wordpress.com/
 

Offline blewisjr

  • Frequent Contributor
  • **
  • Posts: 301
Re: stm32f4-discovery toolchain help
« Reply #7 on: March 09, 2014, 03:09:41 pm »
I don't know about emblocks.  I have been having massive issues with CoIDE.  Something about there servers being totally borked and other crap.  So I decided to try emblocks and the IDE portion seems great but for some reason the code it builds will not run on my STM32F3Discovery.  For some unknown reason I just could not get it to work.  The code is valid code as it is only a slightly modified ST Example to blink a led and the code worked with CoIDE.  Now sadly I have no IDE to use at all because I can't re download CoIDE as there servers are torched.
« Last Edit: March 09, 2014, 03:16:42 pm by blewisjr »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #8 on: March 09, 2014, 03:30:40 pm »
Quote
The code is valid code

IDE is dumb in that it cannot read your mind and you have to set up a project in the IDE so it compiles as expected. Part of the job there is to read the IDE manual and understand how it works so you can make it work for you / your projects.

That's where CoIDE excels - their project wizard is top notch.
================================
https://dannyelectronics.wordpress.com/
 

Offline blewisjr

  • Frequent Contributor
  • **
  • Posts: 301
Re: stm32f4-discovery toolchain help
« Reply #9 on: March 09, 2014, 05:29:48 pm »
Quote
The code is valid code

IDE is dumb in that it cannot read your mind and you have to set up a project in the IDE so it compiles as expected. Part of the job there is to read the IDE manual and understand how it works so you can make it work for you / your projects.

That's where CoIDE excels - their project wizard is top notch.

It seems like it is a problem with their generated startup code etc...  For some reason their code is throwing a Hard Fault.  For now I personally set up a temporary raw eclipse with the arm plugin which worked great.  Not sure how to get debugging working yet tho.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #10 on: March 09, 2014, 06:33:08 pm »
Blaming the chip or the IDE is easy and tempting. But it doesn't help you solve the problem - it only prolongs it. Read the manual(s) and learn the right way of doing things for your tools.

================================
https://dannyelectronics.wordpress.com/
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: stm32f4-discovery toolchain help
« Reply #11 on: March 11, 2014, 07:08:32 am »
One more for CoIDE. I've tried building toolchain from scratch and it kinda worked, but it's very touchy and unstable. CoIDE just works. And it supports a very wide range of STM32 family mcus (definitely not the case with NXP's and Atmel's chips)

I love the smell of FR4 in the morning!
 

Offline blewisjr

  • Frequent Contributor
  • **
  • Posts: 301
Re: stm32f4-discovery toolchain help
« Reply #12 on: March 11, 2014, 12:52:00 pm »
One more for CoIDE. I've tried building toolchain from scratch and it kinda worked, but it's very touchy and unstable. CoIDE just works. And it supports a very wide range of STM32 family mcus (definitely not the case with NXP's and Atmel's chips)

I do agree building the toolchain from scratch at least on windows is not the way to go.  It is actually kind of interesting when you look into it and realize the ARM linux support is actually a lot better then most people think because most of the tools you need to use to build a toolchain from scratch on windows are all linux tools which never seems to work out quite right with all sorts of weird quirky bugs.  CoIDE does just work where other open options have been hit and miss for me at least.  Even with this in mind I am in the process of working out the details of setting up a toolchain in Linux as that is where I am most comfortable.  Everyone has there own preferences I guess.

As for the OP if running windows listen and go for CoIDE it is the best cheap tool you will find period for embedded development on windows with STM chips at least.  If using NXP your best option is probably the LPCExpresso tool which has quite a hefty code size limit not at like 256k I think.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #13 on: March 11, 2014, 01:43:29 pm »
LPCxpresso is a lot clunker (if that's even a word) than CoIDE os emblocks. I would avoid it at all cost: the only time I use it is to flash the LPCxpresso boards for programs developed from keil or iar.

On Lpcxpresso: I have this particular LPCXpresso board that I got from going to a seminar in China. It could not be programmed by the standard lpc-link that comes with lpcxpresso and requires a peculiar piece of driver from a firm that appears to also manufacture (and design?) st-link. That driver also works for IAR but not Keil. Very weird.
================================
https://dannyelectronics.wordpress.com/
 

Offline rhdf

  • Contributor
  • Posts: 44
  • Country: se
Re: stm32f4-discovery toolchain help
« Reply #14 on: August 31, 2015, 10:05:13 pm »
Whats the latest view on CoIDE vs Em::Blocks?
Or maybe go with "normal" Eclipse + yagarto?

"Simple" to use and compatible with STlink would be nice
« Last Edit: August 31, 2015, 10:10:23 pm by rhdf »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: stm32f4-discovery toolchain help
« Reply #15 on: September 01, 2015, 12:29:47 am »
+1 for emblocks

It works with discovery boards without issue.
Just select the  board you have and start coding.

Be aware it a bit tricky if you want to use stm32cube app.
Emblocks uses the older standard peripheral library by default.
Fastest way to get cube code compiling in emblocks is to load into coocox and import that project into emblocks. (You can do it direct but its tricky)

Not that it matter stm32cube is horrible it uses up like 32kB of you flash space loading all its library's and structures.

The old standard peripheral library is better imho

It's a pity too because they could have made stm32cube awesome if it had been able to generate all the raw bitlevel register commands with comments instead of a sea of  library calls


« Last Edit: September 01, 2015, 12:34:16 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline rhdf

  • Contributor
  • Posts: 44
  • Country: se
Re: stm32f4-discovery toolchain help
« Reply #16 on: September 01, 2015, 01:00:02 am »
So... the best solution is to install both ;) ? (if I want to use the cube libs)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9930
  • Country: nz
Re: stm32f4-discovery toolchain help
« Reply #17 on: September 01, 2015, 09:39:41 am »
If your knowledgeable in C and dev environments you could get cube code working in emblocks easy.
I just couldn't figure it out myself, there was some path or setting wrong somewhere.

Getting stm32cube working in coocox was simpler and emblocks can import coocox project files.
So it was a simple way to get it working with all the correct settings.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline old gregg

  • Regular Contributor
  • *
  • Posts: 130
  • Country: 00
Re: stm32f4-discovery toolchain help
« Reply #18 on: September 01, 2015, 09:48:59 pm »
CoIDE is pretty easy to use and install. I got something to work on the board in 1/2 hour. Although it seems to crash easily. In 4 for days, I had to terminate the program quite often.

Also, I'm having trouble to add external libraries. I want to try the ST electronics drivers with examples but no success so far.

Something to do with .a file or something. very annoying.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32f4-discovery toolchain help
« Reply #19 on: September 02, 2015, 07:14:25 am »
I tried both CoIDE and em:blocks. CoIDE was slightly easier to setup, but em:blocks wasn't hard per se either. There are good articles on em:blocks online for everything I searched for in order to get going.

em:blocks IDE and feature seem more complete, also I got occasional weird errors and crashes with CoIDE. I think I am going to stick to em:blocks as it appears more mature and feature rich.
 

Offline rhdf

  • Contributor
  • Posts: 44
  • Country: se
Re: stm32f4-discovery toolchain help
« Reply #20 on: September 03, 2015, 11:14:46 pm »
1: Do I really need Cube?
2: I noticed that the "component repo" in CoIde seems to be remarkably "empty" (and the forum is littered with spam-posts)
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: stm32f4-discovery toolchain help
« Reply #21 on: September 07, 2015, 11:02:19 pm »
No you dont need Cube, you dont want to need cube , i use it only for pin mapping then take screen dumps using these for references during development. One issue with emblocks/embitz, cooide etc is if they support the part you selected to use
if not you have various degrees of problems. I can gladly recomend EB.
« Last Edit: September 07, 2015, 11:12:51 pm by MT »
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32f4-discovery toolchain help
« Reply #22 on: September 08, 2015, 01:44:56 pm »
No you dont need Cube, you dont want to need cube , i use it only for pin mapping then take screen dumps using these for references during development. One issue with emblocks/embitz, cooide etc is if they support the part you selected to use
if not you have various degrees of problems. I can gladly recomend EB.
So far even when the particular model isn't supported you can usually get away with the approximate. They have a major version for each line from what I can tell. For instance I am using a F070 chip currently, but the closest they have is support for F071. So I've been using the setup for F071, since 071 has more features than the 070 I am using I just have to be careful not to use registers that aren't supported on 070. Haven't ran into any issues yet, but I could go in and manually modify all the project files to match if need be.
 

Offline Gabri74

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: stm32f4-discovery toolchain help
« Reply #23 on: September 08, 2015, 04:24:38 pm »
It is proprietary, but I guess Keil uVision/mdk-karm is the fastest way to setup a project for a stm32 dev board.
The downloadable version is free to use but has some code size limitations, see: http://www.keil.com/demo/limits.asp
I suggest you to try the old 4.x branch series, because starting with the 5.x series you must download a separate
MCU support library for every MCU family and is a bit confusing for new users.

Here you can find the 5.16 version (I've already filled and bypassed the personal-info-sourvey you need
to complete to obtain the download link. Not sure how long this link will be valid)
http://www.keil.com/fid/oj5atuw53j1j1w6sah11bwrwywxd6y2w09yxd1/files/eval/mdk516a.exe
If the above link does not work, use this and fill random info into all the fileds. A valid email is NOT needed ;)
https://www.keil.com/demo/eval/arm.htm

Here you will find the 4.74 version (SUGGESTED):
direct link:  http://www.keil.com/fid/5g5s5fwlgtwj1w2xe411yd9b0w3ohujmwijw11/files/eval/mdk474.exe
If the above link does not work, use this and fill random info into all the fileds. A valid email is NOT needed ;)
https://www.keil.com/demo/eval/armv4.htm

Note that uVision4.74 will also work fine in Linux under wine. Versione 5.16 has some issues with MCU packages installer.

NB: if you look around, you will find some keygen to generate a valid full license: PLEASE DO NOT USE THEM
because at least a couple of them are known trojans.
 

Offline Gabri74

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: stm32f4-discovery toolchain help
« Reply #24 on: September 08, 2015, 04:26:46 pm »
If the above link does not work, use this and fill random info into all the fileds. A valid email is NOT needed ;)

I mean a real email. Valid email is needed. This will suffice: https://10minutemail.com/10MinuteMail/index.html
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf