This update is about compiling NuttX for the Jupiter Nano. It builds on last week’s update on just running NuttX. Today, we’ll learn about how to compile it from scratch, get it onto the board, run, configure, and debug it.
I’m also providing a link to the documentation on the Starcat Jupiter Nano documentation website because some of these instruction sections are pretty long.
The full documentation is located here: NuttX on the Jupiter Nano. You can just click that link and start reading there if you want, or else follow this outline.
This process can be outlined with the following steps:
Create a bootable NuttX SD Card
(This was covered in the last update.) You’ll need to do this so you can boot into the U-Boot bootloader, which you’ll need to do if you’re setting up the board’s memory for the first time or if you don’t have a JTAG hardware debugger.
Install NuttX prerequisites, compiler, and get source code
There are a bunch of tools needed to compile NuttX, as well as a specific ARM compiler. Here’s how to install it all.
This will actually perform the compilation.
Run NuttX on the Jupiter Nano
Now you need to get the compiled NuttX binary onto the chip. You can either copy it to the SD Card or use a J-Link JTAG debugger to load it directly into the board’s memory.
Configure NuttX with different options enabled (optional)
One of NuttX’s big strengths is that it is highly configurable. There are a lot of optional modules and features
that can be enabled or disabled. If disabled, they are not included in the binary, which makes the
binary take up less space and provide less ‘attack surface’ from a security perspective – there are fewer things to go
Debug a running NuttX binary using gdb
It’s easy to use
gdb to debug a running NuttX binary. This is very useful for finding and fixing bugs in NuttX
applications, especially ones that interface to external hardware. It’s also essential for writing device drivers
for new hardware.
Please visit the complete Jupiter Nano documentation on the Starcat Documentation site for lots more hardware info, pinouts, links to hardware design files, software source code, and the Linux and NuttX instructions. More detailed info will be coming here, and I’ll link to it in future updates.
As always, if you have questions, email me at email@example.com!