Skip to content

Commit 1865628

Browse files
committed
Adapt NANO33BLE to bossac-bootloader
1 parent e980aae commit 1865628

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

boards.txt

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ nano33ble.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
8686
nano33ble.compiler.mbed="{build.variant.path}/libs/libmbed.a" "{build.variant.path}/libs/libcc_310_core.a" "{build.variant.path}/libs/libcc_310_ext.a" "{build.variant.path}/libs/libcc_310_trng.a"
8787
nano33ble.vid.0=0x2341
8888
nano33ble.pid.0=0x005a
89+
nano33ble.vid.1=0x2341
90+
nano33ble.pid.1=0x805a
8991

9092
nano33ble.upload.tool=bossac
9193
nano33ble.upload.protocol=

libraries/PDM/examples/RecordAndDumpOnSerial/RecordAndDumpOnSerial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void loop() {
4747
#ifdef USE_USB_AUDIO
4848
audio.write(buffer, DEFAULT_PDM_BUFFER_SIZE);
4949
#else
50-
SerialUSB.send(buffer, DEFAULT_PDM_BUFFER_SIZE);
50+
SerialUSB.mbed().send(buffer, DEFAULT_PDM_BUFFER_SIZE);
5151
#endif
5252
idx = 0;
5353
}

platform.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,11 @@ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/op
109109
#
110110
# BOSSA
111111
#
112-
tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
112+
#tools.bossac.path={runtime.tools.bossac-1.7.0-arduino3.path}
113+
tools.bossac.path={runtime.platform.path}/tools
113114
tools.bossac.cmd=bossac
114115
tools.bossac.cmd.windows=bossac.exe
115116

116-
tools.bossac.upload.params.verbose=-i -d
117+
tools.bossac.upload.params.verbose=-d
117118
tools.bossac.upload.params.quiet=
118-
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
119+
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U{upload.native_usb} -i -e -w "{build.path}/{build.project_name}.bin" -R

variants/ARDUINO_NANO33BLE/pins_arduino.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
116116
#define BOARD_VENDORID 0x2341
117117
#define BOARD_PRODUCTID 0x005a
118118

119-
#define DFU_MAGIC_SERIAL_ONLY_RESET 0x0b
119+
#define DFU_MAGIC_SERIAL_ONLY_RESET 0xb0
120120

121121
#define I2C_SDA (digitalPinToPinName(PIN_WIRE_SDA))
122122
#define I2C_SCL (digitalPinToPinName(PIN_WIRE_SCL))
@@ -130,6 +130,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
130130
#define digitalPinToPort(P) (digitalPinToPinName(P)/32)
131131

132132
static inline void _ontouch1200bps_() {
133+
__disable_irq();
133134
NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL_ONLY_RESET;
134135
NVIC_SystemReset();
135136
}

0 commit comments

Comments
 (0)