cancel
Showing results for 
Search instead for 
Did you mean: 

Open source tools for the STM32

lanchon
Associate III
Posted on September 19, 2009 at 01:43

Open source tools for the STM32

66 REPLIES 66
sjo
Associate II
Posted on May 17, 2011 at 12:17

Personally i think you need to research a bit more about GPL licensing.

A lot of the individuals/companies who submit time/code to the open source community also have to make a living.

A good example is codesourcery, if it was not for them the cortex-m3 support in gcc would not exist.

You can download the toolchain from them for free, but to get the full eclipse ide etc you have to purchase a licence.

To me this is perfectly acceptable, as i said before they have to make a living somehow.

The phrase ''you pay for what you get'' applies as usual.

Regards

sjo

lanchon
Associate III
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.)

ericengler9
Associate II
Posted on May 17, 2011 at 12:17

I have no problem with reasonable license restrictions, and I'm quite sure it's not a problem to have a closed source IDE for GNU tools. The only GPL issue is that any changes to actual GNU code have to be made available publicly. An IDE is a totally separate application. I'm guessing there may be a few gcc and/or library tweaks for the STM32, probably related to debugging. Otherwise, the CodeSourcery changes to support Thumb2 code generation are probably adequate (I understand they've recently improved this so I hope these changes are brought forward for us to use).

But I have a question about RLink support on linux. Is there any? Or do we have to use a JTAGKey or the Olimex emulator? I assume third party emulators will work on the STM32 is the normal JTAG mode?

Eric

giles
Associate II
Posted on May 17, 2011 at 12:17

I use OpenOCD and the anglias build of the gnu toolchain,

Its not size limited. I'm pretty sure it has thumb2 support (and i'm sure someone will correct me soon if not). Their idealist ide is simple enough to use.

As far as debug hardware goes, i use an (olimex) parrellel port wiggler at work and a amontek tiny usb jtag at home (though i haven't yet tested the usb one with the stm32 the wiggler certainly works) both are around $30 if i remember right.

If you don't want want to use the anglia ide just use a text editor, make files, and insight from command prompt without the ide (which is what i do).

francis
Associate II
Posted on May 17, 2011 at 12:17

Rodrigo,

you are right: the RIDE7 ''free'' debugger is limited up to 32KB and it requires the RLink adapter that is not free, but not so expensive (http://dkc3.digikey.com/PDF/EU071/P0421.pdf). I consider that 32KB is quite comfortable for many applications: all the applications available on the STM32circle.com website -including the CircleOS- can be debugged with the 32KB version. Regarding the stability: RIDE7 is young (it really came with the STM32) but it is quickly converging. I cannot say that I never crashed with RIDE7, but I say that I have worked many long days without any problem. Now, you are absolutely free not to use it.

sjo
Associate II
Posted on May 17, 2011 at 12:17

The rlink is not supported under linux.

All codesourcery gcc source is available. It will eventually make it into the mainline gcc branch, once it is validated and fully tested.

Prebuilt binaries are also available from codesourcery for most common hosts.

For open-source linux development you can use the olimex or any ftdi based jtag tool and openocd. These currently do not support the swd interface, but the standard jtag interface works ok.

Cheers

sjo

mcatudal
Associate II
Posted on May 17, 2011 at 12:17

I am working on getting my Eclipse + gcc system to work with the MCB2130 board that I won the ARM seminar. I am still working on getting gdb to work with eclipse. The plugin for zylin doesn't work with Fedora 8 so I am writing my own plugin. I have the compiler working correctly with interworks, even with the library.

My next task is to get my STM32 board (not received yet) to work with my working eclipse. I have support for Cortex in my GCC compiler but haven't tested it yet since I haven't received the STM32 board.

I will write the support for the STM32 using the serial link. I will do something similar to what openocd does (gdb server). It will be on my web site when I am done. Just use google to find my web site.

Sorry windows users, I have no plan to port my code to windows, someone else will have to do that. I draw the line with windows, OK at the office,

but at home, when hell freezes over.

Michel

sjo
Associate II
Posted on May 17, 2011 at 12:17

Last time i tried fedora works fine with eclipse and zylin plugin.

Why would you want to write a gdbserver when openocd already provides this functionality?

Cheers

sjo

mcatudal
Associate II
Posted on May 17, 2011 at 12:17

It must have been a while. It was working on Fedora 6 but on Fedora 8 the debugger calls gdb when using zylin. They must have broken it with the latest version unless is is an eclipse issue.

My plugin will be better and will work. I added support similar to that of the winarm plugin for creating makefiles. I don't put any support for windows in my plugin, it is strictly Linux. On windows I use IAR and only at work. Even if I had a free IAR I would not use it at home unless it was a Linux version.

You're not serious are you? Openocd doesn't support the two wires debugging, only JTAG. I haven't decided yet whether it will be a fork of OpendOCD or an other option to OpenOCD. OpenOCD is JTAG only.

sjo
Associate II
Posted on May 17, 2011 at 12:17

When you say two wire debugging are you referring to serial uart or swd?

True openocd currently only support jtag, but in time it will also support swd.

Cheers

sjo