Skip to content

Commit e099cea

Browse files
committed
start writing Documentation
Signed-off-by: Dhruva Gole <[email protected]>
1 parent dcfa045 commit e099cea

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Documentation/overlays.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# DT Overlays
2+
3+
TODO

Documentation/variants.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# How to add custom boards
2+
3+
**Pre-reqs:** <br>
4+
- It is most recommended that if you have a highly custom board that even zephyr-RTOS doesn't support yet then you should add support for it first there.
5+
- You need to satisfy all requirements mentioned in the project's README.
6+
7+
**General Instructions:** <br>
8+
- The project is structures in a way so as to isolate the variants from the core API. Thus, whenever a new board needs to be added it needs to be done in the `variants/` folder.
9+
- The structure of the variants folder with the help of an example is as follows:
10+
```tree
11+
variants/
12+
├── ARDUINO_NANO33BLE
13+
│   ├── arduino_nano_33_ble.overlay
14+
│   └── arduino_nano_ble_sense_pinmap.h
15+
├── CMakeLists.txt
16+
└── variants.h
17+
```
18+
19+
- The top level consists of `CMakeLists.txt`, `variants.h` and the `<BOARD_NAME>` folder. Each of these files have a specific role to play.
20+
- The `Cmakelists` help the compiler locate the proper directory to help find the proper header files that are board specific. You need to add the name using `zephyr_include_directories(BOARD_NAME)` to this file. Do note that this `BOARD_NAME` is the same as the name of your board's directory.
21+
- `variants.h` contains the necessary `#includes` inorder to tell the source code about your board's pinmap.
22+
- The `<BOARD_NAME>` folder is where the overlay and pinmap file resides. Inorder to understand how to write DT overlays, lookup `Documentation/overlays.md`. To understand the `<boardname_pinmap.h> file, go through the existing `variants/ARDUINO_NANO33BLE/arduino_nano_ble_sense_pinmap.h` which shows how to use the overlay nodes inside our C programs using zephyr macros like `GPIO_DT_SPEC_GET`. The zephyr-project documentation on this is pretty extensive as well and worth reading.
23+
24+
## Suppored Boards/variants
25+
26+
- [X] Arduino Nano ble sense 33
27+
- [X] Arduino Nano ble 33
28+
29+
## Planned Support: (TODO)
30+
- [ ] Particle Xenon

0 commit comments

Comments
 (0)