views:

2373

answers:

7

I'm starting a project with a STMicro STM32. I've done the Google searches, looking for solid compiler/debugger chains but would prefer answers with success stories.

Open Source Compilers/Linkers would be ideal, I just don't know if their STM32 toolchains are stable yet. (Both C, C++ compilers are acceptable). -- So commercial options are acceptable as well.

Do any of you have useful suggestions?

+2  A: 

For all things ARM, I'm a fan of Rowley Associates "Crossworks for ARM".

I've used all the major toolsets, some for years, including ARM/Keil, IAR, GCC variants (actually Crossworks for ARM does use GNU, but CrossStudio's a whole lot more than just a compiler/linker). When it comes to my own personal projects, I choose Rowley. Their support is helpful, knowledgeable & speedy too.

Also Rowley provides lots of BSP code so you can get up & running quickly.

IAR is good, but it's expensive, and it doesn't offer anything that I need or would pay extra for.

In my current job I (am forced to) use the Keil tools and they're a bit cumbersome, they just seem dated. I also encountered a problem with the debugger (this was a Luminary chip, not the STM32, but I'm sure the same issue would apply.)

As you know there are other players such as Raisonance (sp?), Green Hills, Code Red, etc... I haven't used any of these, I can't say anything good or bad.

Dan
+1  A: 

We've been using the Keil tools for a while now, with few problems.

In its favour, it's a relatively cheap way to get started on the STM32. You can buy a evaluation board for about £100, which includes the compiler, and is good up to 32 Kb. It also features one of the best debuggers (hardware and software) that I've ever used.

On the other hand, I found the IDE usable but lacking a lot of features you'll find elsewhere.

ST also provide a firmware library which abstracts away some of the low-level details of programming for their chip.

Steve Melnikoff
+2  A: 

The stm32 is a cortex-m3 which is thumb2 only. Gcc from 3.x to the present will work as they can produce thumb code. Thumb2 includes all of thumb plus a few more instructions. Unless you are using assembler you can get by with thumb for now and then, now in the near future or in the distant future make sure you have it building and optimizing for thumb2 for that little extra boost. The difference between thumb and thumb 2 is a handful of instructions which mixed properly make for a good performance boost, but you dont need it to get started. The cortex-m3 is quite happy to run original thumb code.

I had no problems developing for the cortex-m3 before gcc had thumb 2 support. Then code sourcery had support, then finally gcc natively had support. So you can roll your own gcc or use code sourcery or emdebian to get thumb2 support today. If you are worried about stability then gcc has been building thumb code for many years now and if you think about how many gameboy advances and gameboy SPs there are out there I would say that gcc building thumb is nothing to worry about.

The one gotcha is that this thing doesnt use the traditional arm vector table, gotta have the right arm document. The cortex-me vector table is easy to put in place just have to find the right web page or document. I have a few pages out there and there are others for the stellaris microcontrollers which are also cortex-m3 based. Essentially there are enough people already using the cortex-m3 with gcc that you should have no problems.

Going with the commercial compilers will sometimes produce better code, but at a price, and support will cost you as well. Keil is now ARM so if I had to pay for something and couldnt afford ARMs tools directly (I used them in the ARM7 days and they were far superior to the competition for optimized code) I would go with Keil to get at rvct. I find the Keil and IAR eval tools quite painful to use myself. gcc is easy and the support is second to none at any price, and gcc code performance has been gaining on arm for, well, years now.

dwelch
The first paragraph of your answer could use editing: you repeated yourself twice.Did Nintendo use GCC to build the Gameboy Advance?
David Grayson
I do not know what Nintendo provided with their SDK.
dwelch
+1  A: 

I've had good luck with gcc. I use the code-sourcery environment, as supplied from Anglia -- while they want you to use their IDE, I'm more comfortable using just vim.

I started with an IAR demo board, using the free size-limited IAR compiler. It was OK, produced small code, but I never grew comfortable with the IDE and compiler. I then took that board, and got the Anglia gcc stuff to work.

Then when my own board was laid out, I was off and running using make, gcc, vim, ...

IAR had some nice features, a nice small printf for example, and jtag debugger support, but I elected to go with my comfort level, and chose gcc. Even though I don't have a debugger (I suppose I could get gdb or eclipse working...), I haven't missed it -- just using printf.

If you need an IDE, then one of the commercial tools may be appropriate.

loneRanger
+2  A: 

I'm using CodeSourcery G++ Lite Edition. This is "just" a GCC 4.3.3 toolchain.

http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite

In combination with Eclipse/CDT and OpenOCD this gives me all I need to develop, compile, and debug software on Cortex-M3 chips and best of all, it's all free. It might take a day or so to set up scripts that make life easier, but that's just a one time effort.

I've also had a look at Ride7 from Raisonance (also uses GCC). It's better integrated then my "homebrew" combination of applications, but it'll cost you money. As far as I know, you can also only use their JTAG interface.

Ron
+1  A: 

I am using IAR EWARM for almost 4 years now and I can tell that they have constantly improved over this time. IAR is expensive but the support is worth the money if you are using it in professional development under tight time schedules. I never had to wait more than 2 days for an answer and they got it right on the first try almost every time.

Another good reason is the good integration with the Segger J-Link JTAG adapter. This little, cheap JTAG is almost indestructible and has survived over-voltage several time with me. With the STM32 you get the simple profiling feature for free since it is able to connect via SWD in revision 7+. This is no precise profiling tool but a great, quick way to find performance bottlenecks.

I am using EWARM with the STM32F103RC for about a year now an don't have faced any instabilities up to now.

A: 

Try Atollic TrueSTUDIO/STM32, a highly professional development tool specifically targetted at STM32! Check out their webpage at: www.atollic.com

/Michael

Michael