Skip to main content

Scenario 1: Working with an existing project

If you’re working with an existing firmware project, Seb can help you understand, enhance, and maintain it through interactive chat. Seb automatically understands your hardware context by analyzing your project’s board configuration, MCU specifications, peripheral setup, and sensor drivers. Simply navigate to your project directory and start a conversation with Seb.

Start Interactive Chat

Navigate to your project directory and start an interactive chat session:
# Navigate to your project directory
cd /path/to/your/project

# Start an interactive chat session with Seb
seb chat
Once you run seb chat, you’ll enter an interactive chat interface where you can have a back-and-forth conversation with Seb. You don’t need to run seb chat again for each question—just type your questions directly in the chat interface.

Hardware Context Awareness

Seb automatically reads and understands your hardware context from your project, including:
  • MCU and Board Configuration - Your target microcontroller, clock speeds, memory layout, and board-specific settings
  • Peripheral Configuration - I2C, SPI, UART, ADC, GPIO, and other peripherals configured in your project
  • Sensor Drivers - All sensor drivers in your project and their communication interfaces
  • Hardware Constraints - Pin assignments, timing requirements, and electrical characteristics
This hardware context enables Seb to provide accurate, hardware-aware assistance without you needing to explain your setup.

Example Questions to Ask

Here are some example questions you can ask Seb once you’re in the interactive chat:
  • “What is my project doing?” - Seb will analyze your project structure, hardware configuration, and explain its functionality
  • “Can you list out my current drivers?” - Get a comprehensive list of all drivers in your project with their hardware interfaces
  • “If there are issues you think should be fixed, just list them” - Seb will identify potential problems considering your specific hardware setup and suggest improvements
Seb will analyze your project structure, source files, hardware configuration, and peripherals to provide context-aware answers that are specific to your hardware platform. You can continue the conversation by asking follow-up questions, requesting code changes, or getting help with specific aspects of your project—all within the same interactive session.

Scenario 2: Starting a new project

Starting a new firmware project from scratch? Seb can help you set up a complete, production-ready project structure in minutes.

Initialize Your Project

Begin by exploring available board configurations and initializing your project:
# List available boards
seb registry boards

# Initialize a new project with your chosen board
seb init stm32f407vg -o my_firmware_project

# Navigate to your new project
cd my_firmware_project
This creates a complete CMake-based project structure with:
  • Board-specific configuration
  • ARM GCC toolchain setup
  • Initial source files
  • Build system configuration

Upload Design Documents

Add your design documents to the project’s documents/ folder. You can upload:
  • Bill of Materials (BOMs)
  • Schematics
  • Datasheets
  • Other supporting design documents
Alternatively, download datasheets directly from the registry:
seb datasheet get BMP280
seb datasheet get MPU6050

Process Documents

Once you’ve uploaded your design documents, process them to extract structured information:
# Process bill of materials
seb process-bom

# Process design documents, schematics, and datasheets
seb process-documents

# Extract sensor metadata from datasheets
seb extract-sensor-metadata
These commands analyze your documents and extract relevant information that Seb can use to understand your hardware requirements and generate appropriate code.

Generate Sensor Drivers

Use Seb chat to generate drivers for your sensors. Start an interactive chat session and ask Seb to generate the drivers:
# Start interactive chat
seb chat
Once in the chat interface, you can ask Seb to generate drivers:
  • “Generate a driver for BMP280” - Seb will create a complete driver based on the processed datasheet metadata
  • “Generate drivers for all my sensors” - Seb will generate drivers for all sensors with processed metadata
Seb will generate drivers tailored to your project’s MCU and hardware configuration, including initialization functions, read/write operations, and proper interface handling. After generating drivers, you can validate and integrate them with your main application:
  • “Validate the BMP280 driver” - Seb will check the driver for correctness, proper error handling, and hardware compatibility
  • “Show me how to integrate the BMP280 driver into my main application” - Seb will provide integration code and explain how to initialize and use the driver in your main application loop
  • “Check if my driver integration is correct” - Seb will review your code and identify any integration issues or improvements needed

Write Application Code

Use Seb chat to help you write your main application code. Seb understands your hardware configuration, drivers, and project structure, enabling it to generate application code that integrates seamlessly with your setup:
# Start interactive chat
seb chat
Ask Seb to help with application development:
  • “Write a main application loop that reads from BMP280 every second” - Seb will generate application code that initializes and uses your sensors
  • “Create an interrupt handler for button presses” - Seb will write interrupt service routines tailored to your hardware
  • “Implement a state machine for my application” - Seb can help structure your application logic
  • “Show me how to use multiple sensors together” - Seb will provide code that coordinates multiple drivers
Seb generates code that:
  • Properly initializes your hardware and drivers
  • Follows best practices for embedded systems
  • Is compatible with your MCU and board configuration
  • Integrates with your existing project structure

Build and Test

Build your project and start debugging:
# Build the project
cd build
cmake ..
make

# Start debugging
seb debug

Get Development Assistance

Throughout development, use Seb’s interactive chat to get help. Start a chat session and ask questions:
# Start interactive chat
seb chat
Once in the chat interface, you can ask questions like:
  • “How should I structure my main application loop?” - Get implementation guidance
  • “What’s the best way to configure SPI for my display?” - Get help with peripheral configuration
  • “What are the recommended interrupt priorities for my use case?” - Understand best practices for your hardware
You can have a back-and-forth conversation with Seb to refine your implementation and get hardware-specific recommendations.