Day: January 9, 2019

Compiling NuttX to BeagleBoneBlack

These are the steps I took to get NuttX running on BeagleBoneBlack (BBB) :

$ git clone https://bitbucket.org/nuttx/nuttx
$ git clone https://bitbucket.org/nuttx/apps
$ cd nuttx
$ ./tools/configure.sh beaglebone-black/nsh
$ make menuconfig
Enter inside:
Build Setup —>
Build Host Platform (Linux)
Optimization Level (Normal, Full optimization)

$ make

After compilation it will create the file nuttx.bin! Copy this file to the root directory of a microSD Card formated as FAT32.

Put this microSD Card in the BBB!

Power on the BeagleBoneBlack and on serial console press some key to stop the U-Boot autoboot:

U-Boot SPL 2014.04-00015-gb4422bd (Apr 22 2014 – 13:24:29)
reading args
spl_load_image_fat_os: error reading image args, err – -1
reading u-boot.img
reading u-boot.img

U-Boot 2014.04-00015-gb4422bd (Apr 22 2014 – 13:24:29)

I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning – readenv() failed, using default environment

Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot#

Then execute:

U-Boot# load mmc 0 0x8a000000 nuttx.bin
reading nuttx.bin
188932 bytes read in 17 ms (10.6 MiB/s)

U-Boot# go 0x8a000000
## Starting application at 0x8A000000 …

NuttShell (NSH)
nsh>

Very easy! Kudos to Petro for creating this nice port!