Author Topic: Alternative to CooCox for STM32 development  (Read 29241 times)

0 Members and 1 Guest are viewing this topic.

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #25 on: May 08, 2016, 09:34:50 am »
Well, that's why there are different tools for different people.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline Pack34Topic starter

  • Frequent Contributor
  • **
  • Posts: 753
Re: Alternative to CooCox for STM32 development
« Reply #26 on: May 08, 2016, 03:29:29 pm »
I've been using CooCox at work for STM32 development. I'm about to reboot a project from scratch and figure that this could be a good chance for a clean break.

It's a moderately sized project that has a lot of issues, such as the USB dropping out. The code works but just has odd events that occur and break the firmware. I'm planning to reboot from scratch and start over. Then just copy in all of the code that doesn't have low level hooks into the processor and see where that takes me.

I bring up switching from CooCox because although the IDE seems to function fine, I'm uncertain of the future of the IDE and would prefer to look into something else and I'm willing to pay for it.

I know that IAR is standard for this kind of stuff but it's just going to be out of my price range. I can definitely make the case to purchasing for anything ~$500 to $800 but a 5k purchase will be out of the question.

I also know that Keil is popular, but I've used that with Cypress development and it just feels like a pain to use.

Does anyone have any suggestions to look at?

http://www.openstm32.org/System+Workbench+for+STM32

it is STs own eclipse/gcc

Thanks! Being eclipse, hopefully it'll be a lateral shift. I'll add this one to my list.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Alternative to CooCox for STM32 development
« Reply #27 on: May 08, 2016, 08:08:42 pm »
You've been given a lot of good advice, I will add my two cents:
Give VisualGDB a try if you happen to like or be used to Visual Studio.

The price is moderate (especially for the embedded version only), and the Visualgdb integrates VS with gdb and openocd in an almost seamless way.
Debugging works well (as far as I tried) as do watches and live variables.
Many ARM and non-ARM architectures supported, for STM32 HAL/STP, USB library, FreeRTOS, LwIP are supported directly.

Visual Studio Community is free (as in beer) and has very few limitations (at least for my use).
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: thm_w

Offline SimonR

  • Regular Contributor
  • *
  • Posts: 122
  • Country: gb
Re: Alternative to CooCox for STM32 development
« Reply #28 on: May 08, 2016, 09:09:12 pm »
Quote
I do not think debugging with serial or GPIO is slow.

So you suspect that register A doesn't have the right value. So you write a piece of code to print it on the serial window.

While the code is running, you suddenly realize that maybe the real problem is register B. What do you do then? You stop it and add a line to print register A.

With a debugger, you simply walk over to that register and read its value.

Cases like that are plenty.

Now, that's not to say that serial prints have no value - it allows (near) real time reporting which a hardware debugger doesn't do, until recently: swo, RTT and j-scope and the latest st-link v2-1 with integrated virtual comm ports for example are examples where debuggers are integrating some form of real-time reporting capabilities.

I agree there is no substitute for a good debugger for looking at registers or even the state of your code.  But even then you have to be careful. A trap for young players I think is the term.
Just because you can read a register doesn't mean the value is the same as when the fault occured.

Example 1 Interrupt control registers.
Sometimnes reading them clears the flags so make sure what you are looking at is the first read and not the second.
printf or similar is good to avoid this one.

Example 2 Registers that do different things on reading to what they do on writes.
I currently have to use a register that returns chip status on read  but sets up internal  timing on a write.

As a result even though I own an electric drill in the form of a high end JTAG debugger I still use all of the hand drill tools,
including printf, stuffing individual bytes straight out of a UART, waggling IO pins, and even an on board software trace in the form a a quick and dirty array and index mechanism.

Basically what ever fits the problem at hand.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #29 on: May 08, 2016, 09:21:46 pm »
I've been using CooCox at work for STM32 development. I'm about to reboot a project from scratch and figure that this could be a good chance for a clean break.

It's a moderately sized project that has a lot of issues, such as the USB dropping out. The code works but just has odd events that occur and break the firmware. I'm planning to reboot from scratch and start over. Then just copy in all of the code that doesn't have low level hooks into the processor and see where that takes me.

I bring up switching from CooCox because although the IDE seems to function fine, I'm uncertain of the future of the IDE and would prefer to look into something else and I'm willing to pay for it.

I know that IAR is standard for this kind of stuff but it's just going to be out of my price range. I can definitely make the case to purchasing for anything ~$500 to $800 but a 5k purchase will be out of the question.

I also know that Keil is popular, but I've used that with Cypress development and it just feels like a pain to use.

Does anyone have any suggestions to look at?

http://www.openstm32.org/System+Workbench+for+STM32

it is STs own eclipse/gcc

Thanks! Being eclipse, hopefully it'll be a lateral shift. I'll add this one to my list.

One thing i miss about CooCox is the list of all peripherals and registers with description within the IDE... STM32 datasheets SUCKS! But eclipse with the gnuarmeclipse plugin and the device packages is getting there..
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ca
  • Non-expert
