How to Flash & Run a project in ChibiStudio
This article is a step-by-step guide showing how to reliably flash and run a project in ChibiStudio.
Step by step procedure
Creating the launch configuration
- Check if the build folder exists (if it is a freshly imported project press the hammer button)
- Open the build folder located inside your project folder
- Select the .elf file
- Go to External Tools menu (downward facing black arrow)
- Select Create OpenOCD Debug Configuration (pre-select .elf file into a project)
- In the Console window you can read Done
- The debug folder is now visible (a refresh – F5 – of the Project Explorer may be required)
In this example we are going to use an Analog Devices SDP-K1. The board comes with the CMSIS-DAP debugger and an STM32F4 microcontroller.
- Connect microcontroller to your PC
- Click External Tools menu (downward facing black arrow)
- Choose OpenOCD on CMSIS-DAP (prompts for .cfg target configuration) (Note: the menu entry depends on the debugger in use)
- Follow this path: C:\ChibiStudio\tools\openocd\scripts\boards
- Select the configuration source file adi_sdp_k1.cfg (Note: the script file depends on the microcontroller in use)
- Read successful message on the Console
Flash & Run the project
- Click Debug menu (downward facing black arrow)
- Select <…ProjectName…> (build-ch.elf)(OpenOCD, Flash and Run). You will be transferred to the Debug Perspective.
- Press the Resume button. The project is now being flashed and running on your microcontroller.