Saturday, October 5, 2013

Develop ARM Cortex-M on Mac OSX (2)


  Alright, last time I did a tutorial of how to install arm cortex-m compiler on Mac OSX. But, having just a compiler is not enough. A developer needs a good IDE.
Right?

  I have been searching for arm cortex-m tools on OSX for a very long time. There is one I know. It is eclipse based LPCxpressoIDE from Red-Code-Technologies. However, it works only for NXP chips (at least for downloading a firmware onto a chip). So, why not use normal eclipse? I found a tutorial using normal eclipse to compile a project. You can visit ChibiOS website to see how to setup eclipse so that a project can be compiled. I was able to compile and blink the on-board led on maple-mini with some modification on main.c file. Here is my test project for blinking led on maple-mini: GIT.

  I have encountered two problems with eclipse:

  1. The source file is full of errors and warnings, yet, it compiles just fine.
  2. Eclipse GUI is unstable
Let's talk about errors and warnings first. Most of the errors and warnings are from missing symbols and undefined variables. This is because eclipse cannot see outside of the project folder, while the folder is inside the ChibiOS folder. 
  Take a look at "here->Working with Projects->Preparing your Workspace->#2":
"Navigate the left tree into “C/C++→Code Analysis” and disable everything, without doing this you will see a lot of Errors and Warnings from the static analyzer mixed to the errors found by the compiler and that is very confusing."
Seriously... WHAT!?

Here is a quick fix for this. Reposition project folder (in my case "ARMCM3-STM32F103").
copy  ~/workspace/ChibiOS/demos/ARMCM3-STM32F103
to       ~/workspace/ARMCM3-STM32F103
and then
copy  ~/workspace/ChibiOS
to       ~/workspace/ARMCM3-STM32F103/ChibiOS
Now, import the project folder (in my case "ARMCM3-STM32F103") to eclipse then compile it. The errors should be gone by now :)


  When I followed the tutorial, eclipse 4.3.1 (kepler) was used. After a few days later, I captured this screenshot.

 Hmmm...

I don't know what to say but this is just a total failure. I tried removing eclipse and reinstall again several times and it showed exact same screen :(

Right now, I can't use eclipse. Thus, I will use Netbeans for now.

No comments: