Skip to main content

Getting Started

This page will cover common workflows for using Seb to build embedded firmware projects.

Step 1: List Available Boards

The first step in your workflow is to explore the available board configurations in the Seb registry. This helps you identify which boards are supported and choose the right one for your project.
seb registry boards
This command lists all available board configurations from the registry, showing:
  • Board name and family
  • Package information
  • Flash and RAM specifications
  • Maximum frequency
  • Board descriptions
You can also limit the number of results:
seb registry boards --limit 10

Step 2: New Project Setup

Once you’ve identified the board you want to use, initialize a new firmware project with the CMake build system. This creates a complete project structure with all necessary configuration files.
seb init { board_name } -o { my_project }
Parameters:
  • { board_name }: The name of the board configuration from the registry (e.g., stm32f407vg, nrf5340-dk)
  • -o { my_project }: Output directory name for your new project
Example:
seb init stm32f407vg -o my_firmware_project
This command will:
  • Download the board configuration from the registry
  • Generate a complete CMake-based project structure
  • Set up the ARM GCC toolchain configuration
  • Create initial source files and project configuration
  • Prepare the project for building and development
After initialization, navigate to your project directory:
cd { my_project }

Step 3: Add Design Documents

Within the documents folder of your created project, upload any relevant bill of materials (BOMs), datasheets, schematics, and other supporting documents. Seb can understand your project context and provide better help through the following commands:
seb process-bom
seb process-documents
Alternatively, sensor datasheets can be directly added to your design by downloading them from the registry:
seb datasheet get { manufacturer_part_number }
Example:
seb datasheet get BMP280
seb datasheet get MPU6050
This command searches for datasheets matching the manufacturer part number and downloads them to your project’s documents/datasheets/ folder.

Step 4: Generate Drivers

After setting up your project, you can add sensor drivers to your firmware. This process involves extracting metadata from datasheets and generating driver code.

4.1: Process Sensor Metadata

Process any uploaded and downloaded datasheets and extract structured metadata that will be used for driver generation:
seb extract-sensor-metadata
This command processes all PDF files in the documents/datasheets/ folder and extracts:
  • Sensor specifications
  • Communication interfaces (I2C, SPI, UART)
  • Register maps and addresses
  • Electrical characteristics
  • Timing requirements
You can also process a specific datasheet:
seb extract-sensor-metadata documents/datasheets/BMP280.pdf

4.2: Generate Sensor Drivers

Generate a complete sensor driver using the extracted metadata:
seb generate-sensor-driver { sensor_name }
Example:
seb generate-sensor-driver BMP280
This command generates:
  • Driver header file ({ sensor_name }.h)
  • Driver source file ({ sensor_name }.c)
  • Configuration files
  • Example usage code
The generated driver is tailored to your project’s MCU and includes initialization, read functions, and proper interface handling.

Step 5: Build and Debug

Build your firmware project using CMake. The commands differ slightly depending on your operating system.
Navigate to the build directory and configure the project:
cd build
cmake -G "Unix Makefiles" -S { project_dir }
make
Replace { project_dir } with the path to your project directory (e.g., .. if you’re already in the project root).