Re: Alternative to CooCox for STM32 development
« Reply #30 on: May 13, 2016, 09:01:47 pm »
You've been given a lot of good advice, I will add my two cents:
Give VisualGDB a try if you happen to like or be used to Visual Studio.

The price is moderate (especially for the embedded version only), and the Visualgdb integrates VS with gdb and openocd in an almost seamless way.
Debugging works well (as far as I tried) as do watches and live variables.
Many ARM and non-ARM architectures supported, for STM32 HAL/STP, USB library, FreeRTOS, LwIP are supported directly.

Visual Studio Community is free (as in beer) and has very few limitations (at least for my use).

Looks good, but seeing this is a bit ridiculous (yes I realize they don't do GDB):


and here is what register window looks like, quite nice:


Single step not super fast ~1s with st-link, but completely usable, could try segger sometime to see if its any different.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Alternative to CooCox for STM32 development
« Reply #31 on: May 13, 2016, 09:40:29 pm »
Quote
here is what register window looks like, quite nice:

From good / old uVision 3, on a LM3S628. It is a lot more readable / usable to me.

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

Offline MT

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: aq
Re: Alternative to CooCox for STM32 development
« Reply #32 on: May 13, 2016, 09:53:41 pm »
Does anyone have any suggestions to look at?
EmBlocks/Bitz
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #33 on: May 13, 2016, 10:13:48 pm »
Another option is to roll your own using Eclipse/CDT/GDB/GCC and a few other components. Takes about an hour to get everything all set up, and you're not tied to any particular vendor--everything is open source.
Complexity is the number-one enemy of high-quality code.
 

Online VEGETA

  • Super Contributor
  • ***
  • Posts: 1952
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Alternative to CooCox for STM32 development
« Reply #34 on: May 16, 2016, 05:22:57 am »
Another option is to roll your own using Eclipse/CDT/GDB/GCC and a few other components. Takes about an hour to get everything all set up, and you're not tied to any particular vendor--everything is open source.

so eclipse is an ide only, you need a compiler which is gcc. so installing gcc and eclipse is enough for all arm mcu development?

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #35 on: May 16, 2016, 05:47:08 am »
Not really. you still lack the debugger and the header files so you don't have to map all the registers for each processor yourself

gnuarmeclipse is something you want to google. follow their installation guide.
Now that the "packs" feature is getting stable you have support to each vendor's header files, peripheral library, examples... AND register view in the debugger. Finally. Not long ago you only had support for stm32
 

Offline Lukas

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: de
    • carrotIndustries.net
Re: Alternative to CooCox for STM32 development
« Reply #36 on: May 16, 2016, 11:18:18 am »
I'm wondering why nobody mentioned Atollic TrueStudio yet. It's basically Eclipse+GNU toolchain shrink-wrapped. There's a free unlimited version. In case you want/have to spend money, there's a paid version as well.

Personally, I'm just fine with using Makefiles, gdb and a stock gcc. No need to learn a different IDE for every new MCU family.
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Alternative to CooCox for STM32 development
« Reply #37 on: May 16, 2016, 09:20:09 pm »
Rowley makes a really nice tool, doesn't get 1/2 the recognition it deserves.

That said.... All the talk about toolchain is a little off the mark when it comes to STM32 right now... The peripheral code is such a mess for the entire company it's really disappointing.  There's:

SPL - standard peripheral library, outdated for the newer chips, has bugs
HAL - bloated and universally hated (but does work OK)
LL - "low layer" which is supposed to be a version of SPL that is compatible with HAL... but largely does not exist
CodeSnippets - someone's work at chip specific direct register access wrapped quickly, but also doesn't really exist

And then the options of OpenLibCM3 that looks dead, writing your own non-portable register access which is dumb because of the number of times that work has been done by different people, and others I'm sure I'm forgetting.

STM's Achilles heel is their software without a doubt.
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #38 on: May 17, 2016, 04:40:33 am »
And then the options of OpenLibCM3 that looks dead, writing your own non-portable register access which is dumb because of the number of times that work has been done by different people, and others I'm sure I'm forgetting.

STM's Achilles heel is their software without a doubt.

Our JumpStart API works great. It exists for the F0xx and F4xx series, and I just starting to port to the F7xx series. I have a user that's not great with programming (he's a mechanical engineer) that has a working prototype with Arduino, and convinced him to give our JumpStart MicroBox with the -NC compiler a try, and he's now writing multiple interrupt detection code, on the STM32F401, all in less than a week, when he previously really have experience with just the Arduino environment.
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Alternative to CooCox for STM32 development
« Reply #39 on: May 17, 2016, 04:45:05 am »
Richard, then release Jumpstart for other tools and let's see how it stands. I understand your goal is to sell your IDE/Compiler, but for the rest of the world that wants to work in IAR, or Keil, or Gcc, it's a no-go.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #40 on: May 17, 2016, 07:02:19 am »
writing your own non-portable register access which is dumb because of the number of times that work has been done by different people
i just need registers name and description. i just need an include file eith the resisters mapped and with the same names used in the datasheet.
So the main include file in the SPL is enough
Then I need the chip's datasheet to have the memory mapping of the actual chip with maybe a summary of the bits (the 100 pages waste of space is only used is to look at the 3 pages of electrical characteristic)
It's not that hard. Microchip's been doing it since forever and it's just fine. when i don't know how to initialize a peripheral i look at the reference manual, when i just need the address or the names or the bits i look at the chip's manual
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #41 on: May 17, 2016, 07:13:35 am »
Richard, then release Jumpstart for other tools and let's see how it stands. I understand your goal is to sell your IDE/Compiler, but for the rest of the world that wants to work in IAR, or Keil, or Gcc, it's a no-go.

