This set of utils, folders, config files which can be used as template for each new firmware project. This template based on Ceedling Build System. This build system used for build as firmware and tests.
If you decide use this template in your firmware project then you need do next steps:
- Copy this project to your local machine;
- Install Ceedling on your machine;
- Add your firmware source code into
src\
folder; - Add your unit tests into
test\src
folder;
- .vscode - VSCode config files
- build - frimware builds
- docs - projects documentations
- linker - linker scripts
- options - config files for Ceedling build system
- debug.yml - build options for debug configuration
- release.yml - build options for release configuration
- scripts - a collection of useful scripts for the project
- githooks - git hooks scripts
- add_firmware_version.py - python script for creating
version.h
file which contain several definitions for version firmware store - format_all_files.py - bat script formatting all files in
src
folder
- src - source code of project
- test - folder which contain all necessary for unit testing
- fake - are a working implementation, but usually substitute their dependencies with something simpler and easier for a test environment
- mock - are an implementation that is controlled by the unit test. They can be pre-programmed with return values, check values of arguments, and help verify that functions are called
- src - source code of unit tests
- stubs - are a trivial implementation that returns canned values, generally always returning valid or invalid values
- support - various functions, macros to extend the functionality of the basic framework
- tools - several useful binary utils
- clang-format - tool to automatically format C/C++/Objective-C code
- clang-tidy - clang-based C++ “linter” tool
- pvs-studio - static analyser for C/C++
- vendor - binaries utils of ceedling framework
- .clang-format - config file for clang-format util
- .gitignore - config file for git ignoring
- ceedling.cmd - command script for Ceedling build system
- Doxygen.conf - config file for doxygen document generator
- project.yml - config file for Ceedling build system (Common)
- project_pic32.yml - config file for Ceedling build system (PIC32)
- project_stm32.yml - config file for Ceedling build system (STM32)
- project_x86.yml - config file for Ceedling build system (x86)
- pvs-studio.bat - script for running PVStudio static analyzer
- PVS-Studio.cfg - config file for PVStudio static analyzer
- rakefile.rb - config and tasks file for Ceedling build system
- Build pic32 release firmware:
ceedling project:project_pic32 options:release release
- Build pic32 debug firmware:
ceedling project:project_pic32 options:debug release
- Build stm32 release firmware:
ceedling project:project_stm32 options:release release
- Build stm32 debug firmware:
ceedling project:project_stm32 options:debug release
- Build x86 release firmware:
ceedling project:project_x86 options:release release
- Build x86 debug firmware:
ceedling project:project_x86 options:debug release
- Build Clean
ceedling clean
ceedling gcov:all utils:gcov
ceedling gcov:all utils:gcov
- Run Static Analyser (PVStudio):
ceedling clean
- Run documents generator:
ceedling doxygen
- Run linter:
ceedling linter
- PIC32MX Erase Chip:
ipecmd.exe -TPPK3 -{device} -E -OL
- PIC32MX Write Chip:
ipecmd.exe -TPPK3 -{device} -F${file} -M -OL
- PIC32MX Read Chip:
ipecmd.exe -TPPK3 -{device} -GF${file}
- PIC32MX Reset Chip
ipecmd.exe -TPPK3 -{device} -OL
- STM32 Write Chip:
st-flash write ${file} ${addr} & st-flash reset
- STM32 Erase Chip:
st-flash erase & st-flash reset
- STM32 Read Chip:
st-flash --area=option read ${file}
- STM32 Reset Chip:
st-flash reset
- Openocd Run:
openocd -f ${file}.cfg
- STM32 Write Flash:
JLink.exe -Device {device} -If SWD -Speed 4000 ${file}.jlink
Inside .vscode
folder you can find tasks.json
file which contain description for several helpful tasks which lets you run build, testing, flashing etc. using VSCode instead CLI.
- PIC32 Release Build:
PIC32 Release Build
- PIC32 Debug Build:
PIC32 Debug Build
- x86 Release Build:
x86 Release Build
- x86 Debug Build:
x86 Debug Build
- STM32 Release Build:
STM32 Release Build
- STM32 Debug Build:
STM32 Debug Build
- Build Clean:
Clean
- Run Unit Tests:
Run Unit Tests
- Run PVS-Studio Static Analyzer:
Run Static Analyzer
- Generate Doxygen Documentation:
Generate Documentation
- Run Clang-format Linter:
Run Linter
- Erase/Write/Read/Reset PIC32 chip:
PIC32MX Erase Flash
PIC32MX Write Flash
PIC32MX Read Flash
PIC32MX Reset
- Erase/Write/Read/Reset STM32 chip:
STM32 Write Flash
STM32 Erase Flash
STM32 Read Flash
STM32 Reset