Skip to content

Commit

Permalink
merge origin main
Browse files Browse the repository at this point in the history
  • Loading branch information
tszwinglitw committed Jan 9, 2025
2 parents 90feae0 + 9951056 commit 6f25296
Show file tree
Hide file tree
Showing 8 changed files with 417 additions and 155 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build_calypso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check CAN, build Calypso
on:
push:
paths:
- 'cangen/**'

jobs:
run-build:
runs-on: ubuntu-latest
steps:
- name: Clone Calypso
uses: actions/checkout@v4
with:
repository: Northeastern-Electric-Racing/Calypso

- name: Clone Embedded-base
uses: actions/checkout@v4
with:
path: "./Embedded-Base"

- name: Build Calypso
run: cargo build --locked
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
# Embedded-Base
Embedded-Base is a collection of drivers & middleware designed for use across various systems.
Embedded-Base is a collection of drivers, middlewares, and communication definitions designed for use across various systems.

This repository houses custom drivers and middleware that can be utilized in multiple projects.
Most firmware projects define Embedded-Base as a submodule.

To use this repository in any project, it should be set up as a submodule.
## Getting Started With NER Firmware

## Getting Started
All you need is on confluence [here](https://nerdocs.atlassian.net/wiki/spaces/NER/pages/1343533/Firmware+Onboarding+Embedded+Software#Development-Environment-Setup).

#### 1. Clone Embbeded-Base:
~~~
git clone https://github.com/Northeastern-Electric-Racing/Embedded-Base.git
~~~
### Notable items in this repository

#### 2. Initialize submodule
Within the application directory, run the following command to initialize the submodule:
~~~
git submodule update --init
~~~

## Development Guidelines

When developing in the parent directory, it's recommended to frequently run the following command to update all submodules in case changes have been made:
~~~
git submodule update --remote
~~~


**When making changes to a driver located within Embedded-Base, always make those changes directly within the Embedded-Base repository. Avoid making changes to a submodule from the parent directory.** Although it's technically possible, doing so can lead to disorganization, which we want to avoid.

This approach ensures that changes to Embedded-Base are tracked properly and can be easily integrated into your projects using it as a submodule.
- `cangen`: All JSON definitions of in-car CAN data as well as documentation and parsing utilities.
- `dev`: The manual version of the NER build system, compatible up circuit boards in competition 22A
- `ner_environment`: The NER developer environment compatible with all boards from 22A onwards and cross platform support.
- `general`: Cross-platform C source files for all peripheral drivers used by NER.
- `middleware`: Cross-platform C source files common utilities used across various platforms.
- `platforms`: C source files specific to STM HAL versions.
- `clang-format`: The organization wide clang-format definition.
- `ftdi_flash.cfg`: An openocd script to assist in FTDI flashing.
- `openocd.cfg`: A openocd stub to load GDB onto a target.


175 changes: 174 additions & 1 deletion cangen/can-messages/bms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1016,5 +1016,178 @@
]
}
]
}
},
{
"id": "0x6FF",
"desc": "BMS Fault Timers",
"sim_freq": 700,
"fields": [
{
"name": "BMS/Fault_Timer/Start_Stop",
"unit": "",
"sim": {
"options": [
[
0,
0.5
],
[
1,
0.25
],
[
2,
0.25
]
]
},
"points": [
{
"size": 8
}
]
},
{
"name": "BMS/Fault_Timer/Code",
"unit": "",
"sim": {
"min": 0,
"max": 31,
"inc_min": 0,
"inc_max": 31,
"round": true
},
"points": [
{
"size": 8
}
]
},
{
"name": "BMS/Fault_Timer/Value",
"unit": "",
"sim": {
"min": -100,
"max": 100,
"inc_min": 0.05,
"inc_max": 1
},
"points": [
{
"size": 16
}
]
}
]
},
{
"id": "0x69A",
"desc": "Shepherd Version Tag",
"sim_freq": 1000,
"fields": [
{
"name": "BMS/Version/Tag",
"unit": "major.minor.patch",
"sim": {
"min": 0,
"max": 3,
"inc_min": 1,
"inc_max": 1,
"round": true
},
"points": [
{
"size": 8
},
{
"size": 8
},
{
"size": 8
}
]
},
{
"name": "BMS/Version/Dirty",
"unit": "bool",
"sim": {
"options": [
[
0,
0.95
],
[
1,
0.05
]
]
},
"points": [
{
"size": 8
}
]
},
{
"name": "BMS/Version/LocalCommit",
"unit": "bool",
"sim": {
"options": [
[
0,
0.95
],
[
1,
0.05
]
]
},
"points": [
{
"size": 8
}
]
}
]
},
{
"id": "0x69B",
"desc": "Shepherd Version Hash",
"sim_freq": 1000,
"fields": [
{
"name": "BMS/Version/ShortHash",
"unit": "hash",
"sim": {
"min": 0,
"max": 4294967295,
"inc_min": 1,
"inc_max": 1,
"round": true
},
"points": [
{
"size": 32
}
]
},
{
"name": "BMS/Version/AuthorHash",
"unit": "hash",
"sim": {
"min": 0,
"max": 4294967295,
"inc_min": 1,
"inc_max": 1,
"round": true
},
"points": [
{
"size": 32
}
]
}
]
}
]
4 changes: 2 additions & 2 deletions cangen/can-messages/charger.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@
"send": false,
"points": [
{
"size": 24
"size": 27
}
]
}
]
}
]
]
Loading

0 comments on commit 6f25296

Please sign in to comment.