Author Topic: Alternative to CooCox for STM32 development  (Read 19424 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, 08:25:11 am »
Very simple: $50 NC compiler, $50 NC debugger. These are for everyone (price dropped on the compiler license).

$100 MicroBox includes the NC compiler license, 2 pieces of hardware, and a c ebook. So the -NC debugger is extra $50 on top of that.
// 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 Kilrah

  • Supporter
  • ****
  • Posts: 1808
  • Country: ch
Re: Alternative to CooCox for STM32 development
« Reply #26 on: May 08, 2016, 08:42:11 am »
Not sure why we are talking about debugger, but one of the best things is to examine the IO registers. Let's say your I2C EEPROM access just don't work right. You HAVE set up the registers, but what if *something* set them to the wrong things?
I hook up a logic analyzer to the I2C lines and check what's actually going on the bus, that way no doubt regardless of where the fault is.
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #27 on: May 08, 2016, 08:49:30 am »
I hook up a logic analyzer to the I2C lines and check what's actually going on the bus, that way no doubt regardless of where the fault is.

I do that too. That just tells you what's wrong with the I2C signals. Not where the fault is. Have you looked at generating I2C as master or slave using for example, the STM32F4 subsystems? Yes, I know some people prefer to bit-bang their own, but there are a lot of advantages to use the built-in peripherals, and a logic analyzer does not tell you everything needed.
// 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 Kilrah

  • Supporter
  • ****
  • Posts: 1808
  • Country: ch
Re: Alternative to CooCox for STM32 development
« Reply #28 on: May 08, 2016, 08:53:50 am »
Have you looked at generating I2C as master or slave using for example, the STM32F4 subsystems?
I actually do that :)

For me once I saw what happened (or didn't) on the bus it has always been quick enough to figure out the reason not to warrant bothering to go fetch the debug probe.

 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 9327
  • Country: my
  • reassessing directives...
Re: Alternative to CooCox for STM32 development
« Reply #29 on: May 08, 2016, 09:33:54 am »
i'm not a fan of electric drill, i can solve it with just the mechanical hand drill, or with just level 8th nail punch karate kongfu with my fingertip, to prove that i am a man enough, the same goes with the debugger. not! i'll use what ever necessary at hand in this modern day. hand drill is good, but if i can have electric drill as well, its better, they are many kind of holes today that each is easiest to do with a particular tool. a built in debugger is a proof that a software is.. software enough... imho. meaning that not that i dont use printer, pencil and paper, and hole punch as my debuggers. i'm learning Keil, based on dannyf blog, and if that is not software enough, i'll try CoIDE, based on dannyf blog as well... there are many more saved in my storage ready to be learnt, only if i have 48 hours a day and i can split my self into two.
https://en.wikipedia.org/wiki/List_of_ARM_Cortex-M_development_tools
« Last Edit: May 08, 2016, 09:37:43 am by Mechatrommer »
if something can select, how cant it be intelligent? if something is intelligent, how cant it exist?
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Alternative to CooCox for STM32 development
« Reply #30 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 Pack34

  • Frequent Contributor
  • **
  • Posts: 667
Re: Alternative to CooCox for STM32 development
« Reply #31 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

  • Frequent Contributor
  • **
  • Posts: 786
  • Country: se
Re: Alternative to CooCox for STM32 development
« Reply #32 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: 111
  • Country: gb
Re: Alternative to CooCox for STM32 development
« Reply #33 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: 2560
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #34 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: 1740
  • Country: ca
Re: Alternative to CooCox for STM32 development
« Reply #35 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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Alternative to CooCox for STM32 development
« Reply #36 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: 1273
  • Country: fo
Re: Alternative to CooCox for STM32 development
« Reply #37 on: May 13, 2016, 09:53:41 pm »
Does anyone have any suggestions to look at?
EmBlocks/Bitz
 

Offline Sal Ammoniac

  • Frequent Contributor
  • **
  • Posts: 942
  • Country: us
    • Embedded Tales Blog
Re: Alternative to CooCox for STM32 development
« Reply #38 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.
 

Offline VEGETA

  • Super Contributor
  • ***
  • Posts: 1101
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Alternative to CooCox for STM32 development
« Reply #39 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: 2560
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #40 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: 356
  • Country: de
    • carrotIndustries.net
Re: Alternative to CooCox for STM32 development
« Reply #41 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: 465
Re: Alternative to CooCox for STM32 development
« Reply #42 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 #43 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: 465
Re: Alternative to CooCox for STM32 development
« Reply #44 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: 2560
  • Country: it
Re: Alternative to CooCox for STM32 development
« Reply #45 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 #46 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

  • Frequent Contributor
  • **
  • Posts: 953
  • Country: gb
  • Embedded stuff
Re: Alternative to CooCox for STM32 development
« Reply #47 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 #48 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: 465
Re: Alternative to CooCox for STM32 development
« Reply #49 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf