Author Topic: MPLAB vs Arm Toolchains  (Read 9116 times)

0 Members and 1 Guest are viewing this topic.

Offline sileTopic starter

  • Contributor
  • Posts: 15
MPLAB vs Arm Toolchains
« on: February 18, 2012, 09:44:57 pm »
Background: Many years ago I worked with 8051's and more recently done some projects with the avrs, mainly the atmega328 because of arduino.  I'm looking to branch out into some 32bit micro's for my next project either PIC32 or ARM.  For the next project i'm looking at needing about 20-30 GPIO, some uarts, i2c, and ethernet.  I think I'll be able to build it up much quicker by going with a 32 bit micro.  I've also looked at separate cihp ethernet solutions, the enc28j60 and the wiznet.  But, from what i can tell it's going to be more work and cost about the same as just getting it built into the micro.  I can get a PIC32MX664F064H-I/PT-ND from digikey for $7.6 with built in ethernet.  And there are some ARM chips from ST and NXP that are just slightly more than that.

I've read all the arguments about PIC32 and ARM and feel like it's a pretty close comparison and there isn't a real clear winner.  But, when I compare toolchains it pushes me in the direction of Microchip.  However, it's hard to really evaluate a tool chain just by reading their marketing materials.

My question: What are people's thoughts about how easy it is to develop application in MPLAB X vs Mbed vs LPCXpresso vs ST Visual Develop 9 or any other one i've missed.  I wasn't able to find much info on ST Visual Develop 9.  Currently i'm leaning towards MPLAB, but Mbed and LPCXpresso seem like good options as well.

Mplab doesn't optimize code size as well as the commercial version... but I can just get a 512KB chip if i need more code space.  Where as LPCXpress limits at 128KB, although U can jump to 256KB by giving code red $256.  Mbed seems like a good option as well.  It's main strength I think are the libraries built up around it.  Although, that can also be a problem if you decide to switch from mbed to lpcxpress.  Mbed does allow u to export your projects to other toolchains including OSS ones, but the libaries are not built with the same amount of optimizations or guaranteed to be 100% working...

Libraries is a big question as well.  From what I've been able to read, I think microchip does a pretty good job providing libraries as well.

Here is a table I put together when trying to compare them:

CompanyProductSoftware CostDebuggerHobby Only?Ease of use (1hard-5easy)Dev BoardProgrammerLimitsNotes
MicrochipMPLabfreeyn4$40Pickit3  $50Code size not fully optomized
NXPLPCXpresso (Powered by code_red)free with dev boardyn4$30Included with Dev BoardMax 128KB code size
MbedMbedfreenn5$50no programmer$60Exports to Code Red / Keil / GCC
STMircoelectonricsST9+ Visual Develop
freeyn4
Code RedRed Suite NXP 256k$256yn4Max 256KB code size
RowleyCrossworks$150 lite, $1500 for professionalyy4$60 J-Link EDU version$150
Leaf LabsCode Sourceryfreeny3$50 Maple boardAny JTAG compatibleArduino like
Open Sourcegcc, openocd, gdb, Eclipsefreey1Any JTAG compatible
Open SourceGCC ARM Embedded?2Any JTAG compatible
Keil, IAR,too expensivey4


 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: MPLAB vs Arm Toolchains
« Reply #1 on: February 19, 2012, 10:38:51 am »
I have never worked with ARM so am not able to comment as to which is the best, however, I recently migrated a project from AVR to PIC32.


We began by using the PIC32 Ethernet Starter Kit with the PICTail expansion board, its built in debugger and a PICKIT 3 Programmer. Shortly into the project Digilent announced the CHIPKIT boards so I orderd one to look at.


Long Story short, if you are interested in moving to or starting with PIC32 grab a CHIPKIT.
Most of the core ARDUNO library's have been ported so you can be up and running quickly when testing a concept without having to create your own Serial comm's, SPI etc functions until you are ready to migrate the project to your own board. You can use the bootloader and the MPIDE to get your test code into it so no need to hook up your PICKIT3 or IDC3 (and no need to buy either until you are ready to port to target hardware).


You are not locked into the ARDUINO Style MPIDE, however, as the boards are fully supported by MPLAB and the ICSP header pads are available on the boards.


Just about every feature of the PIC32 is brought out to convenient header pins so prototyping with it is much easier than the Microchip propitiatory PICTAIL interface.


Best of all it only costs US$27 for the CHIPKIT UNO32.


I still do all my prototyping with it, then move my test code from MPIDE into MPLAB and merg it with the project, send it to the target board and debug the integrated result with the ICD3.


It has saved a fortune in time and hardware costs and it allows you to very eayly evaluate or move an AVR based design to a 32bit platform with the ability to quickly evaluate both the hardware and software portions.


disclaimer - I am not in any way connected with Digilent or MicroChip. Just a satisfied customer, long time PIC fan, part time Arduino fan and now fully converted PIC32 fan (thought I have only scratched the surface).


Cheers
Chris


Offline harnon

  • Regular Contributor
  • *
  • Posts: 215
  • Country: au
  • Is this thing on?
    • My Personal Website
