Author Topic: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools  (Read 12739 times)

0 Members and 1 Guest are viewing this topic.

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1151
  • Country: us
  • takin' it apart since the 70's

I really don't want to initiate a flame war, but I have another question about MCU families. I've been working on AVRs quite happily but want to move to a 32b machine, preferably ARM, for mostly performance reasons.

After Googling around it seems that for some targets there are expensive IDEs, cheap IDEs, and free IDEs, cheap and expensive device programmers, and cheap and expensive JTAG or other HW debug tools that may or may not work with gdb, eclipse, etc.

Can anyone give me a very quick education on what is the most well-supported family in the open-source world and what tools (HW and SW) work best?

Ideally, I'd be happiest with a gnu compiler toolchain, a cheap programmer and a command line tool I can use to run it, and a cheap JTAG device that works with gdb -- all running on linux. Non gnu software is OK, but I'm allergic to machine-locked license keys.

For a background, I used to be a pretty sophisticated microprocessor guy (circuit designer at Intel, application engineer at Cadence, Tensilica, others) but am getting back into it after about 10 years away -- now as a hobbyist, and my patience/budget for closed tools and single-family dongles and programmers isn't what it was.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #1 on: February 09, 2014, 04:06:13 am »
1 vote for
St Micro, Eclipse CDT, Yagarto, and the open debugger(I forgot its name ODB or something).
STLinkV2 for the cut down version of JTAG, but its sort of already on the discovery devel boards.

I had a quick look at the TI and the Energy Micro devel boards too, they were easy to get going, compiling, debugging but that was with the limited licence tools.





« Last Edit: February 09, 2014, 04:10:23 am by HackedFridgeMagnet »
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1638
  • Country: nl
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #2 on: February 09, 2014, 09:45:52 am »
The STM32 controllers seem to become pretty widely used. The STM32F1 series are pretty cheap at the low end, the STM32F4 are pretty powerful (but more expensive), with USB HiSpeed, 100Mbit ethernet, etc, (though if you add Phy's).

Their ST Discovery boards are also very cheap to get and have the STLINKv2 debugger built in. You can also use it for your own boards with a simple 5-pin cable. In my experience it works very well, it's loads quick and I have had little quirks so far.
An obvious limitation is, of course, the STLINKv2 only works on STM32 devices. For me it was so cheap and low-entry I couldn't resist rolling a project with a ST microcontroller on it , and see how it works out.
Not sure about the STLINKv2 driver & linux neither.

Otherwise I'd recommended looking at NXP or Atmel for general purpose projects. At work we use NXP, their chips are okay, but sometimes I feel their peripherals are a bit limiting for a big 32-bit Cortex core (like only supplying 4 timers, 4 or 8 A/D channels on a 100-pin QFP, etc.)
NXP has got LPCxpresso development boards, kinda similar at the STMDiscovery with onboard debugger. Their old boards were completely locked into CodeRed IDE's (another Eclipse Java IDE), which is a pity. I believe their newer debuggers implement a J-Link debugger protocol though, not sure which models.

IDE's is a bit harder, can be very personal. Maybe this page will help:
http://www.emcu.it/STM32/What_should_I_use_to_develop_on_STM32/What_should_I_use_to_develop_on_STM32.html

Candidates seem to be: CooCox, Code::Blocks and emIDE. The others are 32kB Limited versions of big vendor tools, which I guess will work very well, but is quite a contrast to "open tools".

As a general rant: in general ARM tools are not very open. There was this very interesting article on Hackaday and DangerousPrototypes about a very simple CMSIS-DAP (Cortex general purpose debugging protocol) adapter, using a 1$ USB PIC part.
All great and all, except for the fact the source code is not allowed to be released because you get the CMSIS-DAP specification from ARM under "license", which says you may not release your implementation/source code.
« Last Edit: February 09, 2014, 09:48:48 am by hans »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13744
  • Country: gb
    • Mike's Electric Stuff
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #3 on: February 09, 2014, 10:57:02 am »
I've been using the PIC32MX1xx chips  a lot recently. Tools are not open but the free compiler is perfectly OK. Parts are cheap, readily available  and have a wide range of packages - DIP (yes, really!) , SO, SSOP, QFN and VTLA. For production you can get them pre-programmed and marked via MicrochipDirect. That alone has been the reason for using them in one design recently.
You can program and debug using the cheap PicKit 3, though the more expensive ICD3 is significantly faster. Pickit3 can also work as a standalone programmer which can be handy for small production batches.   
I'm still using MPLAB8 out of habit, but am told that MPLABX is pretty good now

A few minor downsides - pin remappablity isn't as good as the PIC24's, but a least as good as NXP and others I've looked at. Interrupt latency could be better (seems to save a lot of context ), and UART FIFO implementation is a bit lacking (short FIFO and no timeour interrupt).  And no pin pullups/pulldowns - WTF is that about?

 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #4 on: February 09, 2014, 12:48:17 pm »
I would vote for CoIDE on a short budget. Both emblocks and emide are also worthy candidates.

On chips, those STM discovery boards are nice for general purposes. TI's launchpads are very feature rich. Freescale's boards are incredible in terms of mixed signal stuff.
================================
https://dannyelectronics.wordpress.com/
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1151
  • Country: us
  • takin' it apart since the 70's
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #5 on: February 10, 2014, 08:05:13 pm »
Thanks for the replies, guys. It looks like in short I got a different answer with each response, which is fine. I think I'll just need to pick one and roll with it for awhile. I'll report back when I am up and running with gcc based tools in linux and a working debugger.
 

Offline casinada

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: us
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #6 on: February 10, 2014, 08:15:17 pm »
Texas Instruments, Freescale, Renesas, NXP, etc on top of the other ones mentioned already.
Lots of choices from many manufacturers.
Welcome to the confusing world of choices  :)
 

