-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·40 lines (28 loc) · 3.11 KB
/
build.sh
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
# So the example canbe used to test the library
ln -s ./examples/PollingThreePins/PollingThreePins.ino SinglePinCapacitiveSense.ino
#ln -s ./examples/MegaADK/MegaADK.ino SinglePinCapacitiveSense.ino
#ln -s ./examples/Debounce/Debounce.ino SinglePinCapacitiveSense.ino
mkdir build-uno
mkdir build-due
mkdir build-due-debounce
mkdir build-nano
mkdir build-mega
mkdir build-megaADK
# So the CLI will see in the project's root folder a library with the expected name
ln -s ./ SinglePinCapacitiveSense
# For the FQBN definitions look at this file:
# <ARDUINO_PATH>/hardware/arduino/avr/boards.txt
echo "Compile uno"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:uno -libraries /workspace/ -verbose -build-path /workspace/build-uno /workspace/examples/PollingThreePins/PollingThreePins.ino
echo "Compile due"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:diecimila:cpu=atmega328 -libraries /workspace/ -verbose -build-path /workspace/build-due /workspace/examples/PollingThreePins/PollingThreePins.ino
echo "Compile due-debounce"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:diecimila:cpu=atmega328 -libraries /workspace/ -verbose -build-path /workspace/build-due-debounce /workspace/examples/Debounce/Debounce.ino
echo "Compile nano"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:nano:cpu=atmega328 -libraries /workspace/ -verbose -build-path /workspace/build-nano /workspace/examples/PollingThreePins/PollingThreePins.ino
echo "Compile mega2560"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:mega:cpu=atmega2560 -libraries /workspace/ -verbose -build-path /workspace/build-mega /workspace/examples/PollingThreePins/PollingThreePins.ino
echo "Compile megaADK"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder arduino-builder -compile -hardware /arduino/hardware -tools /arduino/hardware/tools/avr -tools /arduino/tools-builder -fqbn arduino:avr:megaADK -libraries /workspace/ -verbose -build-path /workspace/build-megaADK /workspace/examples/MegaADK/MegaADK.ino
echo "Generate map list for due"
docker run -it --rm -v $(pwd):/workspace -u $(id -u):$(id -g) aarontc/arduino-builder /arduino/hardware/tools/avr/bin/avr-objdump --source --all-headers --demangle --line-numbers --wide ./build-due/PollingThreePins.ino.elf > ./build-due/map-listing.txt