Skip to content
Docs
WebsiteRequest a demo

Guides

Start from an existing project

Open the firmware you already have, or import a copy, then give Flash its context and a baseline build.

Open it or import a copy

Flash works with the firmware you already have. Choose how to bring it in.

Open the folderImport a copy
What happensFlash works in your folder, with your repository and its history.Flash inspects the project and copies it into a new folder set up for your board.
Your originalChanges happen there, after you review them.Stays untouched. Flash never runs files from it.
Choose it whenThe project is yours and already builds.You want a clean copy to try Flash on, or the project comes from another tool.
Keep in mind
Import recognises ESP-IDF, STM32CubeMX, STM32CubeIDE, PlatformIO, Arduino and Zephyr projects. Any other folder can still be opened.

Open the folder

Flash uses the folder as the boundary for its context, conversations and project tools. The board does not need to be connected yet.

In Flash IDE

  1. On the start screen, choose Open project….
  2. Select the folder that holds the build files, such as CMakeLists.txt or platformio.ini.

Or import a copy

Import inspects the project and shows what it found before anything is copied. The copy goes into a new folder.

In Flash IDE

  1. On the start screen, choose Create firmware project…, then the Import tab.
  2. Choose the project folder and select Inspect sources. Flash shows the project type, its size and whether the layout is recognised.
  3. Set the name, destination, hardware and profile, then choose Review import.
  4. Check the plan. If Flash should build the copy, tick the option to trust its build configuration.
  5. Choose Apply reviewed operation.
From a script
flash project inspect --source ~/firmware/sensorflash project import --source ~/firmware/sensor --parent ~/Projects --name sensor
Keep in mind
Without --apply, the import command only shows the plan. Run it again with --apply to copy.

Give Flash the project context

Run /init once. Flash reads the build files and sources, detects the target and writes what it learned to FLASH.md. Every later conversation starts from that file, so check it.

In Flash IDE

  1. Type /init in the chat and send it.
  2. Open FLASH.md and correct anything Flash got wrong.

Confirm the hardware

Check that the detected board and chip match the one on your desk, including its revision. Then add the parts fitted to it, as in Add a peripheral, so Flash works from their datasheets.

Build a baseline

Build the firmware before you change anything. A passing build shows the toolchain works. A failing one shows what to fix first, before it gets mixed up with your own changes.

Ask Flash
Build the firmware as it is, without changing any files.Report the result and list any missing tools or settings before installing anything.
Keep in mind
Keep this result. When a later build fails, you will know whether your change or the project caused it.

Continue reading