I need to pay my bills. I am sure IAR/Keil have a good solution for their $7000 tools... Oh wait..
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Alternative to CooCox for STM32 development
« Reply #42 on: May 17, 2016, 08:11:56 am »
Richard, then release Jumpstart for other tools and let's see how it stands. I understand your goal is to sell your IDE/Compiler, but for the rest of the world that wants to work in IAR, or Keil, or Gcc, it's a no-go.

I need to pay my bills.

And therefore you need to keep spamming. It is getting very tedious.

Bob
"All you said is just a bunch of opinions."
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #43 on: May 17, 2016, 08:15:45 am »
The poster asks a question, I answered. Why is it spamming? Plenty other people have said they have written better software than ST. The only difference is that they kept it to themselves. They don't offer it to everyone either. Are they spamming just because they mention that fact too?
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Alternative to CooCox for STM32 development
« Reply #44 on: May 17, 2016, 02:22:00 pm »

I need to pay my bills. I am sure IAR/Keil have a good solution for their $7000 tools... Oh wait..

Apples to apples.... Keil is $700.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Alternative to CooCox for STM32 development
« Reply #45 on: May 17, 2016, 02:47:23 pm »
Apples to apples.... Keil is $700.
Where can I sign?  :)
Unfortunately the prices are in the correct ballpark, this is a pricelist from 2012, already over $5,5k for basic version.  :scared:
For the STM32F0 there is now a free version payed by ST but not for the F1,2,3,4,7.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Alternative to CooCox for STM32 development
« Reply #46 on: May 17, 2016, 02:51:57 pm »
Ah found a recent one, as expected it got worse.
TS could use the cortex restricted version, still €3,4k without 21% VAT, including it would make > €4k :scared:
« Last Edit: May 17, 2016, 02:54:03 pm by Kjelt »
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: Alternative to CooCox for STM32 development
« Reply #47 on: May 17, 2016, 05:00:53 pm »
They just launched the Plus and Cortex models. I thought it was $700 to get going, but that's apparently my renewal rate. Well, $700 is good for me at least ;)
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #48 on: May 17, 2016, 05:22:16 pm »

so eclipse is an ide only, you need a compiler which is gcc. so installing gcc and eclipse is enough for all arm mcu development?

You need the following pieces:
  • Eclipse
  • CDT -- The C/C++ development platform for Eclipse
  • GCC ARM embedded toolchain -- The GCC cross-complier, assembler, and linker for ARM
  • GNU ARM Eclipse plugins -- This package integrates the GCC cross compiler and associated tools needed to compile and link ARM code into Eclipse and provides configuration dialogs
  • GNU ARM Eclipse build tools -- This includes make, which is used by Eclipse to build projects

You also need software to connect your hardware debugger to Eclipse. I use a Segger J-Link, so I use the Segger Software and Documentation Pack for Windows.

Next, you'll need C header files for your MCU. You can generally get these from the MCU vendor. If you want to see the MCU's peripheral registers in Eclipse, you need EmbSysRegView, an Eclipse plug-in, and the ARM CMSIS-SVD file for your MCU, which you can download from the ARM website.

It only takes about an hour to download and install these components, perhaps a little longer the first time. I have a write-up that describes the process in detail. Send me a PM with your email address and I'm email you a copy if you'd like.

Quote from: Lukas
I'm wondering why nobody mentioned Atollic TrueStudio yet. It's basically Eclipse+GNU toolchain shrink-wrapped. There's a free unlimited version. In case you want/have to spend money, there's a paid version as well.

TrueStudio, when debugging code, is as slow as molasses in January. Downloading code to a board seems to take forever and single-stepping code is ridiculously lethargic. I used to think this was because Eclipse was slow, but after I built my own Eclipse development environment I found that Eclipse isn't slow, just TrueStudio.
Complexity is the number-one enemy of high-quality code.
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #49 on: May 17, 2016, 07:00:26 pm »
Ah found a recent one, as expected it got worse.
TS could use the cortex restricted version, still €3,4k without 21% VAT, including it would make > €4k :scared:

Just wait until they have no commercial competition :-DD
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf