Table of Contents
Docker
We can use Docker to set up a stable and repeatable environment where our firmware is built and unit tested. Furthermore, we can use access the hardware from the container to perform integration testing. A shared directory will allow us to access our code from within the containerized environment.
from https://dev.to/djangostars/what-is-docker-and-how-to-use-it-with-python-tutorial-87a:
- 1 application = 1 container.
- Run the process in the foreground (don't use systemd, upstart or any other similar tools).
- Keep data out of containers – use volumes.
- Do not use SSH (if you need to step into container, you can use the docker exec command).
- Avoid manual configurations (or actions) inside container.
https://dev.to/dalimay28/using-docker-for-embedded-systems-development-b16
https://blog.feabhas.com/2017/09/introduction-docker-embedded-developers-part-1-getting-started/
https://ownyourbits.com/2017/06/20/c-build-environment-in-a-docker-container/
# install colorgcc export PATH=/home/docker/bin:$PATH wget https://raw.githubusercontent.com/olibre/colorgcc/master/colorgcc.pl wget https://raw.githubusercontent.com/olibre/colorgcc/master/colorgccrc sudo apt-get install perl-modules-5.26 ln -s colorgcc.pl arm-none-eabi-gcc ln -s colorgcc.pl arm-none-eabi-ld
Unit testing
http://embunit.sourceforge.net/
https://dmitryfrank.com/articles/unit_testing_embedded_c_applications
http://eradman.com/posts/tdd-in-c.html
http://www.electronvector.com/
https://embeddedartistry.com/blog/2018/10/15/embedded-systems-testing-resources
https://interrupt.memfault.com/blog/unit-testing-basics
framekworks:
- seatest
- MinUnit
- Unity