Skip to content

Commit c6c1e4e

Browse files
committed
Merge branch 'sean.wallace.working'
2 parents fddbfbf + ea91d37 commit c6c1e4e

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.vscode
2-
doxydocs
2+
doxydocs
3+
project.checksum
4+
*.json

.pio/build/due/idedata.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.pio/build/project.checksum

Lines changed: 0 additions & 1 deletion
This file was deleted.

317_upload.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# script for uploading firmware with bossa without rebuilding the project
2+
# TODO: check if you can exclude port specification, include windows and linux support
3+
import os
4+
import subprocess
5+
import re
6+
filepath = ".pio/build/due/firmware.bin"
7+
# bossa port format doesn't match above ls so we have to reconstruct
8+
mac_port = subprocess.check_output("ls /dev/tty.usb*", shell=True, text=True).strip()
9+
print(mac_port)
10+
port_num = re.findall(r'\d+', mac_port)[0]
11+
print(port_num)
12+
port = "cu.usbmodem"+str(port_num)
13+
# send 1200 bps signal to enter boot loading mode
14+
command = "stty 1200 < /dev/"+port
15+
os.system(command)
16+
# upload firmware with bossac.
17+
# -U must be true for native port upload (bobshieldv6)
18+
command = "~/Library/Arduino15/packages/arduino/tools/bossac/1.6.1-arduino/bossac -i -d --port="+port+" -U true -e -w -v -b "+filepath
19+
os.system(command)

replace_libsam.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Import("env")
22
import os
33

4+
if env.IsIntegrationDump():
5+
# stop the current script execution
6+
Return()
7+
8+
# code below runs for the "build" and other targets
9+
env.Append(CPPDEFINES=["MACRO_NAME"])
10+
11+
412
libs = env["LIBS"]
513
#print("Current libs: " + str(libs))
614
# remove the original "sam_sam3x8e_gcc_rel" lib

0 commit comments

Comments
 (0)