Merge pull request #1135 from dhalbert/nrf_board_rename

rename nRF boards to feather_nrf52832 and feather_nrf52840_express
This commit is contained in:
Scott Shawcroft 2018-08-23 22:00:31 -07:00 committed by GitHub
commit d1b588375b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 137 additions and 70 deletions

View File

@ -30,7 +30,8 @@ env:
- TRAVIS_BOARD=pirkey_m0 - TRAVIS_BOARD=pirkey_m0
- TRAVIS_BOARD=gemma_m0 - TRAVIS_BOARD=gemma_m0
- TRAVIS_BOARD=hallowing_m0_express - TRAVIS_BOARD=hallowing_m0_express
- TRAVIS_BOARD=feather52832 - TRAVIS_BOARD=feather_nrf52832
- TRAVIS_BOARD=feather_nrf52840_express
addons: addons:
artifacts: artifacts:
@ -54,7 +55,7 @@ before_script:
- ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb)) - ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
# For nrf builds # For nrf builds
- ([[ $TRAVIS_BOARD != "feather52832" && $TRAVIS_BOARD != "pca10056" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh) - ([[ $TRAVIS_BOARD != "feather_nrf52832" && $TRAVIS_BOARD != "feather_nrf52840_express" && $TRAVIS_BOARD != "pca10056" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
# For huzzah builds # For huzzah builds
- if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi - if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
# For coverage testing (upgrade is used to get latest urllib3 version) # For coverage testing (upgrade is used to get latest urllib3 version)

View File

@ -36,9 +36,9 @@ the following links:
> **NOTE**: These board specific readmes may be more up to date than the > **NOTE**: These board specific readmes may be more up to date than the
generic board-neutral documentation further down. generic board-neutral documentation further down.
* Adafruit [Feather nRF52](boards/feather52/README.md): 512KB Flash, 64KB SRAM * Adafruit [Feather nRF52](boards/feather_nrf52832/README.md): 512KB Flash, 64KB SRAM
* Adafruit [Feather nRF52840](boards/feather52840/README.md): 1MB Flash, 256KB SRAM * Adafruit [Feather nRF52840](boards/feather_nrf52840_express/README.md): 1MB Flash, 256KB SRAM
* Nordic PCA10056 see [Feather nRF52840](boards/feather52840/README.md) * Nordic PCA10056 see [Feather nRF52840](boards/pca10056/README.md)
For all other board targets, see the generic notes below. For all other board targets, see the generic notes below.
@ -74,12 +74,12 @@ Note: further tuning of features to include in bluetooth or even setting up the
## Target Boards and Make Flags ## Target Boards and Make Flags
Target Board (BOARD) | Bluetooth Stack (SD) | Bluetooth Support | Flash Util Target Board (BOARD) | Bluetooth Stack (SD) | Bluetooth Support | Flash Util
---------------------|-------------------------|------------------------|------------------------------- -------------------------|-------------------------|------------------------|-------------------------------
pca10040 | s132 | Peripheral and Scanner | [Segger](#segger-targets) pca10040 | s132 | Peripheral and Scanner | [Segger](#segger-targets)
feather52832 | s132 | Peripheral and Scanner | [UART DFU](#dfu-targets) pca10056 | s140 | Peripheral and Scanner | [Segger](#segger-targets)
pca10056 | s140 | Peripheral and Scanner | [Segger](#segger-targets) feather_nrf52832 | s132 | Peripheral and Scanner | [UART DFU](#dfu-targets)
feather52840 | s140 | Peripheral and Scanner | [UART DFU](#dfu-targets) feather_nrf52840_express | s140 | Peripheral and Scanner | UF2 bootloader
## Segger Targets ## Segger Targets
@ -107,9 +107,9 @@ run follow command to install [adafruit-nrfutil](https://github.com/adafruit/Ada
* dfu-gen: Generates a Firmware zip to be used by the DFU flash application. * dfu-gen: Generates a Firmware zip to be used by the DFU flash application.
* dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file. * dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file.
Example on how to generate and flash feather52832 target: Example on how to generate and flash feather_nrf52832 target:
make BOARD=feather52832 SD=s132 make BOARD=feather_nrf52832 SD=s132
make BOARD=feather52832 SD=s132 dfu-gen dfu-flash make BOARD=feather52832 SD=s132 dfu-gen dfu-flash
## Bluetooth LE REPL ## Bluetooth LE REPL

View File

@ -1,10 +0,0 @@
MCU_SERIES = m4
MCU_VARIANT = nrf52
MCU_SUB_VARIANT = nrf52
SD ?= s132
SOFTDEV_VERSION ?= 2.0.1
LD_FILE = boards/feather52832/custom_nrf52832_dfu_app_$(SOFTDEV_VERSION).ld
BOOT_SETTING_ADDR = 0x7F000
NRF_DEFINES += -DNRF52832_XXAA

View File

@ -1,38 +0,0 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Glenn Ruben Bakke
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#define FEATHER52840
#define MICROPY_HW_BOARD_NAME "Feather52840"
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Feather52840"
#define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8)
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
#define MICROPY_HW_UART_HWFC (0)
#define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500

View File

@ -38,12 +38,12 @@ run following command to install [adafruit-nrfutil](https://github.com/adafruit/
#### REPL over UART (default settings) #### REPL over UART (default settings)
To build a CircuitPython binary with default settings for the To build a CircuitPython binary with default settings for the
`feather52832` target enter: `feather_nrf52832` target enter:
> **NOTE:** `BOARD=feather52832` is the default option and isn't stricly required. > **NOTE:** `BOARD=feather_nrf52832` is the default option and isn't stricly required.
``` ```
$ make BOARD=feather52832 V=1 $ make BOARD=feather_nrf52832 V=1
``` ```
#### REPL over BLE UART (AKA 'NUS') #### REPL over BLE UART (AKA 'NUS')
@ -113,7 +113,7 @@ image, as described earlier in this readme.
> The name of the serial port target will vary, depending on your OS. > The name of the serial port target will vary, depending on your OS.
``` ```
$ make BOARD=feather52832 SERIAL=/dev/tty.SLAB_USBtoUART dfu-gen dfu-flash $ make BOARD=feather_nrf52832 SERIAL=/dev/tty.SLAB_USBtoUART dfu-gen dfu-flash
``` ```
By default, CircuitPython will build with **BLE** support enabled using By default, CircuitPython will build with **BLE** support enabled using
@ -121,7 +121,7 @@ By default, CircuitPython will build with **BLE** support enabled using
SD family or version you can enter the optional fields as shown below: SD family or version you can enter the optional fields as shown below:
``` ```
$ make BOARD=feather52832 SERIAL=/dev/tty.SLAB_USBtoUART SD=s132 SOFTDEV_VERSION=5.0.0 dfu-gen dfu-flash $ make BOARD=feather_nrf52832 SERIAL=/dev/tty.SLAB_USBtoUART SD=s132 SOFTDEV_VERSION=5.0.0 dfu-gen dfu-flash
``` ```
## Working with CircuitPython ## Working with CircuitPython

View File

@ -0,0 +1,11 @@
MCU_SERIES = m4
MCU_VARIANT = nrf52
MCU_SUB_VARIANT = nrf52
SD ?= s132
SOFTDEV_VERSION ?= 2.0.1
LD_FILE = boards/feather_nrf52832/custom_nrf52832_dfu_app_$(SOFTDEV_VERSION).ld
BOOT_FILE = boards/feather_nrf52832/bootloader/feather52_bootloader_$(SOFTDEV_VERSION)_s132_single
BOOT_SETTING_ADDR = 0x7F000
NRF_DEFINES += -DNRF52832_XXAA

View File

@ -0,0 +1,75 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Glenn Ruben Bakke
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#define FEATHER52840
#define MICROPY_HW_BOARD_NAME "Adafruit Feather nRF52840 Express"
#define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Feather52840"
// #define MICROPY_HW_NEOPIXEL NRF_GPIO_PIN_MAP(0, 13)
// #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 9)
// #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 11)
// #define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 12)
// #define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 14)
// #define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 8)
// #define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(1, 8)
// #define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8)
// #define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
// #define MICROPY_HW_UART_HWFC (0)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
// If you change this, then make sure to update the linker scripts as well to
// make sure you don't overwrite code
#define PORT_HEAP_SIZE (128 * 1024)
// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
// TODO #include "external_flash/devices.h"
#define EXTERNAL_FLASH_DEVICE_COUNT 1
#define EXTERNAL_FLASH_DEVICES GD25Q16C
#define EXTERNAL_FLASH_QSPI_DUAL
// TODO include "external_flash/external_flash.h"
#define BOARD_HAS_CRYSTAL 1
#define DEFAULT_I2C_BUS_SCL NRF_GPIO_PIN_MAP(1, 11)
#define DEFAULT_I2C_BUS_SDA NRF_GPIO_PIN_MAP(1, 12)
#define DEFAULT_SPI_BUS_SCK NRF_GPIO_PIN_MAP(0, 20)
#define DEFAULT_SPI_BUS_MOSI NRF_GPIO_PIN_MAP(0, 23)
#define DEFAULT_SPI_BUS_MISO NRF_GPIO_PIN_MAP(0, 22)
#define DEFAULT_UART_BUS_RX NRF_GPIO_PIN_MAP(1, 0)
#define DEFAULT_UART_BUS_TX NRF_GPIO_PIN_MAP(0, 24)

View File

@ -25,4 +25,4 @@
*/ */
// Pins aren't actually defined here. They are in the board specific directory // Pins aren't actually defined here. They are in the board specific directory
// such as boards/feather52832/pins.csv // such as boards/feather_nrf52832/pins.csv

View File

@ -2,7 +2,30 @@ rm -rf ports/atmel-samd/build*
rm -rf ports/esp8266/build* rm -rf ports/esp8266/build*
rm -rf ports/nrf/build* rm -rf ports/nrf/build*
ATMEL_BOARDS="arduino_zero circuitplayground_express circuitplayground_express_crickit feather_radiofruit_zigbee feather_m0_basic feather_m0_adalogger itsybitsy_m0_express itsybitsy_m4_express feather_m0_rfm69 feather_m0_rfm9x feather_m0_express feather_m0_express_crickit feather_m4_express metro_m0_express metro_m4_express pirkey_m0 trinket_m0 gemma_m0 feather52832 feather_huzzah pca10056 hallowing_m0_express" ATMEL_BOARDS="\
arduino_zero \
circuitplayground_express \
circuitplayground_express_crickit \
feather_huzzah \
feather_m0_adalogger \
feather_m0_basic \
feather_m0_express \
feather_m0_express_crickit \
feather_m0_rfm69 \
feather_m0_rfm9x \
feather_m4_express \
feather_nrf52832 \
feather_nrf52840 \
feather_radiofruit_zigbee \
gemma_m0 \
hallowing_m0_express \
itsybitsy_m0_express \
itsybitsy_m4_express \
metro_m0_express \
metro_m4_express \
pirkey_m0 \
trinket_m0 \
"
ROSIE_SETUPS="rosie-ci" ROSIE_SETUPS="rosie-ci"
PARALLEL="-j 5" PARALLEL="-j 5"
@ -41,11 +64,16 @@ for board in $boards; do
(( exit_status = exit_status || $? )) (( exit_status = exit_status || $? ))
temp_filename=ports/esp8266/build/firmware-combined.bin temp_filename=ports/esp8266/build/firmware-combined.bin
extension=bin extension=bin
elif [ $board == "feather52832" ]; then elif [ $board == "feather_nrf52832" ]; then
make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=feather52832 make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=feather_nrf52832
(( exit_status = exit_status || $? )) (( exit_status = exit_status || $? ))
temp_filename=ports/nrf/build-$board-s132/firmware.bin temp_filename=ports/nrf/build-$board-s132/firmware.bin
extension=bin extension=bin
elif [ $board == "feather_nrf52840_express" ]; then
make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=feather_nrf52840_express SD=s140
(( exit_status = exit_status || $? ))
temp_filename=ports/nrf/build-$board-s140/firmware.bin
extension=bin
elif [ $board == "pca10056" ]; then elif [ $board == "pca10056" ]; then
make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=pca10056 SD=s140 make $PARALLEL -C ports/nrf TRANSLATION=$language BOARD=pca10056 SD=s140
(( exit_status = exit_status || $? )) (( exit_status = exit_status || $? ))