Skip to content

Commit 40fbd0d

Browse files
committed
cleanup and test file
1 parent 29d9fc7 commit 40fbd0d

File tree

638 files changed

+43
-95964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

638 files changed

+43
-95964
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Build and Test common libraries
2+
on: push
3+
jobs:
4+
setup_and_build_check:
5+
runs-on: ubuntu-22.04
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: build + test
9+
run: |
10+
cd common_libraries/
11+
make test
12+

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,35 @@ Embedded Systems Repository for UBC Rover
33

44
This contains all our firmware and embedded code. From both elec and software.
55

6-
Shamefully, we commit build code. This will likley change soon, but we don't have all the build tools installed on each computer and before we set up a proper toolchain this removes some possible errors around building for the wrong MCU, mismatched dependencies etc.
6+
Some build code is committed, which will likely change soon. But we don't have a setup script for zephyr, and use teensy tools to flash our old arm, so by having build code, we don't need to install zephyr on all our computers.
77

8+
### CONTRIBUTING
9+
Currently, we protect main branch by PR approval and an automated test of our common libraries.
10+
More automated tests will follow.
11+
12+
13+
### ZephyrRTOS
14+
We have some zephyr rtos projects under zephyr_projects. To build/develop them you will need to install zephyr: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
15+
16+
### Arduino
17+
We have some arduino projects, under arduino_firmware.
18+
19+
### common libraries
20+
Under common_libs/ we have our common libraries. These should be hardware agnostic, modular and testable.
21+
We have an example here, that shows the general workflow for creating a common library module, including Catch2 testing.
22+
23+
### Testing
24+
We use Catch2 for testing cpp and c code. It's an easy to use, and easy to integrate tool for cpp unit tests.
25+
Ideally, all our code has test coverage. Test driven development (TDD) is a powerful process where if done perfectly, you never push a bug that would impact system operations, because your tests would cover every needed operation of the system.
26+
27+
Embedded systems development's biggest difference to regular software is that hardware is always in the loop, and this makes debugging harder. "is it the code or the hardware? is this my problem or elec's problem?" With really good test code, we can blame more things on elec!!
28+
29+
Catch2 docs are in it's readme: https://github.com/catchorg/Catch2?tab=readme-ov-file
30+
31+
A good book on TDD is Test Driven Development for Embedded Systems: https://pragprog.com/titles/jgade/test-driven-development-for-embedded-c/
32+
33+
### ROS2 Tests
34+
We have some ros2 code in here, specifically for testing firmware. Might be moved to RoverFlake2 in the future.
35+
36+
### End Notes
37+
The filestructure is currently based around development enviroments, we may change this to project based structure in the future.

mini_rover/Mini_Rover_Firmware_ESP32_FreeRTOS/Mini_Rover_Firmware_ESP32_FreeRTOS.ino renamed to arduino_firmware/mini_rover/Mini_Rover_Firmware_ESP32_FreeRTOS/Mini_Rover_Firmware_ESP32_FreeRTOS.ino

File renamed without changes.

mini_rover/src/mini_rover_h_interface/CMakeLists.txt renamed to arduino_firmware/mini_rover/src/mini_rover_h_interface/CMakeLists.txt

File renamed without changes.

mini_rover/src/mini_rover_h_interface/package.xml renamed to arduino_firmware/mini_rover/src/mini_rover_h_interface/package.xml

File renamed without changes.

mini_rover/src/mini_rover_h_interface/src/debug.py renamed to arduino_firmware/mini_rover/src/mini_rover_h_interface/src/debug.py

File renamed without changes.

mini_rover/src/mini_rover_h_interface/src/mini_rover_debug.py renamed to arduino_firmware/mini_rover/src/mini_rover_h_interface/src/mini_rover_debug.py

File renamed without changes.

mini_rover/src/mini_rover_h_interface/src/mini_rover_h_interface.py renamed to arduino_firmware/mini_rover/src/mini_rover_h_interface/src/mini_rover_h_interface.py

File renamed without changes.

zephyr-projects/arm_firmware_teensy41/.vscode/c_cpp_properties.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

zephyr-projects/arm_firmware_teensy41/.vscode/settings.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)