Re: MPLAB vs Arm Toolchains
« Reply #2 on: February 19, 2012, 11:38:00 am »
Not sure how useful this will be, but I've had some good experiences with the free MikroC on 8bit PICs. I haven't tried the 32bit version so can't comment on its quality but it may be worth a look.

The limit for the lite version is 8k program size which doesn't sound suitable for you, but the full unlimited version is $US299.
 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: MPLAB vs Arm Toolchains
« Reply #3 on: February 19, 2012, 12:41:21 pm »
...from what i can tell it's going to be more work and cost about the same as just getting it built into the micro.  I can get a PIC32MX664F064H-I/PT-ND from digikey for $7.6 with built in ethernet.

Just a word of caution, the PIC32 has Ethernet support not fully built in Ethernet. You still require a lot of Ethernet physical components external to the PIC32, in our case we added the DP83848C, assorted passives, hearer and a 50 meg oscillator.
The Microchip Ethernet stack  also  has licencing issues and is a bit difficult to work with, we ended up creating a new IP Stack rather than debug the library version, so you may not save as much as you think by using built in Ethernet.


Offline sileTopic starter

  • Contributor
  • Posts: 15
Re: MPLAB vs Arm Toolchains
« Reply #4 on: February 20, 2012, 12:42:13 am »
Thanks for the heads up.  I didn't yet realize the PHY wasn't included.....   hmmm.  probably going to head back to the enc28j60.  What are the licensing issues with the microchip ethernet stack?  Is the stack the same on the enc28j60 as the built in eithenet in the PIC32?
 

Offline DrGeoff

  • Frequent Contributor
  • **
  • Posts: 794
  • Country: au
    • AXT Systems
Re: MPLAB vs Arm Toolchains
« Reply #5 on: February 20, 2012, 06:09:01 am »
Thanks for the heads up.  I didn't yet realize the PHY wasn't included.....   hmmm.  probably going to head back to the enc28j60.  What are the licensing issues with the microchip ethernet stack?  Is the stack the same on the enc28j60 as the built in eithenet in the PIC32?

The IP stack is controlled through the header files. So you need to define your hardware in the bsp.h file, and the stack components in the TCPConfig.h file.
I use the ENC28J60 a lot with 18F8722 designs and have stable control boards running with it quite happily.
Was it really supposed to do that?
 

Offline sileTopic starter

  • Contributor
  • Posts: 15
Re: MPLAB vs Arm Toolchains
« Reply #6 on: February 20, 2012, 04:20:51 pm »
I actually already had a pickit3 with the 44 pin debug express board use a PIC18F45K20.  Since... now I don't need Ethernet built in, I may be fine with an 8 bit or 16 bit as well...  but anyway.  So, this weekend I tried to start getting familiar with PIC. 

I tried to install MPLAB X on a fresh install of Ubuntu 11.10 x64.   I downloaded MPLAB X and couldn't get it to install.  No matter what I tried I would run the installer and it would just return back to the prompt with no indication of it having done a thing.   I tried all the different kinds of java.  Open JDK 7, Open JDK 6, Oracle JRE 7, Oracle JRE 6, then i tried 32 bit versions of oracle JREs.  Still nothing.  I gave up and just installed it into my XP VM, and that went just fine...

PICkit 3, since it was a VM it was a little finicky when it was downloading the code to the PICKit itself.  I had to try several times, I think this is because VMWare is passing the USB device from the Linux side into the XP VM.  But eventually, I got it working.  Then, it took me a little bit to find the Pickit power settings  (now I know what Dave was talking about in his pickit review...).  So, now I could power the board while programming, but the thing wouldn't run.  Just doing a simple blinking light test.  I would see it blink a little before and after programming.  It ended up being I had to put a 10k pullup on the MCLR line to get the thing to stay running.

Kind of annoying.  Now, after getting it to work I see in the user guide Appendix B, that is says it's recommended to have a pullup on the MCLR.  I don't understand why they didn't include one on the board.







 

Offline bxs

  • Regular Contributor
  • *
  • Posts: 89
  • Country: 00
Re: MPLAB vs Arm Toolchains
« Reply #7 on: February 20, 2012, 11:56:34 pm »
I tried to install MPLAB X on a fresh install of Ubuntu 11.10 x64.   I downloaded MPLAB X and couldn't get it to install.  No matter what I tried I would run the installer and it would just return back to the prompt with no indication of it having done a thing.   I tried all the different kinds of java.  Open JDK 7, Open JDK 6, Oracle JRE 7, Oracle JRE 6, then i tried 32 bit versions of oracle JREs.  Still nothing.  I gave up and just installed it into my XP VM, and that went just fine...

Probably, hxxp://www.microchip.com/forums/m611970.aspx

I have been using mplabx in my ArcLinux64 without problem  ;D
 

Offline metalphreak

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: MPLAB vs Arm Toolchains
« Reply #8 on: February 21, 2012, 10:45:08 am »
I was planning on doing an ethernet based project as well. Since I'm familiar with all the microchip tools I was just going to go with a PIC32, but the whole external PHY chip has put me off using them. Some of the new PIC18F series have what is essentially the ENC28J60 chip built in (10mbit MAC+PHY) but if you want something 32bit based there's not much choice.