Offline GiskardReventlov

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: 00
  • How many pseudonyms do you have?
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #7 on: February 11, 2014, 04:49:28 am »
@djacobow,
I'm on a similar path,  I haven't decided on whether I want to do PIC or atmel.  For PIC it seems that you have to buy a pickit3 to do pic32 but it seems that for atmel there is a device called usbasp that is very cheap <$10.  For me money's not the only issue. I just don't like paying for something to find out later that it's limited in some way that requires spending more money. The pickit3 has had some legitimate complaints like requiring separate target power.

Your questions:

cheap programmer:  atmel and the usbasp
cheap hw debug: this I'm not sure about but I think JTAG for both works
open tools: I think there are open source tools for both

I think I'm leaning toward atmel unless there's a usbasp-like solution for PIC.

You never defined cheap and that's a wide range because some people think $100 is cheap.
I look forward to hearing about your search.
I'll let you know if I find out any more useful bits.

 

Offline bernroth

  • Regular Contributor
  • *
  • Posts: 126
  • Country: de
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #8 on: February 11, 2014, 06:31:08 am »
Some time ago I was faced with a similar decision to make and I finally have chosen the STM32 family of Cortex MCUs.
Here are my reasons:

- GCC available (you can use Eclipse if you want or sublime text/vim/make like me)
- OpenOCD JTAG debugger for GDB and programming using FTDI based JTAG interface
- Cheapo DEV boards (STN32xx discovery)
- Dev board comes with integrated ST-Link which you can use to program your target board using the SWD interface (ST Link works for STM8 too)
- Open source software for ST-Link is available (unlike LPC-Link from NXP which is bound to their eclipse IDE)
- C Libaries for peripherals come from ST
- Advanced features of peripherals
- Good documentation
- There are some real time operating systems which support STM32 very well like http://www.chibios.org/

