Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share code and data with lbuild queries, fix config aliases #171

Merged
merged 3 commits into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/getting-started.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,23 @@ we still recommend adding modm as a git submodule for reproducibility.
### Using a Board Support Package

To build on a BSP, inherit from an existing project configuration using the
`<extends>` element.
Our BSPs declare a minimal set of modules as dependencies as well as pre-define several important options for this board.
`<extends>` element. You can discover the available configuration aliases using
lbuild:

```
$ lbuild --repository ../modm/repo.lb discover
Parser(lbuild)
╰── Repository(modm @ ../modm) modm: a barebone embedded library generator
├── Configuration(modm:arduino-uno) Arduino UNO
├── Configuration(modm:blue-pill) Blue Pill
├── Configuration(modm:disco-f469ni) STM32F469IDISCOVERY
├── Configuration(modm:nucleo-f401re) NUCLEO-F401RE
├── Configuration(modm:olimexino-stm32) Olimexino STM32
╰── Configuration(modm:stm32f030_demo) STM32F030 Demo Board
```

Our BSPs declare a minimal set of modules as dependencies as well as pre-define
several important options for this board.
You can then add all the modules you need and configure them as you want.

```xml
Expand All @@ -29,7 +44,7 @@ You can then add all the modules you need and configure them as you want.
</repository>
</repositories>
<!-- extend this board configuration -->
<extends>modm:board:disco-f469ni</extends>
<extends>modm:disco-f469ni</extends>
<options>
<!-- give this project a custom name -->
<option name="modm:build:project.name">test</option>
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino_uno/basic/analog_read_serial/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:arduino-uno</extends>
<extends>modm:arduino-uno</extends>
<options>
<option name="modm:build:build.path">../../../../build/arduino_uno/basic/analog_read_serial</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino_uno/basic/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:arduino-uno</extends>
<extends>modm:arduino-uno</extends>
<options>
<option name="modm:build:build.path">../../../../build/arduino_uno/basic/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino_uno/basic/digital_read_serial/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:arduino-uno</extends>
<extends>modm:arduino-uno</extends>
<options>
<option name="modm:build:build.path">../../../../build/arduino_uno/basic/digital_read_serial</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino_uno/basic/read_analog_voltage/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:arduino-uno</extends>
<extends>modm:arduino-uno</extends>
<options>
<option name="modm:build:build.path">../../../../build/arduino_uno/basic/read_analog_voltage</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/avr/assert/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:al-avreb-can</extends>
<extends>modm:al-avreb-can</extends>
<options>
<option name="modm:build:build.path">../../../build/avr/assert</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/avr/ports/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:al-avreb-can</extends>
<extends>modm:al-avreb-can</extends>
<options>
<option name="modm:build:build.path">../../../build/avr/ports</option>
<option name="modm:build:avrdude.programmer">usbasp-clone</option>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/blinky/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/generic/blinky</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/resumable/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/generic/resumable</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/ros/can_bridge/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../../build/generic/ros/can_bridge</option>
<option name="modm:platform:uart:2:buffer.tx">512</option>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/ros/environment/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../../build/generic/ros/environment</option>
<option name="modm:platform:uart:2:buffer.tx">512</option>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/ros/sub_pub/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../../build/generic/ros/sub_pub</option>
<option name="modm:platform:uart:2:buffer.tx">512</option>
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/rtc_ds1302/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/generic/rtc_ds1302</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f031k6/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f031k6</extends>
<extends>modm:nucleo-f031k6</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f031k6/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f042k6/adc/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f042k6</extends>
<extends>modm:nucleo-f042k6</extends>
<options>
<option name=":build:build.path">../../../build/nucleo_f042k6/adc</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f042k6/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f042k6</extends>
<extends>modm:nucleo-f042k6</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f042k6/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f103rb/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f103rb</extends>
<extends>modm:nucleo-f103rb</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f103rb/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f303k8/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f303k8</extends>
<extends>modm:nucleo-f303k8</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f303k8/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f401re/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f401re</extends>
<extends>modm:nucleo-f401re</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f401re/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f401re/distance_vl53l0/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f401re</extends>
<extends>modm:nucleo-f401re</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f401re/distance_vl53l0</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f411re/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f411re</extends>
<extends>modm:nucleo-f411re</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f411re/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f429zi/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f429zi</extends>
<extends>modm:nucleo-f429zi</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f429zi/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f429zi/pat9125el/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f429zi</extends>
<extends>modm:nucleo-f429zi</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f429zi/pat9125el</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_f429zi/spi_flash/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-f429zi</extends>
<extends>modm:nucleo-f429zi</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_f429zi/spi_flash</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/comp/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/comp</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/gyroscope/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/gyroscope</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/pwm/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/pwm</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/pwm_advanced/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/pwm_advanced</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l432kc/uart_spi/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l432kc</extends>
<extends>modm:nucleo-l432kc</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l432kc/uart_spi</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l476rg/adc/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l476rg/adc</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l476rg/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l476rg/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/nucleo_l476rg/i2c_test/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:nucleo-l476rg</extends>
<extends>modm:nucleo-l476rg</extends>
<options>
<option name="modm:build:build.path">../../../build/nucleo_l476rg/i2c_test</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/olimexino_stm32/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:olimexino-stm32</extends>
<extends>modm:olimexino-stm32</extends>
<options>
<option name="modm:build:build.path">../../../build/olimexino_stm32/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f030f4p6_demo_board/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:stm32f030_demo</extends>
<extends>modm:stm32f030_demo</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f030f4p6_demo/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/can/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/can</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/hard_fault/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/hard_fault</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/rotation/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/rotation</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/tmp102/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/tmp102</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/uart/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/uart</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f072_discovery/unaligned_access/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f072rb</extends>
<extends>modm:disco-f072rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f072_discovery/unaligned_access</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f0_discovery/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f051r8</extends>
<extends>modm:disco-f051r8</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f0_discovery/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f0_discovery/logger/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f100rb</extends>
<extends>modm:disco-f100rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f0_discovery/logger</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_black_pill/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:black-pill</extends>
<extends>modm:black-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_black_pill/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/adns_9800/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/adns_9800</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/blink.cmake/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/blink.cmake</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/can/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/can</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/environment/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/environment</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f103c8t6_blue_pill/logger/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:blue-pill</extends>
<extends>modm:blue-pill</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f103c8t6_blue_pill/logger</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f1_discovery/blink/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f100rb</extends>
<extends>modm:disco-f100rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f1_discovery/blink</option>
</options>
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f1_discovery/logger/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<library>
<extends>modm:board:disco-f100rb</extends>
<extends>modm:disco-f100rb</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f1_discovery/logger</option>
</options>
Expand Down
Loading