-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformio.ini
More file actions
242 lines (219 loc) · 8.23 KB
/
platformio.ini
File metadata and controls
242 lines (219 loc) · 8.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = pcb_studio
;;;; defaults for all profiles
[env]
board_build.ldscript = linker/imxrt1062_t41_alt.ld ;; many many thanks to Beermat from forums.pjrc.com for this linker script
platform = teensy@4.17 ;5.0 ;; force to version 4.17.0 for now -- not only do higher versions inexplicably use ~30k more space for binary, they also completely fail to start up for some reason!
board = teensy41
framework = arduino
extra_scripts=pre:add_git_branch.py
build_unflags = -DUSB_SERIAL -DUSB_MIDI16_DUAL_SERIAL
build_flags =
-DPCB ;; indicate to Config.h etc that we're building PCB version
-DUSB_MIDI4_SERIAL
-DENABLE_SCREEN
-DENABLE_SD
-DENABLE_CALIBRATION_STORAGE
-DLOAD_CALIBRATION_ON_BOOT
-DCALLOC_FUNC=extmem_calloc
-DMALLOC_FUNC=extmem_malloc
-DENABLE_TAPTEMPO
-g
monitor_filters = time
lib_deps =
Bounce2=https://github.com/thomasfredericks/Bounce2@^2.71
khoih-prog=https://github.com/khoih-prog/Functional-Vlpp@>=1.0.2
LinkedList=https://github.com/vortigont/LinkedList
midi
usbhost_t36
SD @>=2.0.0
ILI9341_t3n
LinkedList=https://github.com/vortigont/LinkedList
SdFat
ADS1X15=https://github.com/RobTillaart/ADS1X15@>=0.5.0
MCP23S17=https://github.com/RobTillaart/MCP23S17@>=0.5.0
DAC8574=https://github.com/RobTillaart/DAC8574@>=0.1.1
;mymenu=https://github.com/doctea/mymenu
;parameters=https://github.com/doctea/parameters
;midihelpers=https://github.com/doctea/midihelpers
;seqlib=https://github.com/doctea/seqlib
;uClock=https://github.com/doctea/uClock.git#feature-pause-continue ; todo: switch back to upstream once the feature is merged
;uClock=https://github.com/doctea/uClock
seqlib
ArduinoHashtable=https://github.com/braydenanderson2014/ArduinoHashtable
ILI9341_t3n=https://github.com/doctea/ILI9341_t3n
lib_extra_dirs =
C:\Users\doctea\Documents\Arduino\my_libraries ; this is so that i can have my own custom libraries in a place shared between projects where i can work on them; anyone who's not me can probably comment this out and uncomment the lib_deps above
lib
;;; for building for eurorack module version (ili9341, mcp23s17 gates)
[env:pcb_studio]
build_unflags = -O2 -DUSB_SERIAL -DUSB_MIDI16_DUAL_SERIAL -DUSB_MIDI_SERIAL ;-DUSB_MIDI4_SERIAL
build_flags =
-Os ;; optimise smallest binary
-DDISABLE_ALL_LIBRARY_WARNINGS ;; prevent compilation warnings
-DPCB
-DPCB_STUDIO
;; hardware configuration
-DENABLE_GATES_MCP23S17
-DENABLE_GATES_BANK_EXTRA ;; add an extra gate output module
-DUSB_MIDI4_SERIAL
; screen configuration
-DENABLE_SCREEN
-DTFT_ILI9341_T3N
-DSCREEN_ROTATION=1 ;; this works and needs mod to the ili9341_t3n library for the new board revision ('v1.0', incorrectly sold as an st7899), but should be 2 for the old board revision i have ('v2.0')
-DTFT_SCLK=13
-DTFT_MOSI=11
-DTFT_MISO=12
-DTFT_CS=9
-DTFT_DC=10
-DTFT_RST=-1
-DTFT_WIDTH=320
-DTFT_HEIGHT=240
;; feature configuration
-DENABLE_PARAMETERS
-DENABLE_EUCLIDIAN
-DENABLE_SCALES
-DENABLE_ENVELOPES
-DENABLE_ENVELOPES_AS_PARAMETER_INPUTS
-DENABLE_CLOCK_INPUT_MIDI_DIN
-DENABLE_TAPTEMPO
-DENABLE_CLOCK_INPUT_CV
-DENABLE_SHUFFLE
-DNUMBER_SHUFFLE_PATTERNS=4
-DUSE_UCLOCK
; ADC configuration
;-DENABLE_CV_INPUT=0x48 ;; NOTE: this will clash with the broadcast address of 0x48 for the DAC8574
-DENABLE_CV_INPUT_PITCH
-DENABLE_CV_INPUT=0x49 ; need to avoid 0x48 because it's used by the DAC8574
-DENABLE_CV_INPUT_ORDER={2,1,0} ; reverse the order of CV inputs when using the CV Output expander v1, because i done a fuckup with the PCBs
-DFAST_VOLTAGE_READS
;;; cv output configuration, for DACs
;; first device - currently in my portable case
;-DCONFIG_CV_OUTPUT_1={0x4E,1,BANK_CLOCK,0,{\"A\",\"B\",\"C\",\"None\"}} ;; configure CV output 1 to use the clock bank of the MCP23S17, starting at output #0
;; second device - currently in studio use
-DCONFIG_CV_OUTPUT_1={0x4C,0,BANK_EXTRA_1,0,{\"A\",\"B\",\"C\",\"None\"}} ;; configure CV output 2 to use the extra bank of the MCP23S17, starting at output #4
; save/load state to SD? configuration
-DENABLE_SD
-DENABLE_CALIBRATION_STORAGE
-DLOAD_CALIBRATION_ON_BOOT
-DCALLOC_FUNC=extmem_calloc
-DMALLOC_FUNC=extmem_malloc
;; debug configuration
-DENABLE_PRINTF
-g ;; generate debug symbols?
;;; for building for eurorack module version (ili9341, mcp23s17 gates)
[env:pcb_go]
build_unflags = -O2 -DUSB_SERIAL -DUSB_MIDI16_DUAL_SERIAL -DUSB_MIDI_SERIAL ;-DUSB_MIDI_SERIAL ;-DUSB_MIDI4_SERIAL
build_flags =
-Os ;; optimise smallest binary; have tried switching back to -O2, but it crashes on boot...
-DDISABLE_ALL_LIBRARY_WARNINGS ;; prevent compilation warnings
-DPCB
-DPCB_GO
;; hardware configuration
-DENABLE_GATES_MCP23S17
-DUSB_MIDI4_SERIAL
;; screen configuration
-DENABLE_SCREEN
-DTFT_ILI9341_T3N
-DSCREEN_ROTATION=1 ;; this works and needs mod to the ili9341_t3n library for the new board revision ('v1.0', incorrectly sold as an st7789), but should be 2 for the old board revision i have ('v2.0')
-DTFT_SCLK=13
-DTFT_MOSI=11
-DTFT_MISO=12
-DTFT_CS=9
-DTFT_DC=10
-DTFT_RST=-1
-DTFT_WIDTH=320
-DTFT_HEIGHT=240
;; feature configuration
-DENABLE_PARAMETERS
-DENABLE_EUCLIDIAN
-DENABLE_SCALES
-DENABLE_ENVELOPES
-DENABLE_ENVELOPES_AS_PARAMETER_INPUTS
-DENABLE_CLOCK_INPUT_MIDI_DIN
-DENABLE_TAPTEMPO
-DENABLE_SHUFFLE
-DUSE_UCLOCK ;; use uclock library
;; ADC, for CV inputs
;-DENABLE_CV_INPUT=0x48 ;; NOTE: this will clash with the broadcast address of 0x48 for the DAC8574
-DENABLE_CV_INPUT_PITCH
-DENABLE_CV_INPUT=0x49 ; need to avoid 0x48 because it's used by the DAC8574
-DENABLE_CV_INPUT_ORDER={2,1,0} ; reverse the order of CV inputs when using the CV Output expander v1, because i done a fuckup with the PCBs
-DFAST_VOLTAGE_READS
-DNUM_MIDI_OUTS=4
;;; cv output configuration, for DACs
;; first device - currently in my portable case
;-DCONFIG_CV_OUTPUT_X={i2c_address, device_number, bank_type, starting_output, {"A","B","C","None"}}
-DCONFIG_CV_OUTPUT_1={0x4E,1,BANK_SEQ,0,{\"A\",\"B\",\"C\",\"None\"}} ;; configure CV output 1 to use the sequencer bank of the MCP23S17 module (second column, using outputs #0-3) as gates
;-DCONFIG_CV_OUTPUT_1={0x4E,1,-1,0,{\"A\",\"B\",\"C\",\"None\"}} ;; configure CV output 1 not to use any gates
;; second device - currently in studio use
;-DCONFIG_CV_OUTPUT_2={0x4C,0,BANK_EXTRA,0,{\"A\",\"B\",\"C\",\"None\"}} ;; configure CV output 2 to use the extra bank of the MCP23S17, starting at output #4
;; save/load state to SD? configuration
-DENABLE_SD
-DENABLE_CALIBRATION_STORAGE
-DLOAD_CALIBRATION_ON_BOOT
-DCALLOC_FUNC=extmem_calloc
-DMALLOC_FUNC=extmem_malloc
;; debug configuration
-DENABLE_PRINTF
-g ;; generate debug symbols?
;;; for building for eurorack module version (ili9341, mcp23s17 gates) - with teensy framework v4.18.0 -- doesn't compile, uses too much memory !
[env:pcb_t3n418]
platform = teensy@4.18.0
board = teensy41
framework = arduino
extra_scripts=pre:add_git_branch.py
build_unflags = -O2 -DUSB_SERIAL -DUSB_MIDI16_DUAL_SERIAL -DUSB_MIDI_SERIAL ;-DUSB_MIDI4_SERIAL
build_flags =
-Os
;-flto
;-Wl,-Map,output-417.map
-DUSE_UCLOCK
-DPCB
-DENABLE_GATES_MCP23S17
-DUSB_MIDI4_SERIAL
-DENABLE_SCREEN
-DTFT_ILI9341_T3N
-DENABLE_PRINTF
-DENABLE_SD
-DENABLE_CALIBRATION_STORAGE
-DLOAD_CALIBRATION_ON_BOOT
-DDISABLE_ALL_LIBRARY_WARNINGS
-DENABLE_CLOCK_INPUT_MIDI_DIN
-DSCREEN_ROTATION=1 ;; this works and needs mod to the ili9341_t3n library for the new board revision ('v1.0', incorrectly sold as an st7899), but should be 2 for the old board revision i have ('v2.0')
-DTFT_SCLK=13
-DTFT_MOSI=11
-DTFT_MISO=12
-DTFT_CS=9
-DTFT_DC=10
-DTFT_RST=-1
-DTFT_WIDTH=320
-DTFT_HEIGHT=240
-g
lib_deps =
midi
usbhost_t36
SD @ 2.0.0
ILI9341_t3n
vortigont/LinkedList
SdFat
RobTillaart/ADS1X15@^0.4.1
RobTillaart/MCP23S17@^0.4.0
mymenu
parameters
midihelpers
khoih-prog/Functional-Vlpp@^1.0.2
uClock
lib_extra_dirs =
C:\Users\doctea\Documents\Arduino\my_libraries
lib
monitor_filters = time