JM2C :)
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #9 on: February 11, 2014, 07:03:41 am »
STM32 + CoIDE. Use any discovery board as JTAG adapter and you're set.
I love the smell of FR4 in the morning!
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #10 on: February 11, 2014, 07:15:45 am »
Interrupt latency could be better (seems to save a lot of context ),
Seems to not be a problem with me. Just used PIC32 in two projects (2xx same thing and 4xx) actually because the previous chips I tried couldn't handle the low latency I needed... that said I didn't try ARM stuff yet, but other parts of PIC32 seemed to fit exactly what I needed, so I went with it...

and UART FIFO implementation is a bit lacking (short FIFO and no timeour interrupt).
Yeah FIFO is short but I was able to deal with it, though I thought there were a few interrupt options... maybe I am misremembering, I ended up working with it well enough even with tough constraints that I didn't need it...

And no pin pullups/pulldowns - WTF is that about?
Yeah, this one really sucks.

Quote from: poorchava
STM32 + CoIDE. Use any discovery board as JTAG adapter and you're set.
Basically this.

djacobow I am another that will tell you for general purpose ARM and specifically STM32 will be the cheapest (money investment more than time) to develop with and can be developed with on Linux with open source tools. You aren't terribly trapped with one vendor (though standard libraries can get you) and $10 to program/debug is cheap, who cares if it's vendor specific. At that price, if you want to migrate to non-vendor specific, do it when/if you need to move. I don't know ST's reasons but they are targeting cheapskates and it worked for me, at least one thing in development for me is using STM32 :)
« Last Edit: February 11, 2014, 07:17:47 am by true »
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1151
  • Country: us
  • takin' it apart since the 70's
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #11 on: February 12, 2014, 06:37:58 pm »
OK, the center of gravity seems to have moved towards STM32 in this thread.

The parts really don't have controllable internal pullups/downs? Not tragic, but highly annoying!
 

Offline djacobowTopic starter

  • Super Contributor
  • ***
  • Posts: 1151
  • Country: us
  • takin' it apart since the 70's
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #12 on: February 12, 2014, 06:42:53 pm »
I also should have been more clear by what I mean as "cheap."

Yeah, I have no problem shelling out, say, up to $150 for a programmer or OCD device.

I don't want to have to shell out $150+ for tools, though, including the driver and utility to use the programmer or OCD device. The problem with that, is that you end up paying over and over with version upgrades, new computers, etc.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #13 on: February 12, 2014, 10:13:46 pm »
-The parts really don't have controllable internal pullups/downs?-

some of them do.
================================
https://dannyelectronics.wordpress.com/
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 825
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #14 on: February 12, 2014, 10:51:30 pm »
Quote
And no pin pullups/pulldowns - WTF is that about?
I belive the pic32mx1/2 do have pullups/pulldowns- look under change notification in the io ports sections of the datasheet. Good luck finding any concrete evidence, though. The errata has more info on it than the datasheets (you may still end up needing your own pullups).
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #15 on: February 13, 2014, 05:38:03 am »
OK, the center of gravity seems to have moved towards STM32 in this thread.

The parts really don't have controllable internal pullups/downs? Not tragic, but highly annoying!
PIC32 doesn't (at least on 1xx/2xx and maybe 3xx/4xx that works). STM32 does.

Quote from: cv007
I belive the pic32mx1/2 do have pullups/pulldowns- look under change notification in the io ports sections of the datasheet.
It's in the datasheet. It doesn't work.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #16 on: February 13, 2014, 08:59:34 am »
STM32 + CoIDE. Use any discovery board as JTAG adapter and you're set.
I still prefer NXP's ARM chips. No JTAG needed. A (USB) serial port is enough to program them.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 825
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #17 on: February 13, 2014, 10:39:50 am »
Quote
It's in the datasheet. It doesn't work.
I have been playing around with them, but have not even tried it yet. A good example of a nice arm chip is the lpc1114- good documentation, things work as described, few if any errata. Too bad these type of examples are not common.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13744
  • Country: gb
    • Mike's Electric Stuff
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #18 on: February 13, 2014, 08:50:32 pm »
OK, the center of gravity seems to have moved towards STM32 in this thread.

