Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
# ntxbuild

[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Linux](https://img.shields.io/badge/platform-Linux-lightgrey.svg)](https://www.linux.org/)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/fdcavalcanti/ntxbuild/python-package.yml)
![Read the Docs](https://img.shields.io/readthedocs/ntxbuild)

**NuttX Build System Assistant** - A Python tool for managing and building NuttX RTOS projects with ease.

ntxbuild is a wrapper around the many tools available in the NuttX repository. It wraps around utilities
such as make, kconfig-tweak, menuconfig and most used bash scripts (such as configure.sh).

Also, it provides different features, such as downloading required toolchains through the CLI.
Also, it provides different features, such as downloading required toolchains and managing PATH.

This tool provides a command line interface that supports NuttX configuration and building,
while also providing a Python API that allows you to script your builds.

[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Linux](https://img.shields.io/badge/platform-Linux-lightgrey.svg)](https://www.linux.org/)

## Features

- **Environment Management**: Automatic NuttX workspace detection and configuration
- **Python API**: API `ntxbuild` available for building NuttX using Python scripts
- **Parallel Builds**: Support for multi-threaded builds with isolated workspaces
- **Python API**: ntxbuild is available as a Python package for building NuttX using Python scripts
- **Real-time Output**: Live build progress with proper ANSI escape sequence handling
- **Configuration Management**: Kconfig integration for easy system configuration
- **Interactive Tools**: Support for curses-based tools like menuconfig
- **Toolchin Support**: Download and use your required toolchain automatically through the CLI

## Documentation

Complete documentation, including usage examples and API reference, see: https://ntxbuild.readthedocs.io

## Requirements

- **Python 3.10+**
Expand All @@ -32,38 +37,23 @@ while also providing a Python API that allows you to script your builds.

## Quick Start

### 1. Initialize Your NuttX Environment

```bash
# Navigate to your NuttX workspace
cd /path/to/your/nuttx-workspace

# Initialize with board and defconfig
ntxbuild start sim nsh
```

### 2. Build Your Project
### Build using CLI

Navigate to your NuttX workspace and download latest NuttX and NuttX Apps using `ntxbuild`.
```bash
# Build with default settings
ntxbuild build

# Or, build with parallel jobs
ntxbuild build --parallel 8
$ mkdir ~/nuttxspace
$ cd ~/nuttxspace
$ ntxbuild download
```

### 3. Configure Your System

Build the simulator using the `nsh` defconfig.
```bash
# Run menuconfig
ntxbuild menuconfig

# Set Kconfig values
ntxbuild kconfig --set-value CONFIG_DEBUG=y
ntxbuild kconfig --set-str CONFIG_APP_NAME="MyApp"
$ ntxbuild start sim nsh
$ ntxbuild build --parallel 8
```

### Alternative Usage
### Build using Python script
Alternatively, you can automate your builds using a Python script instead of the CLI.

```python
Expand All @@ -84,6 +74,16 @@ builder.build(parallel=10)
builder.distclean()
```

### Installing toolchains
Support for installing some of the most common toolchains is available.

```bash
$ ntxbuild toolchain install gcc-arm-none-eabi
Installing toolchain gcc-arm-none-eabi for NuttX v12.12.0
✅ Toolchain gcc-arm-none-eabi installed successfully
Installation directory: /home/user/ntxenv/toolchains
Note: Toolchains are sourced automatically during build.
```

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/source/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The following are features that should be added to this project:
1. (OK) Publish on PyPi
2. (OK) Add build using CMake
3. Checkpatch script support
4. Download and install compilers
4. (OK) Download and install compilers
5. Open the docs for a board
6. Improve support for installing source (multi thread and API improvements)
7. Export defconfig (make savedefconfig)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ To install, execute the `toolchain install` command using any of the toolchains
$ ntxbuild toolchain install gcc-arm-none-eabi
Installing toolchain gcc-arm-none-eabi for NuttX v12.12.0
✅ Toolchain gcc-arm-none-eabi installed successfully
Installation directory: /home/fdcavalcanti/ntxenv/toolchains
Installation directory: /home/user/ntxenv/toolchains
Note: Toolchains are sourced automatically during build.
```

Expand Down