NuttX - Step-By-Step

NuttX - http://nuttx.org/

So what to get here - you think?
You can here find a step-by-step guide for having NuttX on your favorite evaluation board.
I did a lot of googling as well as experimentation on the NuttX installation before deciding a step-by-step guide should be available … But as NuttX teams says – you will find everything in the README.TXT files :-)

 

Current description goes only for Linux - future will (if possible) cover the windows solution too!

 

My setup is

  • ARM eval board STM32F103VET6 (w 2.8” TFTLCD)
  • Laptop w/ Windows 7
  • Virtualbox with an Ubuntu 12.04 LTS installation
  • J-Link JTAG debugger (attached to the EVB via USB)

 

The Goal

– easy! – a working tool chain and first hello-world app working within the NuttX doamin.

First priority was the linux secondly the windows world! Found lot of issues and unfinished work for the windows part so skipped that.

 

Step

Area

What

 1

PRECONDITIONS
Preconditions: (as listed above)

  • ARM eval board STM32F103VET6 (w 2.8” TFTLCD)
  • Windows 7
  • Virtualbox with an Ubuntu 12.04 LTS installation
  • J-Link JTAG debugger

 

 2

Make a folder for your source code

  • mkdir /home/john/workspace/nuttx      (refered to as home directory!)

 

And move into that new directory

  • cd nuttx
 3

GET NUTTX

Now get NuttX code

 

Install Source @ linux directory

 

  • git clone http://git.code.sf.net/p/nuttx/git nuttx-code

OR

 

 4

ARM TOOL CHAIN

 

Now the ARM embedded tool chain

Download the GCC-ARM-EMBEDDED:

https://launchpad.net/gcc-arm-embedded/+download in a browser

(current version looks like this as of 2013-dec-xx)

 

 

 

I’m using version gcc-arm-none-eabi-4_8-xxxx-linux.tar.bz2 but you should be able to use any newer or older versions too.

 

Decompress the toolchain file:

  • tar xvf gcc-arm-none-eabi-4_8-2013xxxx-linux.tar.bz2

 

Move toolchain package to /usr/local directory:

  • sudo mv gcc-arm-none-eabi-4_8-xxxx   /usr/local/gcc-arm-embedded

 

'xxxx' = the version you downloaded.

Add the directory to your PATH in current view/session:

  • export PATH=/usr/local/gcc-arm-embedded/bin:$PATH

 

Remember to add this path /usr/local/gcc-arm-embedded  to your PATH variable in .bashrc

 

Now you have an ARM embedded toolchain 4.8.3 installed!

IF your tool chain is default gcc compliant you should not need to make further corrections in any .config file   . (at least to my knowledge)

 5

CONFIGURE NuttX

 

Lets configure NuttX for your target

 

  • Cd nuttx/nuttx-code/nuttx/tools
  • ./configure.sh stm32f100rc_generic/nsh  

 

Where    stm32f100rc_generic   is your target name!

 

This will set/change the .config file in the nuttx root directory. This is used during compile/linking …

 

FYI-FYI-FYI

I saw on a site following changes were required too (but did not use it myself)…

...
#CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT is not set
CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y

 6

BUILD

Build the projects configured

 

  • cd workspace/nuttx/nuttx-code/nuttx/

  • Make

 

 

Voila!!!   Things get compiled, linked and build ends showing a copy of .bin/.hex files!

 

  • Make clean all                    ;complete deletes alle and rebuilds from scratch!
 

 

 

 

 

 

 7

ADDING APPLICATIONS

 

<to come later>

 8

CONFIGURING APPLICATIONS

 

<to come later>

 9

FLASHING TARGETS

 

<to come later>

 10

DEBUGGING TARGETS

 

<to come later>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Links - from where I got the help to compile the above

http://nuttx.org/

http://acassis.wordpress.com/2013/04/26/running-nuttx-on-kinetis-kl25z-freedom-board-frdm-kl25z/

http://acassis.wordpress.com/?s=nuttx&submit=Search

http://acassis.wordpress.com/2010/08/01/getting-started-to-nuttx/

http://nuttx.org/doku.php?id=wiki:howtos:build-and-install-nuttx-for-the-lm3s6965-ek-in-linux

 

CodeSourcery --> 

http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

 

GNU ARM toolchain

https://launchpad.net/gcc-arm-embedded/+download

 

 

Windows & eclipse

Here a very recommendable page with lot of good input ...

http://embeddedprogrammer.blogspot.dk/2012/09/stm32f4discovery-development-with-gcc.html

 

 

... and of cause some of the many README.txt files in NuttX.

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Articles Panel

  Article Posted By Date Reads
WCET - Worst Case Execution Timings Calculator
Tools
johnk
28-06-2015 19:2912819
Embedded-Tracer-System
Tools
johnk
16-03-2015 18:222016
NuttX - Step-By-Step
Tools
johnk
30-12-2013 17:185590
Tools used
Tools
johnk
27-10-2013 12:133221
List of my robots
My robots
johnk
19-07-2013 08:442934
JoKaBot - Home build from scratch
My robots
johnk
19-07-2013 08:045473
C-Sharp (references and projects)
Oldies
johnk
18-07-2013 19:193336
Home communications
Technology
johnk
18-07-2013 18:233536
Various links
My Collection
johnk
17-07-2013 09:046848
ARM - ARM7/9/11 + Cortex
Technology
johnk
17-07-2013 08:493534
AVR32
Technology
johnk
17-07-2013 08:413623
Raspberry PI
Technology
johnk
17-07-2013 08:369264
Robotics Links
Tools
johnk
17-07-2013 08:367461
Robotics in general
Robotics
johnk
17-07-2013 08:352820
Renesas processors (V850, RL78...)
Technology
johnk
17-07-2013 08:113399

Total Articles: 54 :: Total Article Categories: 16
 

Articles

My Collection (1) My robots (2)
Oldies (5)
Old Projects - very old
Process & Methods (7)
Projects (12) Robotics (1)
Technology (6) Testing (1)
Tools (12) Working on ... (7)
Projects Im currently working on
Render time: 0.03 seconds
701,399 unique visits