diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml deleted file mode 100644 index 80e070a2..00000000 --- a/.github/workflows/post-release.yml +++ /dev/null @@ -1,46 +0,0 @@ -# on: -# release: -# types: [published] - -# name: Post Release - -# jobs: -# build: -# name: Post Release -# runs-on: ubuntu-latest -# steps: -# - name: check out code -# uses: actions/checkout@v2.3.1 -# with: -# path: arduino-apollo3 -# fetch-depth: 0 - -# - name: initialize submodules -# run: | -# cd arduino-apollo3 -# git submodule update --init --recursive - -# - name: generate binaries -# run: echo "here's where I would generate tars / zips of the full item" -# - name: attach binaries -# run: echo "here's where I would attach binaries to the release" -# # - name: changelog -# # id: changelog -# # uses: scottbrenner/generate-changelog-action@1.0.0 -# # env: -# # REPO: ${{ github.repository }} - -# - name: create release -# id: create_release -# # run: echo "placeholder for release creation ${{steps.changelog.outputs.changelog}}" -# run: echo "placeholder for release creation ${{steps.changelog.outputs.changelog}}" -# # uses: actions/create-release@latest -# # env: -# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# # with: -# # tag_name: ${{ github.ref }} -# # release_name: Release ${{ github.ref }} -# # body: | -# # ${{ steps.changelog.outputs.changelog }} -# # draft: false -# # prerelease: false \ No newline at end of file diff --git a/README.MD b/README.MD index 6646847b..acaaeeeb 100644 --- a/README.MD +++ b/README.MD @@ -20,7 +20,8 @@ An mbed-os enabled Arduino core for Ambiq Apollo3 based boards ## Installation ### **Arduino Boards Manager** (recommended) - Copy / paste the JSON package URL into the 'Additional Boards Manager URLs' field in Arduino preferences - [https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json](https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json) (raw) + ```https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json``` + [https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json](https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json) - Open 'Boards Manager' and select 'SparkFun Apollo3 Boards' - install the latest version ### **Git** (development) @@ -32,10 +33,7 @@ An mbed-os enabled Arduino core for Ambiq Apollo3 based boards ## Development Status -- v2.0.0 based on an [mbed-os](https://github.com/ARMmbed/mbed-os) framework - -#### Priorities -- support additional capabilities using Apollo3 peripherals +* v2.0.0 based on an [mbed-os](https://github.com/ARMmbed/mbed-os) framework **Main Arduino Features** * Serial: ✅ @@ -44,20 +42,22 @@ An mbed-os enabled Arduino core for Ambiq Apollo3 based boards * Analog Input: ✅ * Timing / Delays: ✅ + **Standard Libraries** * Wire * Controller: ✅ - * Peripheral: ❌ + * Peripheral: 🤔 * SPI * Controller: ✅ - * Peripheral: ❌ - * Software Serial: ✅ + * Peripheral: 🤔 + * EEPROM: ✅ **Apollo3 Specialty Peripherals** * PDM Microphones / I2S: ✅ * BLE: ✅ + * RTC: ✅ + * Watchdog Timer: 🤔 * Multi-bit SPI: 🤔 - * I2C/SPI Peripheral: 🤔 ## More ### [License](./docs/ISSUES.md) diff --git a/boards.txt b/boards.txt index e352c4aa..6dc511a1 100644 --- a/boards.txt +++ b/boards.txt @@ -35,8 +35,8 @@ sfe_artemis.menu.svl_baud.460800=460800 sfe_artemis.menu.svl_baud.230400=230400 sfe_artemis.menu.svl_baud.115200=115200 sfe_artemis.menu.svl_baud.57600=57600 -sfe_artemis.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_artemis.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis.menu.svl_baud.57600.upload.svl_baud=57600 sfe_artemis.menu.svl_baud.115200.upload.svl_baud=115200 @@ -68,8 +68,8 @@ sfe_artemis_atp.menu.svl_baud.460800=460800 sfe_artemis_atp.menu.svl_baud.230400=230400 sfe_artemis_atp.menu.svl_baud.115200=115200 sfe_artemis_atp.menu.svl_baud.57600=57600 -sfe_artemis_atp.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_atp.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_artemis_atp.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_atp.menu.svl_baud.57600.upload.svl_baud=57600 sfe_artemis_atp.menu.svl_baud.115200.upload.svl_baud=115200 @@ -101,8 +101,8 @@ sfe_artemis_nano.menu.svl_baud.460800=460800 sfe_artemis_nano.menu.svl_baud.230400=230400 sfe_artemis_nano.menu.svl_baud.115200=115200 sfe_artemis_nano.menu.svl_baud.57600=57600 -sfe_artemis_nano.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_nano.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_artemis_nano.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_nano.menu.svl_baud.57600.upload.svl_baud=57600 sfe_artemis_nano.menu.svl_baud.115200.upload.svl_baud=115200 @@ -134,8 +134,8 @@ sfe_artemis_thing_plus.menu.svl_baud.460800=460800 sfe_artemis_thing_plus.menu.svl_baud.230400=230400 sfe_artemis_thing_plus.menu.svl_baud.115200=115200 sfe_artemis_thing_plus.menu.svl_baud.57600=57600 -sfe_artemis_thing_plus.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_thing_plus.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_artemis_thing_plus.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_thing_plus.menu.svl_baud.57600.upload.svl_baud=57600 sfe_artemis_thing_plus.menu.svl_baud.115200.upload.svl_baud=115200 @@ -205,8 +205,8 @@ sfe_edge2.menu.svl_baud.460800=460800 sfe_edge2.menu.svl_baud.230400=230400 sfe_edge2.menu.svl_baud.115200=115200 sfe_edge2.menu.svl_baud.57600=57600 -sfe_edge2.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_edge2.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_edge2.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_edge2.menu.svl_baud.57600.upload.svl_baud=57600 sfe_edge2.menu.svl_baud.115200.upload.svl_baud=115200 @@ -238,8 +238,8 @@ sfe_artemis_module.menu.svl_baud.460800=460800 sfe_artemis_module.menu.svl_baud.230400=230400 sfe_artemis_module.menu.svl_baud.115200=115200 sfe_artemis_module.menu.svl_baud.57600=57600 -sfe_artemis_module.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_module.menu.loader.option_asb=Ambiq Secure Bootloader (Advanced) +sfe_artemis_module.menu.loader.option_svl=SparkFun Variable Loader (Recommended) sfe_artemis_module.menu.svl_baud.57600.upload.svl_baud=57600 sfe_artemis_module.menu.svl_baud.115200.upload.svl_baud=115200 diff --git a/cores/mbed-os b/cores/mbed-os index 7c1897f5..1e8f3b94 160000 --- a/cores/mbed-os +++ b/cores/mbed-os @@ -1 +1 @@ -Subproject commit 7c1897f57cf3083166b373ec7ca5ed81efc60a4a +Subproject commit 1e8f3b9421ab11f6f46f9e296d2fc44d9e6d3c2c diff --git a/libraries/Apollo3/examples/Threads/Threads.ino b/libraries/Apollo3/examples/Threads/Threads.ino index a679a199..8594eec9 100644 --- a/libraries/Apollo3/examples/Threads/Threads.ino +++ b/libraries/Apollo3/examples/Threads/Threads.ino @@ -17,9 +17,6 @@ is used to blink the onboard LED and another thread is used to print status messages over Serial. - This sketch, written without an RTOS, would be growing into a nest of coniditonal - statements all written in one main loop. Instead - */ #define STATUS_COUNT_TOTAL (10) diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index 3cbc4402..7136daf4 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -8,12 +8,16 @@ arduino::MbedI2C::MbedI2C(int sda, int scl) : _sda(sda), _scl(scl), usedTxBuffer(0) {} void arduino::MbedI2C::begin() { - master = new mbed::I2C((PinName)_sda, (PinName)_scl); + if(!master){ + master = new mbed::I2C((PinName)_sda, (PinName)_scl); + } } void arduino::MbedI2C::begin(uint8_t slaveAddr) { #ifdef DEVICE_I2CSLAVE - slave = new mbed::I2CSlave((PinName)_sda, (PinName)_scl); + if(!slave){ + slave = new mbed::I2CSlave((PinName)_sda, (PinName)_scl); + } slave->address(slaveAddr << 1); slave_th.start(mbed::callback(this, &arduino::MbedI2C::receiveThd)); #endif diff --git a/platform.txt b/platform.txt index 9e6674df..9affe29b 100644 --- a/platform.txt +++ b/platform.txt @@ -14,7 +14,7 @@ defines.mbed=-DMBED_NO_GLOBAL_USING_DIRECTIVE defines.variant={build.defines} defines.extra= defines.all={defines.variant} {defines.arduino} {defines.mbed} {defines.extra} -DCORDIO_ZERO_COPY_HCI -defines.preproc={defines.mbed.cxx} +defines.preproc={defines.all} defines.asm={defines.all} @{build.variant.path}/mbed/.asm-symbols defines.c={defines.all} @{build.variant.path}/mbed/.c-symbols defines.cxx={defines.all} @{build.variant.path}/mbed/.cxx-symbols diff --git a/variants/SFE_ARTEMIS/mbed/.ld-symbols b/variants/SFE_ARTEMIS/mbed/.ld-symbols index 4d65deb2..2b289e27 100644 --- a/variants/SFE_ARTEMIS/mbed/.ld-symbols +++ b/variants/SFE_ARTEMIS/mbed/.ld-symbols @@ -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 -DMBED_BUILD_TIMESTAMP=1598506785.1423671 -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 \ No newline at end of file +-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 -DMBED_BUILD_TIMESTAMP=1598689584.9844341 -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 \ No newline at end of file diff --git a/variants/SFE_ARTEMIS/mbed/libmbed-os.a b/variants/SFE_ARTEMIS/mbed/libmbed-os.a index 9be1586c..2d527e4e 100644 Binary files a/variants/SFE_ARTEMIS/mbed/libmbed-os.a and b/variants/SFE_ARTEMIS/mbed/libmbed-os.a differ diff --git a/variants/SFE_ARTEMIS_ATP/mbed/.ld-symbols b/variants/SFE_ARTEMIS_ATP/mbed/.ld-symbols index d05fdddc..88a7590d 100644 --- a/variants/SFE_ARTEMIS_ATP/mbed/.ld-symbols +++ b/variants/SFE_ARTEMIS_ATP/mbed/.ld-symbols @@ -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 -DMBED_BUILD_TIMESTAMP=1598506973.9875057 -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_ATP -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS_ATP -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 \ No newline at end of file +-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 -DMBED_BUILD_TIMESTAMP=1598689768.2106545 -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_ATP -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS_ATP -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 \ No newline at end of file diff --git a/variants/SFE_ARTEMIS_ATP/mbed/libmbed-os.a b/variants/SFE_ARTEMIS_ATP/mbed/libmbed-os.a index 7ec6d110..cba3f784 100644 Binary files a/variants/SFE_ARTEMIS_ATP/mbed/libmbed-os.a and b/variants/SFE_ARTEMIS_ATP/mbed/libmbed-os.a differ diff --git a/variants/SFE_ARTEMIS_DK/mbed/.ld-symbols b/variants/SFE_ARTEMIS_DK/mbed/.ld-symbols index 1b217de7..e1c56a6a 100644 --- a/variants/SFE_ARTEMIS_DK/mbed/.ld-symbols +++ b/variants/SFE_ARTEMIS_DK/mbed/.ld-symbols @@ -1 +1 @@ --DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DCOMPONENT_hm01b0=1 -DCOMPONENT_lis2dh12=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 -DMBED_BUILD_TIMESTAMP=1598507156.6832268 -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_DK -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS_DK -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 \ No newline at end of file +-DAM_PACKAGE_BGA -DARM_MATH_CM4 -DCOMPONENT_FLASHIAP=1 -DCOMPONENT_hm01b0=1 -DCOMPONENT_lis2dh12=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 -DMBED_BUILD_TIMESTAMP=1598689949.4009697 -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_DK -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS_DK -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 \ No newline at end of file diff --git a/variants/SFE_ARTEMIS_DK/mbed/libmbed-os.a b/variants/SFE_ARTEMIS_DK/mbed/libmbed-os.a index 45230fbb..e7d011de 100644 Binary files a/variants/SFE_ARTEMIS_DK/mbed/libmbed-os.a and b/variants/SFE_ARTEMIS_DK/mbed/libmbed-os.a differ diff --git a/variants/SFE_ARTEMIS_NANO/mbed/.ld-symbols b/variants/SFE_ARTEMIS_NANO/mbed/.ld-symbols index 5a0ac1b2..3817be71 100644 --- a/variants/SFE_ARTEMIS_NANO/mbed/.ld-symbols +++ b/variants/SFE_ARTEMIS_NANO/mbed/.ld-symbols @@ -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 -DMBED_BUILD_TIMESTAMP=1598507344.7305253 -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_NANO -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_SFE_ARTEMIS_NANO -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -D__CMSIS_RTOS -D__CORTEX_M4 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 \ No newline at end of file +-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 -DMBED_BUILD_TIMESTAMP=1598690130.9761665 -DTARGET_AMA3B1KK -DTARGET_Ambiq_Micro -DTARGET_Apollo3 -DTARGET_CORDIO -DTARGET_COR{"code":"internal","msg":"git-diff-tree: context deadline exceeded","meta":{"cause":"*fmt.wrapError"}}