ChibiOS/RT RTOS ported to LPCXpresso (LPC1114)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ChibiOS/RT RTOS ported to LPCXpresso (LPC1114)

10,240 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Sun Apr 04 00:26:39 MST 2010
Hello,

Some of you may be interested in a free embedded RTOS for the  LPCXpresso. ChibiOS/RT version 1.5.4 includes support for the LPC1114  and a demo for LPCXpresso (with or without base board). The LPC111x support also includes a serial buffered driver, a GPIO ports driver, configurable clocks initialization and startup code. More drivers will be added in next releases.

The download is available here:

https://sourceforge.net/projects/chibios/files/

If you are curious to see how the Cortex-M0 performs compared to other ARM  devices you may find this interesting (performance data is at the end  of the reports, scroll down):

http://chibios.sourceforge.net/benchmarks.html

Note that it actually seems to perform *better* that ARM7 controllers in  THUMB mode. Soon also the LPC13xx will be supported and added to the  benchmarks page.

Giovanni
0 Kudos
Reply
29 Replies

8,623 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Sun Apr 18 00:31:57 MST 2010
Just a status update,

In the latest version 1.5.5 support and demo for the LPC13xx family has been added.

Performance data for the LPC1343 (LPCXpresso) has been added to the benchmarks page: http://chibios.sourceforge.net/benchmarks.html
I hope this can help comparing LPC11xx and LPC13xx.

Giovanni
0 Kudos
Reply

8,623 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Wed Apr 07 15:48:44 MST 2010
Thanks for helping.  I tried moving the OS folder into C:\nxp\lpcxpresso_3.2\ directory but still got errors - doing MAKE from the command worked though.  Don't worry about it for now - perhaps someone will get it to work and post here.
0 Kudos
Reply

8,623 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Wed Apr 07 14:28:52 MST 2010

Quote: rmteo
I tried your suggestion - I have the same paths in my system (default install).  This is what I got:
The odd thing is that I see those .mk files in my [B]ChibiOS_1.5unstable[/B] folder (located in My Doucments).



Doh, may be it is the space in "My Documents" that creates problems, try putting the OS directory into a path without spaces. I am out of ideas :-)
0 Kudos
Reply

8,623 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Wed Apr 07 13:05:14 MST 2010
I tried your suggestion - I have the same paths in my system (default install).  This is what I got:

Quote:

**** Build of configuration Default for project LPC1114 ****