Texas Instruments have their ARM Cortex M3 based Stellaris series, some of which have ethernet built in. Its 10/100mbit and is MAC+PHY, so all you need is the magnetics and a few passive components.

I grabbed the 6000-series evaluation kit with the CodeSourcery IDE/Tools. The command line version has no limitation, and it is only the GUI that has a 30day trial. Even that is only $99 for the personal edition. Apparently you can setup Eclipse, GDB, etc to use the Lite version for a complete open source (free) environment.

https://estore.ti.com/EKC-LM3S6965-EKC-LM3S6965-Ethernet-Evaluation-Kit-with-CodeSourcery-Tools-P1894.aspx <--- This can also function as a JTAG/debug interface for external boards as well

AFAIK, TI are the only ones to do this level of microcontroller with a built in MAC+PHY. Buying a suitable PHY for the PIC32 is around $7 to $10 in small quantities.
« Last Edit: February 21, 2012, 12:56:44 pm by metalphreak »
 

Offline calin

  • Regular Contributor
  • *
  • Posts: 240
  • Country: us
Re: MPLAB vs Arm Toolchains
« Reply #9 on: February 23, 2012, 06:17:51 am »
Sincerely I would go with ARM instead of PIC, there is a much bigger world out there that uses ARM. If you want a nice combination of tools  - and free - use Code Sourcery GCC toolchain, Netbeans as an IDE and of course a JTAG. In terms of boards .. check STM32 Discovery boards from ST .. they are pretty cheap and most of them have a STLink embedded so you can get away without shelling out on a JTAG dongle from day one. A while ago ST had a promo that you could get a STM32F Discovery kit for free .. heck nothing beats free  :o

 

Offline sileTopic starter

  • Contributor
  • Posts: 15
Re: MPLAB vs Arm Toolchains
« Reply #10 on: February 23, 2012, 06:57:06 am »
That looks like a pretty good deal.  How good are the libraries for the integrated MAC in the TI chips?  I've been looking into it some more and the enc28j60 seems like people see stability problems with it.  I also personally have more experience programming with the wiznet.  I may just go with the wiznet 3150a+. 
 

Offline metalphreak

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: MPLAB vs Arm Toolchains
« Reply #11 on: February 23, 2012, 10:37:33 am »
TI provides network functionality through their StellarisWare package. They use the lwIP software stack: http://savannah.nongnu.org/projects/lwip/

There's also an example using uIP: http://www.sics.se/~adam/uip/ (Hmmm just redirects to Contiki OS...)

There's quite a few examples available to look at. If you download the stellarisware package you can read through all the code. You need a TI account and submit an agreement before you can download (one of those export compliance notgoingtomake nuclear stuff type ones).

« Last Edit: February 23, 2012, 11:07:49 am by metalphreak »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1763
  • Country: us
Re: MPLAB vs Arm Toolchains
« Reply #12 on: February 23, 2012, 10:41:48 pm »
Sincerely I would go with ARM instead of PIC, there is a much bigger world out there that uses ARM. If you want a nice combination of tools  - and free - use Code Sourcery GCC toolchain, Netbeans as an IDE and of course a JTAG. In terms of boards .. check STM32 Discovery boards from ST .. they are pretty cheap and most of them have a STLink embedded so you can get away without shelling out on a JTAG dongle from day one. A while ago ST had a promo that you could get a STM32F Discovery kit for free .. heck nothing beats free  :o

I agree 100% with this. The ARM world is much bigger than the Pic32 world and it seems to be accelerating at a faster pace.

I use the Rowley CrossWorks development tools (I'm strictly a hobbyist, so I have the $150 personal license) with the Segger J-Link. I cannot say enough good things about CrossWorks. The IDE is clean and well laid out and just feels fast and responsive compared to some of its competitors, which tend to use Eclipse as a base (I've always found Eclipse to be sluggish).

I also have an LPCXpresso-1769, and while this is an inexpensive option (~$30 for the board, which includes a built-in JTAG debugger which can be cut off the target board and used as a stand-alone debugger), I find that the development environment is slow and sluggish. It takes about 2-3x as long to download the same amount of code to the board as it does using CrossWorks/J-Link and single-stepping code feels like walking in molasses compared to stepping code in CrossWorks.

I've downloaded and played around a little with MPLAB-X and it seems like a nice, modern environment. It seems very similar to the various Eclipse-based tools I've tried, but is somewhat more responsive (perhaps NetBeans is more efficient). I have an ancient Microchip Pic32 eval board and it works fine with the new IDE. I'm tempted to get one of the Digilent chipKITs, but for the work I do that would require spending a week or two porting my RTOS to the Pic32 from ARM.

As an example of some of the cool stuff coming out in the ARM world, check out the NXP LPC4300 series. These have a 204 MHz Cortex-M4 processor with built-in floating point unit, DSP-like (MAC and SIMD) instructions, 264K RAM, 1MB Flash, and a 204 MHz Cortex-M0 on the same die for I/O processing.
"That's not even wrong" -- Wolfgang Pauli
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf