Skip to main content
lanchon
Associate III
Sep 18, 2009 11:43 PM UTC
Question

Open source tools for the STM32

Posted on September 19, 2009 at 01:43

Open source tools for the STM32

    This topic has been closed for replies.

    66 replies

    lanchon
    lanchonAuthor
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Hi ST1,

    Thanks, that really seems like a promising link. I don't know how much work it is to configure codesourcery for the STM32, I hope not much.

    BTW, do you have an opinion on Anglia's tools?

    Thanks!

    16-32micros
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Dear lanchon,

    I made a search on internet, and I found an interesting Fully free tool for Cortex-M3 based on Eclipse and GNU GCC for ARM tools suite from Codesourcery and could be very interesting for STM32 :

    Here the link :

    http://www.emedt.com/armdt/

    . The full Package Download is about 158MBytes :

    http://www.emedt.com/eclipse/armdt-allinone.zip

    .

    I haven't tested it yet but I will try it during the weekend if I have some time, or you can do it as well. For the JTAG tool it seems there are some schematics to use a PC LPT port too. :D

    Regards, STOne-32

    lanchon
    lanchonAuthor
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Hi friends,

    I'd like to adopt the STM32 family but I absolutely require open source development tools, and in particular tools that aren't crippled or aren't at risk of being crippled by tool vendors.

    I need:

    -C/C++ toolchain

    -STM32 include files, libs, startup code, and linker scripts

    -code flashing (open source JTAG or maybe serial upload via bootloader)

    -optional IDE

    -optional debugging

    There's this compiler:

    http://www.codesourcery.com/gnu_toolchains/arm

    based on GCC 4.2.1. (But then they want to SELL Eclipse... makes me want to avoid dealing with them at all.) But what about STM32 include files, libs, startup code, and linker scripts? IDE integration? Debugging?

    Then there's Anglia's STR7 Toolchain:

    http://www.st-angliamicro.com/software.asp

    based on GCC 4.2.0 (from codesourcery?). Does it do Thumb2? Does it support the STM32 family off the shelf? Somebody tried it?

    gnuarm doesn't seem to do cortex-M3.

    There's OpenOCD for debugging:

    http://openocd.berlios.de/web/

    Does it work with the STM32 family?

    And then there a couple of IDEs that tool vendors want to push. Some of them use GCC, but there's still the danger of subtle vendor lock-ins I'd like to avoid, and you can forget about open source and open hardware debugging.

    My question is, is there a free integrated suite for the STM32? If not what's the next best thing? What's driving Anglia? Do they want to push their debugger dongles for instance? (ie: do they cripple debugging?)

    I think that if you take your time you can get things to work, but I don't have the time so I'm considering AVR32. Atmel pushes the architecture with an open source IDE. I think ST should do this instead of dancing for IAR and company, it's such a waste of time for us.

    Thanks!

    lanchon
    lanchonAuthor
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Hi sjo,

    Thanks for your detailed answer and for sharing your work on OpenOCD and IDEaliST with the community. It's great to know you are around this forum.

    However I'd be lying if I didn't tell you that I resent a bit the requirement to obtain a free license to use IDEaliST. AFAIK the GPL explicitly forbids placing any additional requirements on licensees, and forcing additional requirements in the form of an overlaid mandatory license automatically revokes *your* GPL license, including your rights to distribute the GPL'd code. So when you distribute GPL code with an overlaid license you are actually ''pirating'' copyrighted software over which you have no rights.

    Such additional license agreements are probably completely void, so one could click through anything without worrying too much. But in my case I tend to punish the licensor by completely avoiding their products or services for any purpose. I just want to be in better company.

    I consider stealing from the community to be a grave offense, and yet most companies that try it get away with it. That's why the community should be alert and making sure that when a company does these things they are actually shooting themselves in the foot. That's why you'll never find me using these commercial IDEs based on GCC. Also, a many of the microprocessor companies can be easily discarded based on their stance on GCC, like Microchip with it's C30.

    I don't know whether IDEaliST has these license problems or not. I hope they can be fixed soon if it has them. Please don't take any of this personally, and be assured that I'm most thankful for your post and your work with the open source community.

    Best regards,

    Lanchon

    16-32micros
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Hi sjo,

    Thank you very much for details, I appreciate a lot for work of Anglia.

    Now I think to future of Cortex-M3 is to become famous and be the standard of 32-bits micros like the success done by 8051. For this, There is a lot of work to be done in Free Compilers side to fully support Cortex-M3 ( compact density and best performance) and to provide complete free toolchains with minimum $$ and why not with Zero $.

    I wonder if you have done some comparison between Most Known compilers

    (ARM/Keil, IAR, Tasking, and Gnu ) to be shared . Thank you.

    Regards, STOne-32

    sjo
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Hi,

    I work on the IDEaliST tools so here are my comments:

    The ide was originally created for the st6 c compiler many years ago.

    Support for upsd (using sdcc) and lately st arm micros were added.

    We have a lot of experience with the gnu tools for various platforms so thought we would make the tools we use internally available to everyone.

    The idea is to provide a low cost start for our customers, as anyone who has played with the gnu tools will appreciate it can be a long learning curve.

    It is not locked in any way, and supports all the jtag tools that openocd does. The only thing you have to do is request a free licence.

    Yes we support all the ST arm micros including the stm32, our compiler is based on the codesourcery branch of gcc with a few tweaks.

    We include the st arm libs prebuilt to make using them much easier.

    I am also a developer on the Openocd project and yes it supports the stm32 - all the st micro support is maintained by me.

    Openocd is the debug server used within Anglia's ide/toolchain.

    gnuarm uses the mainline gcc, and at the moment it does not support cortex-m3.

    Regards

    sjo

    francis
    Visitor II
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    You can download from the stm32circle web site (http://www.stm32circle.com/hom/index.php) a free IDE (RIDE7) with a free compiler (GCC). These tools are also available on the Raisonance WEB site.

    Moreover, you find there some open source code too.

    lanchon
    lanchonAuthor
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    Thanks for clearing that up. I'm just too tired of companies bulldozing over the rights of the community. I've reported every misuse of the GCC to the FSF but they seem not to care much, and probably that's why everyone is stealing their code: screwing people just works for them. I guess you being involved in open source are maybe as tired of this as I am.

    The IDE license is a problem for me. Not being open source, if I invest in learning how to use it I run the risk of loosing my investment any time, from eat-now-pay-latter risks, to focus shifts, to even the company going under. Many companies promise they will always be there for you, but I value immensely more the being irrevocably here with you now of GPL over any promises.

    I never intended to imply that you didn't comply with GPL, in fact I haven't even tried IDEaliST, I'm sorry if that came out wrong. If anything the most important message I have for you is a big thank you for working on open source tools.

    Best,

    Lanchon

    sjo
    Associate III
    May 17, 2011 10:16 AM UTC
    Posted on May 17, 2011 at 12:16

    The licence is required for the ide, the toolchain can be downloaded and used however you like.

    The licence is purely for tracking downloads/use, and has no other restriction.

    We fully comply with all GPL licences - I have been developing code in open source arena for many years and am fully aware of what i should/should not do.

    If you need to go fully open source you can either download codesourcery/Anglia toolchain and use eclipse/codeblocks for the ide.

    Regards

    sjo

    lanchon
    lanchonAuthor
    Associate III
    May 17, 2011 10:17 AM UTC
    Posted on May 17, 2011 at 12:17

    I don't share your belief that I should research more about GPL licensing. I do think that when people expose their personal beliefs they should attach some sort of rationale to them, if the comments are to be meaningful to other people.

    I'm not familiar with the status of codesourcery (that IS something I could research if I were so inclined, which I'm not). However, your argument ''if it was not for them the cortex-m3 support in gcc would not exist'' coupled with their need to make a living seems to imply that they are somehow above GPL restrictions.

    They are not. It's not what's best for you, it's not give me cortex support please, it's respect the GPL copyright holder's rights. If you can't make a living go sell sausages, but don't steal GPL software. (Besides, ARM would pay for free GCC support for cortex-m3 if needed; or they could just fail to push their core into mainstream, what do I care.)

    Note that I'm responding to your argument and not judging codesourcery. I don't have a clue about what they are doing.

    I couldn't understand what you meant by ''you pay for what you get''. If you meant ''you get what you pay for'' I have to completely disagree. That's just a silly phrase that people repeat but couldn't be more removed from the truth. The human mind seems to correlate value with price but that is a silly illusion. It takes a lot of work to compare value, so a lot of lazy people just compare price instead. Many companies sell the same product under different names and prices, and many people buy the higher priced brand convinced that it's better, probably misguided by a mixture of marketing and ''you get what you pay for'' thinking.

    You can also compare Linux and XP (or worse, Vista) and see for yourself how much of ''you get what you pay for'' is really true. But let's not comment on our personal results on this thread.

    Even if ''you get what you pay for'' were true, it'd still be a non issue here. Your desires or needs of higher quality tools would not give codesourcery any rights to steal GPL software.

    You say ''to me this is perfectly acceptable, as i said before they have to make a living somehow'' and I respect your view. I encourage you to give away ''better''-than-GPL licenses for your GPL'd code to selected individuals or companies that you feel indebted to, but you of course can't offer rights to code for which you don't own the copyright. Your view of what's acceptable may have strong weight on parts of OpenOCD but it doesn't apply to eclipse/gcc/etc, or my GPL'd code for that matter.

    There are many companies in the embedded world that are stealing GPL software. If you're not aware of this and you're interested I could bring up some examples. Of course companies are not evil, they just want to make money. It's up to us to make sure that stealing from the community is a loosing strategy for them. Or be prepared to be robbed.

    Best,

    Rodrigo

    @francis,

    Thanks, I'm aware of RIDE7 but I meant free as in freedom (not as in beer). The debug-limited RIDE7 is gratis but not libre. (I've also read reports that RIDE7 hangs up often.)