CeedlingEmbedded
This repository will be help you quick start for embedded project unit testing. This project includes code beautifier, static analysis tool. You can generates code coverage reports, test reports and static analysis reports as html files. Also there are many helpful script files.
Install / Use
/learn @Emre-ee/CeedlingEmbeddedREADME
CeedlingEmbedded
This repository will be help you quick start for embedded project unit testing. This project includes code beautifier, static analysis tool. You can generates code coverage reports, test reports and static analysis reports as html files. Also there are many helpful script files.
Contents
Introduction
Unit test functions written with Ceedling. You can visit this github page and you can learn information more about Ceedling.
This project was created to test any microcontroller. There is called name as lib folder that is you can add specific microcontroller library. Test source files are located under the test folder. Firmware files are located under the src folder.There are ruby files used by ceedling under the plugins folder. Generated files are located under the build folder. There are script files under the scripts folder. code_beautifer.sh formatting the all files according to configuration file that is uncrustify.cfg.
Ceedling can build project according to microcontroller compilers. However, since we wanted to test on the computer, we made arrangements for the GCC compiler.
Note: I wanted to use VS Code IDE because there are many useful extensions and you can easily build your project .
Setup
You have to have following dependencies.
- Ceedling build system Ceedling
- GCC compiler gcc
- Cppcheck static analysis tool Cppcheck
- Uncrustify code beautifier Uncrustify
- Ruby 3.0.6-1 (x64) release downloaded. Ruby
- Python 3.11.4 release downloaded. Python
- You should write following command on your command prompt for html file convert.
pip install pippip install Pygments - Gcovr code coverage (4.1 release) gcovr
NOTE: Sometimes Python packages give errors when installed via the command line. Therefore, you can download manually to your computer with this link.
You should be sure all packages safely downloaded on your computer.
ceedling version
gcc --version
cppcheck --version
ruby --version
gcovr --version
uncrustify --version
Usage
If you want to run unit test, you can go on your root of project and run following command.
ceedling test:all
You can define buttons and you can easily build your project. There task buttons defines with VS Code IDE extension who name is spencerwmiles.vscode-task-buttons.
- Test All button
ceedling test:allcommand run. - Re-Test All button allows recompiling the code and running the tests by executing the
ceedling clobberandceedling test:allcommands sequentially. - Cleand build button is used to delete the output files created under the build folder by running the ``ceedling clobber``` command.
- Code Beautifier button is used to edit software codes by running the
./code_beautifier.shcommand. - Report HTML button generates code coverage report of test files by running ``ceedling gcov:all utils:gcov ``` commands.
- cppcheck button performs static analysis of the code by running the
./html-report-stats/static_run.shcommand. - Test Result Open button allows us to see the test results by running the
start GcovCoverageResults.html,start stats.htmlandstart report.htmlcommands sequentially.
Reports Images
Test Result Report

Code Coverage Report

Static Analysis Report

Related Skills
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
