Skip to content

Commit 074e77d

Browse files
author
Owen
authored
Merge pull request #259 from sparkfun/release-candidate
2 parents 310e9d2 + 810d434 commit 074e77d

40 files changed

+43
-63
lines changed

Diff for: boards.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ sfe_artemis.menu.svl_baud.460800=460800
3535
sfe_artemis.menu.svl_baud.230400=230400
3636
sfe_artemis.menu.svl_baud.115200=115200
3737
sfe_artemis.menu.svl_baud.57600=57600
38-
sfe_artemis.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
3938
sfe_artemis.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
39+
sfe_artemis.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
4040

4141
sfe_artemis.menu.svl_baud.57600.upload.svl_baud=57600
4242
sfe_artemis.menu.svl_baud.115200.upload.svl_baud=115200
@@ -68,8 +68,8 @@ sfe_artemis_atp.menu.svl_baud.460800=460800
6868
sfe_artemis_atp.menu.svl_baud.230400=230400
6969
sfe_artemis_atp.menu.svl_baud.115200=115200
7070
sfe_artemis_atp.menu.svl_baud.57600=57600
71-
sfe_artemis_atp.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
7271
sfe_artemis_atp.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
72+
sfe_artemis_atp.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
7373

7474
sfe_artemis_atp.menu.svl_baud.57600.upload.svl_baud=57600
7575
sfe_artemis_atp.menu.svl_baud.115200.upload.svl_baud=115200
@@ -101,8 +101,8 @@ sfe_artemis_nano.menu.svl_baud.460800=460800
101101
sfe_artemis_nano.menu.svl_baud.230400=230400
102102
sfe_artemis_nano.menu.svl_baud.115200=115200
103103
sfe_artemis_nano.menu.svl_baud.57600=57600
104-
sfe_artemis_nano.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
105104
sfe_artemis_nano.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
105+
sfe_artemis_nano.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
106106

107107
sfe_artemis_nano.menu.svl_baud.57600.upload.svl_baud=57600
108108
sfe_artemis_nano.menu.svl_baud.115200.upload.svl_baud=115200
@@ -134,8 +134,8 @@ sfe_artemis_thing_plus.menu.svl_baud.460800=460800
134134
sfe_artemis_thing_plus.menu.svl_baud.230400=230400
135135
sfe_artemis_thing_plus.menu.svl_baud.115200=115200
136136
sfe_artemis_thing_plus.menu.svl_baud.57600=57600
137-
sfe_artemis_thing_plus.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
138137
sfe_artemis_thing_plus.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
138+
sfe_artemis_thing_plus.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
139139

140140
sfe_artemis_thing_plus.menu.svl_baud.57600.upload.svl_baud=57600
141141
sfe_artemis_thing_plus.menu.svl_baud.115200.upload.svl_baud=115200
@@ -205,8 +205,8 @@ sfe_edge2.menu.svl_baud.460800=460800
205205
sfe_edge2.menu.svl_baud.230400=230400
206206
sfe_edge2.menu.svl_baud.115200=115200
207207
sfe_edge2.menu.svl_baud.57600=57600
208-
sfe_edge2.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
209208
sfe_edge2.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
209+
sfe_edge2.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
210210

211211
sfe_edge2.menu.svl_baud.57600.upload.svl_baud=57600
212212
sfe_edge2.menu.svl_baud.115200.upload.svl_baud=115200
@@ -238,8 +238,8 @@ sfe_artemis_module.menu.svl_baud.460800=460800
238238
sfe_artemis_module.menu.svl_baud.230400=230400
239239
sfe_artemis_module.menu.svl_baud.115200=115200
240240
sfe_artemis_module.menu.svl_baud.57600=57600
241-
sfe_artemis_module.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
242241
sfe_artemis_module.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced)
242+
sfe_artemis_module.menu.loader.option_svl=SparkFun Variable Loader (Recommended)
243243

244244
sfe_artemis_module.menu.svl_baud.57600.upload.svl_baud=57600
245245
sfe_artemis_module.menu.svl_baud.115200.upload.svl_baud=115200

Diff for: libraries/Apollo3/examples/Serial/Serial.ino

+1-25
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,11 @@
5050
| | 47
5151
*/
5252

53-
// uncomment to define SERIAL1_TX and SERIAL1_RX as custom pin numbers in case they
54-
// are not defined by default (look up the correct pad <--> pin mapping for your board
55-
#define SERIAL1_TX 35
56-
#define SERIAL1_RX 13
57-
58-
// uncomment to use these names if defined for your board
59-
// (these are also the pins used for Serial1, which is
60-
// available on applicable boards)
61-
#define HAS_SERIAL1
62-
UART mySerial(SERIAL1_TX, SERIAL1_RX);
63-
6453
#define BAUD 115200 // any number, common choices: 9600, 115200, 230400, 921600
6554
#define CONFIG SERIAL_8N1 // a config value from HardwareSerial.h (defaults to SERIAL_8N1)
6655

