Installing Buildroot toolchain for Nuttx
[Warning: This post is a backup recovery from my previous Wordpress blog. All content was automatically converted accessing a MySQL database using a Python script (details). Mostly are in Portuguese but if you are interest I can translate to English. If you found any problem dont’t hesitate to contact me in comments.]
On my previous post I discussed some stats using Buildroot toolchain to build Nuttx. Today I'll add the necessary steps to build on Ubuntu. Ubuntu is de-facto GNU/Linux distribution (although I'm Gentoo user) and many users, from different areas, uses it [they are not necessary command line experts] so I decided to publish my raw tutorial. If you are familiarized installing files from source-code you probably won't need this...
1. Dependencies
$ sudo apt-get install libncurses5-dev $ sudo apt-get install bison $ sudo apt-get install flex $ sudo apg-get install libgmp3-dev $ sudo apg-get install libmpc-dev $ sudo apg-get install libmpfr-dev $ sudo apg-get install binutils-dev
2. Download
$ mkdir Nuttx $ cd Nuttx
$ wget http://sourceforge.net/projects/nuttx/files/nuttx/nuttx-5.10/nuttx-5.10.tar.gz/download $ wget http://sourceforge.net/projects/nuttx/files/buildroot/buildroot-1.8/buildroot-1.8.tar.gz/download
$ ls buildroot-1.8.tar.gz nuttx-5.10.tar.gz
3. Install
$ tar zxf buildroot-1.8.tar.gz $ tar zxf nuttx-5.10.tar.gz
$ cd misc/ $ ln -s ../nuttx-5.10 nuttx
You need define some Nuttx files before:
$ cd nuttx/ $ cd tools/ $ ./configure.sh nucleus2g/nsh # or ./configure <board-name> $ cd -
$ cd ../misc
I’m building a toolchain for arm cortex-m3 but check configs/ to other configuration files.
$ cd buildroot-1.8/ $ cp configs/cortexm3-defconfig-4.3.3 . $ mv cortexm3-defconfig-4.3.3 .config
$ make menuconfig [If you don't have any changes, just click on 'exit' and save the configuration]
$ make [will download and build all necessary files]
$ cd build_arm_nofpu/staging_dir/bin $ export PATH=`pwd`:$PATH $ cd -
$ cd ../nuttx [use normally]
I usually create an script to (re)define the $PATH for necessary building tools, something like:
$ echo "export PATH=\""$PATH"\"" > compiler.sh