Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
718afbe
Create readme.md
MichaelGreenough Apr 22, 2024
24e9c7d
Update and rename readme.md to README.md
MichaelGreenough Apr 22, 2024
3f62d67
Add files via upload
MichaelGreenough Apr 22, 2024
94ffc64
Delete projects/wingsail-controller/nmea-sample.txt
MichaelGreenough Apr 22, 2024
8dd726d
Add files via upload
MichaelGreenough Apr 22, 2024
a0781f2
Added lenght check and made changes to avoid copying RAW data.
MichaelGreenough Apr 22, 2024
f5fecbc
Functional NMEA0183 reveiving and AIS parsing
MichaelGreenough Jun 1, 2024
87d5352
Functional NMEA0183 reveiving and AIS parsing
MichaelGreenough Jun 1, 2024
d70aa11
Changes I did a while ago, not sure what exactly got changed or the s…
MichaelGreenough Nov 6, 2024
b81b58f
can.h first commit
alisha1697 Mar 9, 2025
d54680a
can.c first commit
alisha1697 Mar 9, 2025
5941dc4
Documentation of can.c
alisha1697 Mar 22, 2025
a931c17
Documented can.h
alisha1697 Mar 22, 2025
85bae8f
Documentation complete can.c
alisha1697 Mar 22, 2025
84190cd
Add files via upload
hml04 Mar 24, 2025
bc1da01
Create RUDDER.h
sailbot-eleclead Mar 26, 2025
3c4cdfc
Create RUDDER.c
sailbot-eleclead Mar 26, 2025
4a9ccd3
Create readme.md
sailbot-eleclead Mar 26, 2025
26dcfbf
Update readme.md
sailbot-eleclead Mar 26, 2025
0c8bc76
Added source linking
MichaelGreenough Apr 5, 2025
94448df
fixed frame range
alisha1697 Apr 5, 2025
a96a811
git test
ChristianConroy Apr 5, 2025
cc101aa
testing
hml04 Apr 5, 2025
a1fd672
Added Error Handling to Briter
ChristianConroy Apr 5, 2025
cbf24cf
Update readme.md
JoshuaO956 May 11, 2025
99175f9
Added comments
ChristianConroy May 18, 2025
9d59c22
Merge branch 'rudder-working-branch' of github.com:UBCSailbot/com-mod…
ChristianConroy May 18, 2025
45cb645
Large commit: UART CM IRQ, Ship Tracker Refactor, Thread Safety and A…
MichaelGreenough May 25, 2025
72d56f8
Added some documentation to AIS and SHIP_TRACKER
MichaelGreenough May 26, 2025
f089e46
Need multi-scentence support
MichaelGreenough May 26, 2025
12aab4d
Refactor AIS to have seperate data class
MichaelGreenough May 26, 2025
b87e927
Initial multi message parsing support
MichaelGreenough May 26, 2025
789b8d0
Code clean up
MichaelGreenough May 26, 2025
9e0024c
filter works...too much
alisha1697 May 29, 2025
5cbe481
CANFD project file
alisha1697 May 31, 2025
ad68aae
Update can.c
alisha1697 Jun 10, 2025
fbabef5
Update can.h
alisha1697 Jun 10, 2025
1961fa5
fixed parsing in test_canfd.c
alisha1697 Jun 10, 2025
19d4454
Updated can.c with CAN_Receive and fixed definition error
alisha1697 Jun 11, 2025
aeb4e9c
Updated can.h
alisha1697 Jun 11, 2025
4aad34f
FDCAN_Serial_Testing Zip CUBEIDE project file
alisha1697 Jun 14, 2025
db0a73c
IDK What I Changed
MichaelGreenough Jun 21, 2025
86e78e2
Updated rudder PID
JoshuaO956 Jul 16, 2025
9317a5a
Setup IOC and test code for encoder and motor
MichaelGreenough Jul 16, 2025
95d2ccf
Motor cal code
MichaelGreenough Jul 17, 2025
e553625
Motor deadband code
MichaelGreenough Jul 17, 2025
f7c84fd
Code cleanup
MichaelGreenough Jul 26, 2025
4f8333c
Added deadband calibration
MichaelGreenough Jul 26, 2025
81219f6
More tweaks, added serial controllable motor zeroing script
MichaelGreenough Jul 26, 2025
69b510e
Beginings of utils
MichaelGreenough Jul 26, 2025
9aba891
Working PID on the boat, just need CANBus integration
MichaelGreenough Jul 31, 2025
3cf4a3c
Configured ioc for CANFD
MichaelGreenough Aug 3, 2025
90cb1cb
Merge remote-tracking branch 'origin/alisha1697-can-library-1' into J…
MichaelGreenough Aug 3, 2025
bab6644
Working CAN (had to rebuild drivers)
MichaelGreenough Aug 3, 2025
0f7f1ee
Working CANBUS code
MichaelGreenough Aug 16, 2025
e8b51b3
Base PID implemented
emmakateduong Sep 23, 2025
8f0404d
Wingsail working branch (#31)
MichaelGreenough Sep 29, 2025
d79f278
Moved NMEA 0183 file
MichaelGreenough Sep 29, 2025
b6bdd01
Moved NMEA 0183 file (#32)
MichaelGreenough Sep 29, 2025
6b0a90c
somewhat incomplete... rudder control w/ a bit of tacking and gybing
emmakateduong Oct 4, 2025
3d10c2e
tacking gybing lowwind no irons oscillates around error uh oh
emmakateduong Oct 4, 2025
f18f22f
pushing again
emmakateduong Oct 4, 2025
7425d64
Build code (finally)
georgesleen Oct 11, 2025
64fa461
Update README.md with IOC config
MichaelGreenough Oct 11, 2025
5137fc9
with added params and some issues fixed
emmakateduong Oct 18, 2025
ee1a5df
Merge branch 'main' into rudder-working-branch
MichaelGreenough Oct 21, 2025
97a335a
Updated from main
MichaelGreenough Oct 21, 2025
223498d
Renamed projects folder
MichaelGreenough Oct 21, 2025
0fd985b
Merged in main
MichaelGreenough Oct 21, 2025
6d89c8d
Add files via upload
JoshuaO956 Oct 24, 2025
1f7acce
Updated with working branch
MichaelGreenough Oct 25, 2025
254f1d4
Updated with working branch
MichaelGreenough Oct 25, 2025
9395fba
Update README.md
MichaelGreenough Oct 25, 2025
d6ca0b3
com-modules update
alisha1697 Oct 25, 2025
29f7c4c
Merge branch 'can-library' of https://github.com/UBCSailbot/com-modul…
alisha1697 Oct 25, 2025
8865c38
removed files
alisha1697 Oct 25, 2025
aa17c31
Restore .ioc file
georgesleen Oct 25, 2025
0a84961
Fix merge error in CubeIDE project
georgesleen Oct 25, 2025
4bddf18
Add makefile so that helix can be used instead of CubeIDE
georgesleen Oct 25, 2025
b19fe14
Restore CubeIDE project files
georgesleen Oct 25, 2025
d342b80
Fix merge errors in stm32u5xx_it.h and update relative include paths
georgesleen Oct 25, 2025
da98149
makefile working
georgesleen Oct 25, 2025
704eefc
Write config for clangd to use helix instead of CubeIDE
georgesleen Oct 25, 2025
a9f515d
Update .gitignore for other code editors
georgesleen Oct 25, 2025
212af3b
Remove tracked cache
georgesleen Oct 25, 2025
7f949f2
Test UART printing working again
georgesleen Oct 28, 2025
6a0fe32
Moved to drv-modules
MichaelGreenough Oct 30, 2025
6526de1
Del
MichaelGreenough Oct 30, 2025
f717bf8
Merged in CAN library
MichaelGreenough Oct 30, 2025
ed782e9
Merge remote-tracking branch 'origin/wingsail-controller-AIS' into wi…
MichaelGreenough Oct 30, 2025
016d4b7
CANFD Setup
MichaelGreenough Oct 30, 2025
f1ef2aa
Moved can files (#37): accepted CAN files move to CANFD dir, removed …
MichaelGreenough Oct 30, 2025
c92b7b3
updated README on flle usage + cleanup
alisha1697 Oct 30, 2025
e455074
IOC config for CAN servo
MichaelGreenough Oct 30, 2025
e06bb21
linked can servo
MichaelGreenough Oct 30, 2025
9ea9213
Quick test code
MichaelGreenough Oct 31, 2025
54958e3
Merged in CANFD library
MichaelGreenough Nov 1, 2025
34884bf
Merged in NM0183 code
MichaelGreenough Nov 1, 2025
34c9204
Delete old file
MichaelGreenough Nov 1, 2025
9f95ddc
Merged in repo restructure
MichaelGreenough Nov 1, 2025
fad2cd9
removed old project
MichaelGreenough Nov 1, 2025
4838e1d
CAN implemented - nominal version for launch - will be updated
emmakateduong Nov 1, 2025
18ee7ff
Update NMEA0183.h
hml04 Nov 1, 2025
2abc5c2
fewer errors but many still abound
emmakateduong Nov 1, 2025
3536624
Generated code
emmakateduong Nov 1, 2025
5771a1d
no build errors in cubeide
emmakateduong Nov 2, 2025
5897978
going home to watch the blue jays game
emmakateduong Nov 2, 2025
bc6cd11
With a tuning mode, right lengths of uints, etc... and jays are winning
emmakateduong Nov 2, 2025
2c7eeb1
Merged from working branch
MichaelGreenough Nov 3, 2025
6bd6114
Misc post merge cleanup
MichaelGreenough Nov 3, 2025
2c06d96
Misc fixes
MichaelGreenough Nov 3, 2025
6d29222
CAN bus RX length checking
MichaelGreenough Nov 3, 2025
f5f6c49
Added pid values to debug frame
emmakateduong Nov 6, 2025
0f1be1b
maybe motor
emmakateduong Nov 6, 2025
8660851
Fixed compiler errors
MichaelGreenough Nov 7, 2025
77b9bde
Fixed errors, getting encoder readings
MichaelGreenough Nov 7, 2025
2882e9a
mock hardware troll af
MichaelGreenough Nov 7, 2025
fb987f6
Changes to get IMU working
MichaelGreenough Nov 7, 2025
5acd574
Idk what is going on
MichaelGreenough Nov 8, 2025
cbbac18
Bird big ball
MichaelGreenough Nov 8, 2025
ab29a06
irons without linear velocity and it's not done
emmakateduong Nov 16, 2025
06be66a
Updated PDB code with MPPT current sense
sophiehcho Nov 20, 2025
934d80d
Comment changes
sophiehcho Nov 20, 2025
7f9d025
updated project name
sophiehcho Nov 20, 2025
2c21e11
deleted old file
sophiehcho Nov 20, 2025
63d67d2
deletd old file
sophiehcho Nov 20, 2025
748d9a8
moved folder location
sophiehcho Nov 22, 2025
ec41146
moved and renamed files
sophiehcho Nov 22, 2025
c9400cf
removed nested project
sophiehcho Nov 22, 2025
c8262a5
Add Atlas sensors NEW CAN2 and sense-controller folders
alisha1697 Nov 22, 2025
e1ff990
changed CAN_Receive to use a CAN_Frame rx pointer
alisha1697 Nov 29, 2025
f0c7a0d
correct CAN_Receive function signature
alisha1697 Nov 29, 2025
09c8334
fdcan-library-test now has the project to test
alisha1697 Nov 29, 2025
c0e35cd
Merge branch 'can-library' of https://github.com/UBCSailbot/com-modul…
alisha1697 Nov 29, 2025
47b8223
fdcan-library-test is now a project
alisha1697 Nov 29, 2025
9d5d20f
Combined unblocked sensor firmware / needs testing
AayushKolharkar Nov 29, 2025
8c4d942
moved to controller module
sophiehcho Dec 2, 2025
81cc98f
Sense controller Wind + data sesnors, tested without CANDFD
AayushKolharkar Dec 7, 2025
f7b9091
UART working firmware for new SENSE board, needs CAN Testing
AayushKolharkar Jan 25, 2026
0e6a1f8
CAN works
AayushKolharkar Jan 31, 2026
277e9e2
Can Works
AayushKolharkar Jan 31, 2026
8222d31
Milestone 1 Atlas Sensor Code Complete
AayushKolharkar Feb 7, 2026
251eeef
Fixed CAN parsing bandwidth limit
MichaelGreenough Feb 14, 2026
cf7a59f
Add heartbeat functionality to CANFD module
alisha1697 Feb 24, 2026
1dc01ba
Modify CAN_Init to accept hardware ID parameter
alisha1697 Feb 24, 2026
6a926ae
Updated fdcan-library-test with overnight test code, includes heartbeat
alisha1697 Feb 24, 2026
17d1e2b
Trim tab, Wind Sensor, AIS, GPS, and CANFD Communication on the Sail …
georgesleen Feb 24, 2026
dca28a6
fixed neg current
sophiehcho Feb 26, 2026
6ecdbfc
Merge new can lib
sophiehcho Feb 26, 2026
7d46a59
changed to new can lib
sophiehcho Feb 26, 2026
dda8a6a
Wingsail CAN Heartbeat Update (#44)
georgesleen Feb 27, 2026
e4e3f68
i don't know what is in this one
emmakateduong Feb 28, 2026
f72cfc0
state transitions
emmakateduong Feb 28, 2026
18d190f
maybe lib implemented
emmakateduong Feb 28, 2026
67f75d3
commit
emmakateduong Feb 28, 2026
8e46627
Fixed scaling & and derivative sign
MichaelGreenough Feb 28, 2026
7769299
im so scared rn
emmakateduong Feb 28, 2026
eb921a1
merge
emmakateduong Feb 28, 2026
911a06a
i think i just did this
emmakateduong Feb 28, 2026
6c83910
Merge remote-tracking branch 'origin/rudder-working-branch' into rudd…
emmakateduong Feb 28, 2026
fe564f0
Add a clangd config
georgesleen Mar 4, 2026
666565c
Merge remote-tracking branch 'origin/can-library' into rudder-control…
georgesleen Mar 4, 2026
727f512
Uncomment a function
georgesleen Mar 4, 2026
dbe4be1
Remove hardcoded path and fix name collision of a CAN function
georgesleen Mar 4, 2026
6fe5950
Update CAN settings so it doesn't nuke the CAN line anymore
georgesleen Mar 11, 2026
6515ac3
wip
georgesleen Mar 11, 2026
919d9e3
Fix wind sensor on encoder UART path (#46)
georgesleen Mar 11, 2026
4c981e9
Merge branch 'wingsail-working-branch' of https://github.com/UBCSailb…
georgesleen Mar 13, 2026
e1395b3
Added servo scaling (#49)
MichaelGreenough Mar 13, 2026
c79015b
fix: stop sending can frames meant to be sent from another module (#47)
georgesleen Mar 13, 2026
b56076c
Add some printing
georgesleen Mar 13, 2026
26c71ea
Remove internal loopback mode...
georgesleen Mar 13, 2026
288037e
implemented new can lib
sophiehcho Apr 6, 2026
e4f1f7e
Changed pinout for V3 PCBs
MichaelGreenough May 17, 2026
fbd92a7
Idk bruh
MichaelGreenough May 20, 2026
d301e6f
Jk
MichaelGreenough May 20, 2026
a6821ce
Moving Average Implemented
pouyahatami May 30, 2026
9ba300d
int16_t instead of uint16_t for buffer
pouyahatami May 30, 2026
e13dd60
May 30th dryland fixes
MichaelGreenough May 31, 2026
7c73f7b
May31 dryland tuning
MichaelGreenough Jun 1, 2026
f2b823f
Avg startup fix
MichaelGreenough Jun 6, 2026
0364b80
refactoring in progress uh oh
emmakateduong Jun 12, 2026
b5dd3bd
i give up
emmakateduong Jun 12, 2026
598adfb
why won't my compiler compile :(
emmakateduong Jun 12, 2026
fd771cf
More IMU Data (#54)
MichaelGreenough Jun 13, 2026
e76e072
Merge remote-tracking branch 'origin/can-library' into rudder-control…
georgesleen Mar 4, 2026
91392ef
Update CAN settings so it doesn't nuke the CAN line anymore
georgesleen Mar 11, 2026
90e3dc9
Uncomment a function
georgesleen Mar 4, 2026
24999e6
Remove hardcoded path and fix name collision of a CAN function
georgesleen Mar 4, 2026
ea62721
Add a clangd config
georgesleen Mar 4, 2026
4d6488c
Revert "May31 dryland tuning"
MichaelGreenough Jun 18, 2026
bd340dc
commit
MichaelGreenough Jun 18, 2026
de4dab7
working heartbeat
MichaelGreenough Jun 18, 2026
34f5adb
Add PLRS-IMU rudder link protocol core with host tests
georgesleen Jun 21, 2026
33002be
Add PLRS-IMU rudder link HAL driver and readme
georgesleen Jun 21, 2026
cd2b648
Switch rudder heading source to PLRS-IMU link
georgesleen Jun 21, 2026
bcc08c7
Link plrs-imu module into rudder-controller project
georgesleen Jun 21, 2026
fc3a6b1
Regenerate rudder CubeMX config for USART3 RX DMA, reconcile DAC1 and…
georgesleen Jun 21, 2026
0619077
Add Attitude message decode to PLRS-IMU protocol
georgesleen Jun 22, 2026
c39fff2
Decode Attitude heel and yaw rate in PLRS-IMU driver
georgesleen Jun 22, 2026
47c3835
Feed IMU heel and yaw rate into rudder control model
georgesleen Jun 22, 2026
94b7630
doing unit testing and whatnot
emmakateduong Jun 23, 2026
2206eef
added parameter tuning for generic rudder controller paramters (#56)
emmakateduong Jun 28, 2026
b07fea8
heartbeat and param tuning implemented - fixed freaky errors??
MichaelGreenough Jun 28, 2026
b65d9a7
Make rudder debug CAN TX failure non-fatal
georgesleen Jul 1, 2026
17ed2da
actually including the test c file
emmakateduong Jul 4, 2026
8137dee
tests added
emmakateduong Jul 4, 2026
d121eb0
tests passing
emmakateduong Jul 4, 2026
57d4773
Bump version to v2 for imu communcation protocol and also fix some CA…
georgesleen Jul 10, 2026
c505a6a
checking out controller bs
emmakateduong Jul 10, 2026
dfb9a83
merging or something
emmakateduong Jul 10, 2026
cea67f1
checking out?
emmakateduong Jul 10, 2026
5ee0054
Merge branch 'dev/georgesleen/imu_communication_module' of https://gi…
emmakateduong Jul 10, 2026
463f100
Revert "Merge branch 'dev/georgesleen/imu_communication_module' of ht…
emmakateduong Jul 10, 2026
554b249
building
emmakateduong Jul 10, 2026
f2dd124
Add PLRS-IMU as a git submodule under firmware
georgesleen Jul 11, 2026
6f93526
Add RawAttitude (0x03) decode to PLRS-IMU rudder link protocol
georgesleen Jul 11, 2026
4a88f5c
Add fused/raw attitude source selector to PLRS-IMU driver
georgesleen Jul 11, 2026
9ca0b9c
Bump PLRS-IMU submodule to raw attitude frame support
georgesleen Jul 11, 2026
22047e5
Default rudder attitude source to raw MTi
georgesleen Jul 11, 2026
e31d2c2
Remove hard fault on heart beat CAN error
MichaelGreenough Jul 11, 2026
e719227
V3 PCB pinout changes
MichaelGreenough Jul 11, 2026
8414ded
Wingsail encoder patch (#58)
MichaelGreenough Jul 11, 2026
0e9f1fa
Steer on fused attitude and gate heading on the GNSS-anchor flag
georgesleen Jul 11, 2026
07e9700
Publish heading telemetry regardless of GNSS validity
georgesleen Jul 11, 2026
48d4eb0
trying to get sail encoder working
MichaelGreenough Jul 11, 2026
a375ffe
Merge origin/rudder-working-branch into imu_communication_module
georgesleen Aug 3, 2026
ff30bcf
Fix 32-bit overflow in getBinaryBits() corrupting MMSI and lat/lon
pouyahatami Aug 8, 2026
e62ac11
Ignore python cache
georgesleen Aug 13, 2026
f062937
Bump PLRS-IMU submodule to mag-primary heading (#71)
georgesleen Aug 13, 2026
f841995
fix: only transmit 0x040 SAIL_WIND on MWV sentences, not XDR (#51)
georgesleen Aug 15, 2026
334ee7f
fix: use relative path for briter-encoders linked folder
georgesleen Aug 16, 2026
0588bef
Merge rudder-working-branch into integration
georgesleen Aug 16, 2026
1595817
Merge pdb-working-branch into integration
georgesleen Aug 16, 2026
049f933
Merge wingsail-working-branch into integration
georgesleen Aug 16, 2026
8c33a60
ci: add .ioc sync check and host unit tests
georgesleen Aug 16, 2026
a1f4bf9
test: complete the stub HAL so canfd_test builds and runs
georgesleen Aug 16, 2026
e70c420
I2C Error Handling Update
AayushKolharkar Aug 16, 2026
8be6a72
ci: pin CubeMX to 6.15.0 and check it per project
georgesleen Aug 16, 2026
e706e89
build: add flake pinning CubeMX 6.15.0, and run CI from it
georgesleen Aug 16, 2026
913731f
build: real source hash for pinned CubeMX 6.15.0
georgesleen Aug 16, 2026
3a98dfb
Merge sense-integrated into integration
georgesleen Aug 16, 2026
a361c44
ci: disable fortify hardening in the devshells
georgesleen Aug 16, 2026
29024e4
build: keep CubeMX state out of the home directory
georgesleen Aug 16, 2026
1eb479e
docs: require on-water test firmware to be tagged and on main
georgesleen Aug 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CompileFlags:
Add:
- -xc
- -std=gnu11

---
If:
PathMatch: (.*/)?firmware/controller-projects/rudder-controller/.*\.(c|h)$
CompileFlags:
Add:
- -DUSE_HAL_DRIVER
- -DUSE_FULL_LL_DRIVER
- -DSTM32U575xx
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Core/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/STM32U5xx_HAL_Driver/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/CMSIS/Device/ST/STM32U5xx/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/CMSIS/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/drv-modules/rudder-control-model
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/drv-modules/motor-base-PID
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/drv-modules/briter-encoders
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/drv-modules/nmea0183

---
If:
PathMatch: (.*/)?firmware/com-modules/CANFD/.*\.(c|h)$
CompileFlags:
Add:
- -DUSE_HAL_DRIVER
- -DHAL_TIM_MODULE_ENABLED
- -DSTM32U575xx
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/com-modules/CANFD
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/com-modules/library-tests/fdcan-library-test/Core/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/com-modules/library-tests/fdcan-library-test/Drivers/STM32U5xx_HAL_Driver/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/com-modules/library-tests/fdcan-library-test/Drivers/CMSIS/Device/ST/STM32U5xx/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/com-modules/library-tests/fdcan-library-test/Drivers/CMSIS/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Core/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/STM32U5xx_HAL_Driver/Inc
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/CMSIS/Device/ST/STM32U5xx/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/controller-projects/rudder-controller/Drivers/CMSIS/Include
- -I/home/george-sleen/Documents/design-team/sailbot/com-module-firmware/firmware/drv-modules/nmea0183
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
ioc-sync:
name: CubeMX .ioc in sync with generated code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: "experimental-features = nix-command flakes"
- name: Check .ioc peripherals and pinned CubeMX version
run: nix develop .#ci --command python3 tools/check_ioc_sync.py .

host-tests:
name: Host unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: "experimental-features = nix-command flakes"

# The harness in firmware/tests builds the drv-modules against stub HAL
# headers with plain gcc, so no ARM toolchain is needed. The .#ci shell
# omits CubeMX and the cross toolchain to keep the run small.
- name: Build and run module tests
run: nix develop .#ci --command make -C firmware/tests test
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
# Build artifacts
*.bin
*.elf
*.list
*.map
*.list
!objects.list
*.d
*.o
*.su
*.metadata
*.settings
*.exe

#Debug
*Debug/
*debug/
*Release/
*release

# Code editors
*.vscode
*.idea
*.cache

# Agent instructions
*/AGENTS.md

# Tooling artifacts
compile_commands.json
firmware/compile_commands.json
.clangd

# Host test artifacts
firmware/tests/build/
test_state_machine.c

__pycache__
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "firmware/PLRS-IMU"]
path = firmware/PLRS-IMU
url = https://github.com/UBCSailbot/PLRS-IMU.git
branch = main
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com-module-firmware</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ We do not require an in-depth understanding of version control and git, but you

**Main Branch:** This is where our finalized, reviewed code goes. Only properly documented, clean, and functional code should be included in (the caveat being that some pre-existing code may not follow this standard). To get code in the main branch, you must make a PR with two people signing off on it, one of whom should be an ELEC lead.

## On-water tests: tagged and on main

**Firmware for an on-water test must be built from a tagged commit on `main`.** Not a working branch, not a local build.

A tag is the only reliable answer to "what was actually running?" after something misbehaves. Working branches move; the flashed build may no longer exist.

1. Merge to `main` via the normal PR process.
2. `git tag -a v0.2.0 -m "<changes>"` and `git push origin v0.2.0`.
3. Build and flash from the tag, and record it in the test log.

Tags are `vMAJOR.MINOR.PATCH`: MINOR for new functionality, PATCH for fixes.

If a board's firmware can't be traced to a tag, treat the test results as unverified.

## Linking modules to controller-projects

```controller-projects``` is where whole projects are created, while ```___-modules``` is where small modules are written.
Expand Down
7 changes: 7 additions & 0 deletions firmware/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CompileFlags:
# Use the ARM GCC toolchain for system headers to avoid host glibc includes.
Compiler: /run/current-system/sw/bin/arm-none-eabi-gcc
Add:
- --target=arm-none-eabi
- --gcc-toolchain=/nix/store/xixg6bjakn3ymzc3qs0c6nd0ymwav6ha-gcc-arm-embedded-14.3.rel1/bin/..
- --sysroot=/nix/store/xixg6bjakn3ymzc3qs0c6nd0ymwav6ha-gcc-arm-embedded-14.3.rel1/bin/../arm-none-eabi
11 changes: 11 additions & 0 deletions firmware/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>firmware</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
18 changes: 18 additions & 0 deletions firmware/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: test clean compile_commands help

help:
@printf "%s\n" \
"Targets:" \
" test Build and run host-side tests" \
" clean Clean test build artifacts" \
" compile_commands Regenerate top-level compile_commands.json" \
" help Show this help"

test:
$(MAKE) -C tests test

clean:
$(MAKE) -C tests clean

compile_commands:
$(MAKE) -C controller-projects/wingsail-controller compile_commands
1 change: 1 addition & 0 deletions firmware/PLRS-IMU
Submodule PLRS-IMU added at e01ef3
Empty file removed firmware/com-modules/.gitkeep
Empty file.
Loading
Loading