6756
void setup() {
68-
Serial.begin(BAUD); // set the baud rate with the begin() method
57+
Serial.begin(BAUD); // set the baud rate with the begin() method
6958
Serial.println("\n\nApollo3 - Serial");
7059

7160
// the Apollo3 core supports printf on Serial
@@ -74,23 +63,10 @@ void setup() {
7463
}
7564

7665
Serial.println("\nEcho... (type characters into the Serial Monitor to see them echo back)\n");
77-
78-
79-
#ifdef HAS_SERIAL1
80-
mySerial.begin(BAUD, CONFIG); // specify the config setting as the secnd argument
81-
mySerial.println("\n\nApollo3 - mySerial");
82-
mySerial.println("\nEcho... (type characters into the Serial Monitor to see them echo back)\n");
83-
#endif
8466
}
8567

8668
void loop() {
8769
while(Serial.available()){
8870
Serial.write(Serial.read());
8971
}
90-
91-
#ifdef HAS_SERIAL1
92-
while(mySerial.available()){
93-
mySerial.write(mySerial.read());
94-
}
95-
#endif
9672
}

Diff for: libraries/Wire/src/Wire.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88
arduino::MbedI2C::MbedI2C(int sda, int scl) : _sda(sda), _scl(scl), usedTxBuffer(0) {}
99

1010
void arduino::MbedI2C::begin() {
11-
master = new mbed::I2C((PinName)_sda, (PinName)_scl);
11+
if(!master){
12+
master = new mbed::I2C((PinName)_sda, (PinName)_scl);
13+
}
1214
}
1315

1416
void arduino::MbedI2C::begin(uint8_t slaveAddr) {
1517
#ifdef DEVICE_I2CSLAVE
16-
slave = new mbed::I2CSlave((PinName)_sda, (PinName)_scl);
18+
if(!slave){
19+
slave = new mbed::I2CSlave((PinName)_sda, (PinName)_scl);
20+
}
1721
slave->address(slaveAddr << 1);
1822
slave_th.start(mbed::callback(this, &arduino::MbedI2C::receiveThd));
1923
#endif

Diff for: platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defines.mbed=-DMBED_NO_GLOBAL_USING_DIRECTIVE
1414
defines.variant={build.defines}
1515
defines.extra=
1616
defines.all={defines.variant} {defines.arduino} {defines.mbed} {defines.extra} -DCORDIO_ZERO_COPY_HCI
17-
defines.preproc={defines.mbed.cxx}
17+
defines.preproc={defines.all}
1818
defines.asm={defines.all} @{build.variant.path}/mbed/.asm-symbols
1919
defines.c={defines.all} @{build.variant.path}/mbed/.c-symbols
2020
defines.cxx={defines.all} @{build.variant.path}/mbed/.cxx-symbols

Diff for: variants/SFE_ARTEMIS/mbed/.asm-symbols

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM
1+
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCORDIO_ZERO_COPY_HCI -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM

Diff for: variants/SFE_ARTEMIS/mbed/.c-symbols

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_LPTICKER=1 -DDEVICE_MPU=1 -DDEVICE_SERIAL=1 -DDEVICE_SPI=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_USTICKER=1 -DFEATURE_BLE=1 -DTARGET_AMA3B1KK -DTARGET_Ambiq_Micro -DTARGET_Apollo3 -DTARGET_CORDIO -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_FAMILY_Apollo3 -DTARGET_LIKE_CORTEX_M4 -DTARGET_LIKE_MBED -DTARGET_M4 -DTARGET_NAME=SFE_ARTEMIS -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1
1+
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DCORDIO_ZERO_COPY_HCI -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_LPTICKER=1 -DDEVICE_MPU=1 -DDEVICE_SERIAL=1 -DDEVICE_SPI=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_USTICKER=1 -DFEATURE_BLE=1 -DTARGET_AMA3B1KK -DTARGET_Ambiq_Micro -DTARGET_Apollo3 -DTARGET_CORDIO -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_FAMILY_Apollo3 -DTARGET_LIKE_CORTEX_M4 -DTARGET_LIKE_MBED -DTARGET_M4 -DTARGET_NAME=SFE_ARTEMIS -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1

Diff for: variants/SFE_ARTEMIS/mbed/.cxx-symbols

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_LPTICKER=1 -DDEVICE_MPU=1 -DDEVICE_SERIAL=1 -DDEVICE_SPI=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_USTICKER=1 -DFEATURE_BLE=1 -DTARGET_AMA3B1KK -DTARGET_Ambiq_Micro -DTARGET_Apollo3 -DTARGET_CORDIO -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_FAMILY_Apollo3 -DTARGET_LIKE_CORTEX_M4 -DTARGET_LIKE_MBED -DTARGET_M4 -DTARGET_NAME=SFE_ARTEMIS -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1
1+
-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DCORDIO_ZERO_COPY_HCI -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_LPTICKER=1 -DDEVICE_MPU=1 -DDEVICE_SERIAL=1 -DDEVICE_SPI=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_USTICKER=1 -DFEATURE_BLE=1 -DTARGET_AMA3B1KK -DTARGET_Ambiq_Micro -DTARGET_Apollo3 -DTARGET_CORDIO -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_FAMILY_Apollo3 -DTARGET_LIKE_CORTEX_M4 -DTARGET_LIKE_MBED -DTARGET_M4 -DTARGET_NAME=SFE_ARTEMIS -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1

0 commit comments

Comments
 (0)