make all
Makefile:55: ../../boards/EA_LPCXPRESSO_BB_1114/board.mk: No such file or directory
Makefile:56: ../../os/hal/platforms/LPC111x/platform.mk: No such file or directory
Makefile:57: ../../os/hal/hal.mk: No such file or directory
Makefile:58: ../../os/ports/GCC/ARMCMx/LPC111x/port.mk: No such file or directory
Makefile:59: ../../os/kernel/kernel.mk: No such file or directory
Makefile:60: ../../test/test.mk: No such file or directory
Makefile:192: ../../os/ports/GCC/ARM/rules.mk: No such file or directory
make: *** No rule to make target `../../os/ports/GCC/ARM/rules.mk'.  Stop.

The odd thing is that I see those .mk files in my [B]ChibiOS_1.5unstable[/B] folder (located in My Doucments).
0 Kudos
Reply

8,623 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Wed Apr 07 10:13:49 MST 2010

Quote: rmteo
I tried deleting everything and importing again - same problem.

There is some good news though.  When I use MAKE (I mistakenly thought it was make.bat) in the command window, I noticed that it created a ch.hex file as shown below:
I download the hex file to LPCXpresso (with base board) using [B]Flashmagic [/B]and it appears to be executing main.c - RGB Led's are flashing etc.

Here is a screen of main.c in LPCXpresso - there are several errors, unresolved includes and syntax error (on [B]static WORKING_AREA(waThread1, 128)[/B])



Ok it seems that the OS demo works then, it is just a project setup problem into the IDE.
Please could you try the following procedure ?

- Open the project properties.
- Open "C/C++ Build" and select "Environment".
- Create a variable PATH and put "C:\nxp\lpcxpresso_3.2\Tools\bin;C:\nxp\lpcxpresso_3.2\Tools\arm-none-eabi\bin;C:\nxp\lpcxpresso_3.2\msys\bin" as value (without quotes).
- Try to compile.

Please verify you have the same paths into the system.
0 Kudos
Reply

8,621 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Apr 06 14:50:55 MST 2010
I tried deleting everything and importing again - same problem.

There is some good news though.  When I use MAKE (I mistakenly thought it was make.bat) in the command window, I noticed that it created a ch.hex file as shown below:

Quote:
arm-none-eabi-objcopy -O ihex ch.elf ch.hex
arm-none-eabi-objcopy -O binary ch.elf ch.bin
arm-none-eabi-objdump -x --syms ch.elf > ch.dmp

I download the hex file to LPCXpresso (with base board) using [B]Flashmagic [/B]and it appears to be executing main.c - RGB Led's are flashing etc.

Here is a screen of main.c in LPCXpresso - there are several errors, unresolved includes and syntax error (on [B]static WORKING_AREA(waThread1, 128)[/B])
0 Kudos
Reply

8,621 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Tue Apr 06 14:19:59 MST 2010

Quote: rmteo
Using make.bat, it seems that there no errors,  --version gives this.



Wait a moment, why make.bat? it should be the normal GNU make, make.exe in windows. It is located in C:\nxp\lpcxpresso_3.2\msys\bin do you have this path in the PATH variable?
0 Kudos
Reply

8,621 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Tue Apr 06 14:06:50 MST 2010

Quote: rmteo
I unzipped everything - this is the contents of the directory.  Thanks for your help, Giovanni.



It looks ok, I can only suggest to delete the project from Code Red and follow the importing procedure again (http://chibios.sourceforge.net/html/article__eclipse2.html).
Make sure to keep any other project in closed state when compiling the demo.

Giovanni
0 Kudos
Reply

8,621 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Apr 06 13:54:51 MST 2010
I unzipped everything - this is the contents of the directory.  Thanks for your help, Giovanni.
0 Kudos
Reply

8,621 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Tue Apr 06 13:49:46 MST 2010

Quote: rmteo
Using make.bat, it seems that there no errors,  --version gives this.



If you are able to compile from the command line then the problem must be in the project imported into code red.

I don't understand this part of the error:


Quote:

make all
'test' is not recognized as an internal or external command,
operable program or batch file.
A subdirectory or file . already exists.
The system cannot find the path specified.
ECHO is off.



A question, do you have other projects into code red IDE? if so try to close them all, then "clean" the OS demo and then try building it again, it is possible Eclipse tries to build multiple projects.
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Apr 06 13:40:58 MST 2010
Using make.bat, it seems that there no errors,  --version gives this.

Quote:
MCM0-LPC1114-GCC>arm-none-eabi-gcc --version
arm-none-eabi-gcc (Code Red/Red Suite 2/2009_01) 4.3.3

0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Tue Apr 06 12:55:34 MST 2010
Make a small test, are you able to compile from the command line? from within the demo directory just give the command "make".

If it does not work then give the command: "arm-none-eabi-gcc --version" and post the result here. It should print "arm-none-eabi-gcc (Code Red/Red Suite 2/2009_01) 4.3.3".

Giovanni
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Apr 06 12:45:39 MST 2010
I am using Code Red.  Any suggestions? Thank you.
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Tue Apr 06 12:15:25 MST 2010
I think you have two GCC toolchains installed that have the same name arm-none-eabi- (is it codesourcery ?), the other one is picked first in the path and does not support the Cortex-M0.

If this is correct, try renaming the other toolchain directory while compiling.

Giovanni
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rmteo on Tue Apr 06 11:56:03 MST 2010
When building the demo project under LPCXpresso IDE, I get this error message.  Any suggestions?

Quote:
**** Build of configuration Default for project ARMCM0-LPC1114-GCC ****

make all
'test' is not recognized as an internal or external command,
operable program or batch file.
A subdirectory or file . already exists.
The system cannot find the path specified.
ECHO is off.
arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m0 -Wa,-amhls=../../os/ports/GCC/ARMCMx/crt0.lst   -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -I . -I../../os/ports/GCC/ARMCMx -I../../os/ports/GCC/ARMCMx/LPC111x -I../../os/ports/GCC/ARMCMx/cmsis -I../../os/kernel/include -I../../test -I../../os/hal/include -I../../os/hal/platforms/LPC111x -I../../boards/EA_LPCXPRESSO_BB_1114 -I../../os/various ../../os/ports/GCC/ARMCMx/crt0.s -o ../../os/ports/GCC/ARMCMx/crt0.o
cc1.exe: error: bad value (cortex-m0) for -mcpu= switch
make: *** [../../os/ports/GCC/ARMCMx/crt0.o] Error 1

0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gdisirio on Sun Apr 04 22:51:28 MST 2010

Quote: brucesegal
The project is not setup to build in the LPCXpresso IDE as is.

I suggest reading the documentation here:
http://chibios.sourceforge.net/html/article__eclipse2.html

It is a guide for building the demo examples using Eclipse. It is basically the same when building under the Eclipse based LPCXpresso ide



Bruce is correct, all the demos are pure makefile projects but can be imported into Eclipse using the procedure described in that article. Of course it works even with the LPCXpresso IDE (I use it too) but does not require it.

It is also recommended to add the LPCXpresso binaries path (usually C:\nxp\lpcxpresso_3.2\Tools\bin) to the system path variable, that way the compiler can be located by make.

Giovanni
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brucesegal on Sun Apr 04 20:56:54 MST 2010

Quote: thinkchip
thanks, I download, but, how I coul be open the entire project in to lpcxpresso? thanks



The project is not setup to build in the LPCXpresso IDE as is.

I suggest reading the documentation here:
http://chibios.sourceforge.net/html/article__eclipse2.html

It is a guide for building the demo examples using Eclipse. It is basically the same when building under the Eclipse based LPCXpresso ide
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thinkchip on Sun Apr 04 19:45:44 MST 2010
thanks, I download, but, how I coul be open the entire project in to lpcxpresso? thanks
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brucesegal on Sun Apr 04 17:43:15 MST 2010
You'll need the latest (trunk) version to get the M0 port.  I think that's 1.54 at this point.
0 Kudos
Reply

8,622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thinkchip on Sun Apr 04 16:56:34 MST 2010
I don't see the folder with the cortex M0, I download the version 1.4.2, but I dont see the folder LPC1114 with LPCXpresso
0 Kudos
Reply