Skip to content
Snippets Groups Projects
Commit 07eb5385 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Fix rev1.1 LED colors

parent e3e1e015
No related branches found
No related tags found
No related merge requests found
# Build Environment Setup
This project uses `arduino-cli` to allow us to build binaries for the daisy seed using a build script.
## Prerequesites
- Install the usual Daisy-Seed build environment
- install `arduino-cli`
- hope that was all
## Installing the Dependencies
arduino-cli is a totally separate tool from the Arduino GUI application, that means it manages boards and libraries separately. In order to get this project started follow the steps below:
### 1. Install h7 board
```bash
arduino-cli core install --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json STMicroelectronics:stm32
```
### 2. Install library dependencies
```bash
arduino-cli lib install 'DaisyDuino'
arduino-cli lib install 'Adafruit GFX Library'
arduino-cli lib install 'Adafruit SH110X'
arduino-cli lib install 'MIDI Library'
arduino-cli lib install 'MultiMap'
```
## Building
At this point you should be able to run `./build.sh` which should create new bin files in your build directory.
### More Details
Get board details and the Fully Qualified Board Name (fqbn) using this command:
```bash
arduino-cli board search --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json H7
```
You can list all build options using:
```bash
arduino-cli board details --fqbn STMicroelectronics:stm32:GenH7
```
These options can be attached to the FQBN used in the build.sh, e.g. like this:
```bash
--fqbn 'STMicroelectronics:stm32:GenH7:pnum=DAISY_SEED,xserial=generic,usb=none,xusb=FS,opt=osstd,dbg=none,rtlib=nano,upload_method=dfuMethod'
```
## defines
Within the build script we also have a `--build-property build.extra_flags=-DSOME_DEFINED_FLAG` which allows us to pass preprocessor definitions to our arduino files, e.g. in our case we pass `BOARD_VERSION_1_1` which allows us to react to pinout changes in different board versions by using preprocessor-if else structures
\ No newline at end of file
build.sh 0 → 100755
#!/bin/bash
echo "Building daisy-looper for board rev 1.1"
rm -f build/*
# Build binary for board rev 1.1
arduino-cli compile --build-property build.extra_flags=-DBOARD_VERSION_1_1 -e --fqbn 'STMicroelectronics:stm32:GenH7:pnum=DAISY_SEED,xserial=generic,usb=none,xusb=FS,opt=osstd,dbg=none,rtlib=nano,upload_method=dfuMethod' --output-dir build/ daisyy-looper/
mv build/daisyy-looper.ino.bin build/daisyy-looper.rev1.1.bin
rm build/*.elf build/*.hex build/*.map
echo "Building daisy-looper for board rev 1.0"
arduino-cli compile --build-property build.extra_flags=-DBOARD_VERSION_1_0 -e --fqbn 'STMicroelectronics:stm32:GenH7:pnum=DAISY_SEED,xserial=generic,usb=none,xusb=FS,opt=osstd,dbg=none,rtlib=nano,upload_method=dfuMethod' --output-dir build/ daisyy-looper/
mv build/daisyy-looper.ino.bin build/daisyy-looper.rev1.0.bin
rm build/*.elf build/*.hex build/*.map
echo "done"
...@@ -51,8 +51,14 @@ Potentiometer pot_5 = Potentiometer(A4); ...@@ -51,8 +51,14 @@ Potentiometer pot_5 = Potentiometer(A4);
Potentiometer pot_6 = Potentiometer(A5); Potentiometer pot_6 = Potentiometer(A5);
Potentiometer pot_7 = Potentiometer(A6); Potentiometer pot_7 = Potentiometer(A6);
#ifdef BOARD_VERSION_1_1
// RGB LED R G B
RGBLed rgb_led = RGBLed(A10, A9, A11);
#else
// RGB LED R G B // RGB LED R G B
RGBLed rgb_led = RGBLed(A10, A11, A9); RGBLed rgb_led = RGBLed(A10, A11, A9);
#endif
// OLED Display // OLED Display
......
#!/bin/bash
VERSION=$(git describe --tags --abbrev=0)
echo "Uploading binary packages for Version $VERSION"
glab upload-package daisyy-looper/$VERSION/daisyy-looper.bin build/daisyy-looper.rev1.0.bin
glab upload-package daisyy-looper/$VERSION/daisyy-looper.bin build/daisyy-looper.rev1.1.bin
echo "done"
This diff is collapsed.
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":0,"widgets":["notebook:lookup-tables.ipynb"]},"current":"notebook:lookup-tables.ipynb"},"down":{"size":0,"widgets":[]},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","@jupyterlab/toc:plugin","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":["jp-property-inspector","debugger-sidebar"]},"relativeSizes":[0.26227795193312436,0.7377220480668757,0]},"notebook:lookup-tables.ipynb":{"data":{"path":"lookup-tables.ipynb","factory":"Notebook"}}},"metadata":{"id":"default"}}
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment