Skip to content

Commit 4dd8261

Browse files
committed
update README.md
1 parent 32471fe commit 4dd8261

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Play 16-bit PCM RAW or WAV audio samples at variable playback rates on Teensy
1616
* [SD classes on wikipedia](https://en.wikipedia.org/wiki/SD_card#cite_ref-93)
1717

1818
## updates
19+
* 2025-02-20: build for teensy/linux without needing to install dependencies, using CMake FetchContent to pull project-relative dependencies
1920
* 2025-02-02: v1.1.0
2021
* wide-ranging changes to allow more robust playback of multiple files
2122
* buffers in heap or PSRAM, re-loaded by EventResponder rather than in interrupt
@@ -93,12 +94,11 @@ Play 16-bit PCM RAW or WAV audio samples at variable playback rates on Teensy
9394

9495

9596
<details>
96-
<summary>without Teensyduino (for development)</summary>
97+
<summary>build for teensy with cmake and gcc-arm-none-eabi</summary>
98+
* required software
99+
```cmake``` [gcc-arm-none-eabi](https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1)
100+
* remember to update ```COMPILERPATH``` in ```cmake\toolchains\teensy41.cmake``` to ```gcc-arm-none-eabi\bin``` folder
97101

98-
```cmake``` ```gcc-arm-none-eabi```[^](https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1) ```teensy-cmake-macros```[^](https://github.com/newdigate/teensy-cmake-macros) ```cores```[^](https://github.com/PaulStoffregen/cores) ```Audio```[^](https://github.com/PaulStoffregen/Audio) ```SD```[^](https://github.com/PaulStoffregen/SD/tree/Juse_Use_SdFat) ```Wire```[^](https://github.com/PaulStoffregen/Wire) ```SPI```[^](https://github.com/PaulStoffregen/SPI) ```SerialFlash```[^](https://github.com/PaulStoffregen/SerialFlash) ```arm_math```[^](https://github.com/PaulStoffregen/arm_math) ```SDFat```[^](https://github.com/greiman/SdFat)
99-
* using [teensy-cmake-macros](https://github.com/newdigate/teensy-cmake-macros), this library can be compiled for teensy 3 and 4 boards without needing Teensyduino. This is mainly used to build the library when a commit is pushed, to verify there are no compile errors.
100-
101-
102102
<details>
103103
<summary>dependencies (click to expand image) </summary>
104104

@@ -140,11 +140,14 @@ graph G {
140140
You can run and test this code on your linux computer. You can write a teensy sketch, and with a few modifications, you can redirect the audio input and output to and from your soundcard. [Soundio](https://github.com/newdigate/teensy-audio-x86-stubs/tree/main/extras/soundio) bindings are optional, you can also run sketches and tests with no audio input or output.
141141
You will need to install the following libraries.
142142

143-
```cmake``` ```gcc or llvm``` ```teensy-x86-stubs```[^](https://github.com/newdigate/teensy-x86-stubs) ```teensy-audio-x86-stubs```[^](https://github.com/newdigate/teensy-audio-x86-stubs) ```teensy-x86-sd-stubs```[^](https://github.com/newdigate/teensy-x86-sd-stubs) ```boost-test```
143+
```cmake``` ```libsoundio``` ```gcc or llvm``` ```boost-test```
144144

145145
* install boost unit-test library:
146146
* linux: ```sudo apt-get install -yq libboost-test-dev```
147147
* macos: ```brew install boost```
148+
* install soundio
149+
* linux: ```sudo apt-get install -yq libsoundio-dev```
150+
* macos: ```brew install libsoundio```
148151

149152
</details>
150153

@@ -170,31 +173,12 @@ graph G {
170173
```
171174

172175
## teensy build
173-
You don't need to download or install Teensyduino or Arduino to build the library or examples. Just clone the cores library and any dependencies to a common folder, denoted by ```DEPSPATH``` (in this case ```/home/nic/teensy_libraries```).
174-
<details>
175-
<summary>clone dependencies (click to expand) </summary>
176-
177-
``` sh
178-
> cd /home/nic/teensy_libraries
179-
> git clone https://github.com/PaulStoffregen/cores.git
180-
> git clone https://github.com/PaulStoffregen/Audio.git
181-
> git clone -b Juse_Use_SdFat https://github.com/PaulStoffregen/SD.git
182-
> git clone https://github.com/PaulStoffregen/Wire.git
183-
> git clone https://github.com/PaulStoffregen/SPI.git
184-
> git clone https://github.com/PaulStoffregen/SerialFlash.git
185-
> git clone https://github.com/PaulStoffregen/arm_math.git
186-
> git clone https://github.com/greiman/SdFat.git
187-
```
188-
189-
</details>
190176

191177
<details>
192178
<summary>update COMPILERPATH and DEPSPATH in cmake/toolchains/teensy41.cmake</summary>
193179

194180
``` cmake
195181
set(COMPILERPATH "/Applications/Arm/bin/")
196-
set(DEPSPATH "/home/nic/teensy_libraries")
197-
set(COREPATH "${DEPSPATH}/cores/teensy4/")
198182
```
199183

200184
</details>
@@ -224,8 +208,8 @@ set(COREPATH "${DEPSPATH}/cores/teensy4/")
224208
``` sh
225209
> mkdir cmake-build-debug
226210
> cd cmake-build-debug
227-
> cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE:FILEPATH="../cmake/toolchains/linux.cmake" ..
228-
> make
211+
> cmake -DCMAKE_BUILD_TYPE=Debug ..
212+
> cmake --build .
229213
```
230214

231215
### run tests

0 commit comments

Comments
 (0)