Author Topic: Embedded programming on eCS - Ports of gcc for the PIC 32 and AVR32 ...  (Read 6742 times)

Andi

  • Sr. Member
  • ****
  • Posts: 264
    • View Profile
As this part of minous post in the RPM packager thread get lost, I'll start a new one here. I do embedded programming since a long time too. Here are some thoughts about that -

PIC
Some time ago tried porting the pic30 tool chain (for PIC24xx). Should have been an easy task if I would have some knowledge on porting *nix software to eCS. Sources are available and even some tricks from people who have done this for *nix. But run out of time after some build errors.

Would be very happy if these tools are available for eCS. Although I fear the debugger/IDE part would be not that easy as of the AFAIK closed source interfaces to ICD3 or RealICE. Minou do you like to start with the new NetBeans based version?

8051
Keil tools for ancient 8051 which I use for old stuff works out of the box with odin. The hitex ICE works within eCS WinOS2. Although the tools work on eCS this processor architecture should have been dead for at least a decade now cause of their crazy restrictions from todays point of view.

Atmel
As of the very very bad life cycle of Atmel devices and having a lot of troubles in my day time job with their devices and some obscure bugs of their compiler I'm never interested in AVRs for my private projects. Use it only when you're forced really hard to do it.

ARM
For new projects I use EFM32 ARM cortex-M3 devices. If you ever worked with such 32 bit device and a decent J-link debugger you never want to go back to the 16 or 8 bit world. Beside easier software development with 32 bit registers these devices are insane power efficient with a lot of features build into hardware. You never want to switch back f.i. to these crappy 64k memory restriction... As much as I like Microchip, partly cause the hardly never discontinued any part, for 32 bit I prefer the EFM32 (or any other real 32 bit design). In my experience you feel much to often the restrictions of the usual Microchip way of pimping up small parts with new features. Only comparing the flashing times of f.i. 100k code into a EFM32 and Seeger J-link with RealICE into a PIC24 gives a clear preference for the ARM track. Another example, AFAIK even the PIC32 tools are still not able to set a breakpoint during program execution. So what I really miss on eCS is Rowleys Crossworks for eCS with Seegers jlink dll.

Minou or others interested in embedded programming feel free to add your thoughts to this thread.

Mentore

  • Newbie
  • *
  • Posts: 20
    • View Profile
As this part of minous post in the RPM packager thread get lost, I'll start a new one here. I do embedded programming since a long time too. Here are some thoughts about that -

PIC
Some time ago tried porting the pic30 tool chain (for PIC24xx). Should have been an easy task if I would have some knowledge on porting *nix software to eCS. Sources are available and even some tricks from people who have done this for *nix. But run out of time after some build errors.

Would be very happy if these tools are available for eCS. Although I fear the debugger/IDE part would be not that easy as of the AFAIK closed source interfaces to ICD3 or RealICE. Minou do you like to start with the new NetBeans based version?

Hobbes holds some port I made for PIC programming/debugging. No IDE so far, since I didn't find anything related...

Quote
ARM
For new projects I use EFM32 ARM cortex-M3 devices. If you ever worked with such 32 bit device and a decent J-link debugger you never want to go back to the 16 or 8 bit world. Beside easier software development with 32 bit registers these devices are insane power efficient with a lot of features build into hardware. You never want to switch back f.i. to these crappy 64k memory restriction... As much as I like Microchip, partly cause the hardly never discontinued any part, for 32 bit I prefer the EFM32 (or any other real 32 bit design). In my experience you feel much to often the restrictions of the usual Microchip way of pimping up small parts with new features. Only comparing the flashing times of f.i. 100k code into a EFM32 and Seeger J-link with RealICE into a PIC24 gives a clear preference for the ARM track. Another example, AFAIK even the PIC32 tools are still not able to set a breakpoint during program execution. So what I really miss on eCS is Rowleys Crossworks for eCS with Seegers jlink dll.

Minou or others interested in embedded programming feel free to add your thoughts to this thread.

Same goes for ARM/Atmel. IIRC I ported some command-line software - but I didn't have hardware to try this software on, so I can't tell if it works.

A simple IDE would be a nice add-on, so maybe some of you can point me somewhere to find it.

Mentore

hermi

  • Newbie
  • *
  • Posts: 12
    • View Profile
ARM:
I'm using the command line tools from Keil's MDK with Odin to compile Cortex-M3 code.
Unfortunately only MDK-Lite (32kByte limitation) is working with Odin because µVision does not run with Odin which is needed for generating the License Code.
And of course debugging and flashing with a JTAG debugger is not possible too.

Andi

  • Sr. Member
  • ****
  • Posts: 264
    • View Profile
Quote
...with Odin because µVision does not run with Odin...
Did you test with the latest odin? There was a bug fixed some months ago which influenced Keil 8051 licensing...

ARM Cortex-M3
Rowleys Crossworks uses gcc as backend and building a project is possible with a CLI tool. But not tested yet with odin. When we started ARM development we tested Keil, IAR and Rowley. No experience with CodeSourcery. IAR failed to compile a simple CMSIS example within reasonable time and Keil does not offer much options, does not produce smaller code and is very slow when compiling too. Crossworks seemed to be the best option for us. It has way better editor/debugger too. Moreover EnergyMicro has an app note which describes setting up Eclipse as IDE. Does we have Eclipse for eCS?

J-Link
Seeger offers a J-Link interface with Ethernet connection which I think will be easier to use with eCS than the usual USB stuff. Unfortunately this is rather expensive.

Even the cheap education model offers remote programming/debugging. GDB server included. But for performance reason practically only usable with somewhat faster remote PC hardware. 200MHz SPC with W2k is way to slow. So no real option cause if fast remote Win/Linux PC is needed I can do programming on them too. No need to work on the eCS machine anymore :(

hermi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Quote
Did you test with the latest odin? There was a bug fixed some months ago which influenced Keil 8051 licensing...

Yes, I tried but it fails with a "call to an non-existing api KERNEL32.DLL->EncodePointer (loaded by XERCES-C_3_0.DLL" error. You need µVision to generate the system (computer) dependent license code. It is not possible to use the license code that was generated on an other computer.

The fix you mention was related to problems loading TOOLS.INI.

minou

  • Newbie
  • *
  • Posts: 4
    • View Profile
Andi,

As soon as I have a fully functional RPM development I will move to create the AVR32 port. I could easily add the latest AVR8 stuff if someone needs it.
I had started with the AVR32 on my Linux systems in order to learn it as I needed a new and fantastic processor for our instrument cluster. We picked the UC3C devices. I was lucky enough to have great support from Atmel, I even had meeting with the head of the company in Detroit. We were in a list of limited number of users. (I think GM was the one getting most of the devices) We were under an NDA for a couple of years. Now it is released and I think it is one of the best processors on the market. It has hard float for single precision and a DSP core.
At work I use IAR which we paid closed to $5500. At home I am doing some work on an evaluation board that I got from a vendor and use a JTAGICE mkII which I paid half price at a sale at Arrow ($150). I was not willing to pay $5500 so I am using GCC. Windows is not something allowed on my computer except under VirtualBox. I only use windows when I have to which is usually for work related stuff.
Until not long ago it was working fine under Linux. When the kernel got updated it no longer work on gentoo or Fedora 15. Atmel tells me that it is related to the kernel. They refuse to release the source code to avr32proxy despite the fact that they have discontinued work on AVR32 Studio for Linux and it seems the command line stuff. The latest release of the command line still includes the non functionning programmer.
I had to install Scientific Linux which is a mix of Fedora 12 and Fedora 13. By installing the programmer for Fedora 12 (no longer available thru Atmel) it now works.
I haven't used the PIC devices since they jacked up the prices on us and we moved to Atmel. When looking for a new processor for our gauges and cluster I looked at the PIC32. They lost because I needed enough PWM to run 7 steppers, which they didn't have. I found it to be a terrific processor though and bought a small board from Olimex. I do have the source code for the programmer which I intend to port to OS/2. For debugging I am debating on whether OpenOCD is the way to go or a custom gdbproxy version.

As for debugger my first attempt will be with setedit which uses turbo vision. I have so far been successfull in porting the turbo vision library to OS/2 using the Open Watcom. I have setedit compiled with Borland 2.0, I will make makefiles so it will compile with Open Watcom which is probably newer than my old Borland 2.0. The installation of Borland was problematic. The installer gave me a path error message. The solution was to zip the directory from my OS/2 Warp 4 installation in VirtualBox and using ftp. I then copied it on the OS/2 partition from Scientific Linux.
Once I have setedit and turbo vision working I will release them on SourceForge where I have released the SuSE, Fedora and Mandriva versions.
Eventually I want to make a graphic version that is as nice to use as IAR and use my GCC port of AVR32. I am looking at possibly using Kate for that.

I love Linux but love OS/2 more. I have been a Team OS/2 member for many years. I was forced to stop using it when it would not install on my PC anymore.
When I found out that someone had revived it under eComStation I checked it. It would not install until the latest one 2.1 which I bought.
My gripes right now at eComStation are
1-Sound, shitty support. With the stereo full blast the sound is very low. Sound control in mixer seemed to be don't care and sound control in sound is set to 100%
2-Flash doesn't display any video on the onion and crashes Firefox.
3-Flash plays ok on my favorite FM Station from Montréal but very low, and since I am hearing impaired this is not good. I hangs Firefox most of the time when I try to close Firefox.
4-The RPM install of perl is a file named perl with one line comment. I need a true perl to compile setedit with gcc. Salvador likes perl and that is what he uses to do his configurations. From what I found out last night that may be irrelevant here since it compiles with Borland but I still need perl for other stuff.
5-eComStation cannot read my 16G, 8G, 2G and 1G devices. It has no problem with my useles 128M jump drives.
The solution is not to update with the latest USB driver as when I do that it no longer boots. I then have to have it do chkdisk on all 4 500G partitions and give the ctrl alt del salute to keep it from crashing again and boot in Scientific Linux so I can put the old driver back.
« Last Edit: 2011.09.16, 04:39:49 by minou »