The parts really don't have controllable internal pullups/downs? Not tragic, but highly annoying!
PIC32 doesn't (at least on 1xx/2xx and maybe 3xx/4xx that works). STM32 does.

Quote from: cv007
I belive the pic32mx1/2 do have pullups/pulldowns- look under change notification in the io ports sections of the datasheet.
It's in the datasheet. It doesn't work.
Not sure where I got the no pullups idea from, but as you say the errata shows that pullups may not be strong enough, however it doesn't mention any issues with pulldowns.
Just skimming the datasheet it's easy to miss, as no pullups are shown on the port diagram , and there is no description of the CNPU/CNPD registers in the section with the other register descriptions.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #19 on: February 13, 2014, 09:09:12 pm »
I still prefer NXP's ARM chips. No JTAG needed. A (USB) serial port is enough to program them.
You can't use USB to debug, you have to use the serial interface.

Otherwise, STM is really the cheapest in throwing out dev boards. You can get them everywhere, even on eBay for less than $30 for the advanced one with lcd and ext mem.
There are plenty IDE's and open source software available for stm, (chibios is a good example).
Also separate chips are avaiable on sample and several resellers for private projects.
ST is the preferred platform at my university, since they delivered a full pallet of STM32Fxxx boards for free.

Next in line for me would be NXP with mbed and lpcxpresso, however nxp boards are expensive and you'll need an jtag segger/ulink (clone) to program them comfortable, those go from $700 to over $9000 (or $50 *Arrr*)
Separate chips cannot be sampled and only the most popular ones can be bought online for private projects. Their new LPC800 family would be ideal for hobby projects, but you can't buy them anywhere!

There also is TI,  they have had some major issues with their 32 bit families. They recently withdrawn full families and create new ones. Won't step into those right now.

And there are the other mcu's rarely found in the open source world like freescale, infineon, silabs, renesas
« Last Edit: February 13, 2014, 09:10:56 pm by Jeroen3 »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #20 on: February 13, 2014, 09:38:11 pm »
NXP boards don't have to be expensive. I used this one for a project:
http://www.ebay.com/itm/New-NXP-ARM-Cortex-M3-LPC1768-Development-Board-3-2-TFT-LCD-Module-64KB-SRAM-/270962249071

And this is not the cheapest one around. It has on-board debugging through USB. Dunno if that works though.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #21 on: February 13, 2014, 10:02:08 pm »
And there are the other mcu's rarely found in the open source world like freescale, infineon, silabs, renesas
Freescale were pushing their Kinetis Freedom boards pretty hard some time ago. There's boards with Cortex-M0+ and Cortex-M4 MCUs (no M4F though), costing in the range of $15-20.

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13744
  • Country: gb
    • Mike's Electric Stuff
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #22 on: February 14, 2014, 12:20:31 am »
Their new LPC800 family would be ideal for hobby projects, but you can't buy them anywhere!
Farnell have plenty in stock
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline nowlan

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #23 on: February 14, 2014, 01:07:41 am »
Is it mbed that drives everyone away? I recall someone at school saying they want to lock you out of everything.

Been meaning to move into ARM chips at some point.
Does the STM boards make the segger thing obsolete?

I get the impression that m0 is the next step from AVR.
However I see everyone mention m3/m4 which are full cpu, which need O/S from what I understand.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: 32b MCU famiy with cheap programmers, cheap HW debug, and open tools
« Reply #24 on: February 14, 2014, 02:48:05 am »
Quote
Does the STM boards make the segger thing obsolete?

It only makes the segger thing obsolete for the type of chip on the board.

If you want to program other chips or other families of chips from ST, you are (technically) out of luck.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf