Compare commits

...
16 Commits
Author SHA1 Message Date
Ha Thach eefbe6bda9 Merge pull request #337 from adafruit/support-itsybitsy-dotstar
support itsybitsy dotstar led
2024-07-19 13:06:13 +07:00
hathach ab74be4811 correct itsybitsy dotstar 2024-07-19 13:02:31 +07:00
Ha Thach 488711a9b3 Merge pull request #336 from markbirss/master
Add support for Seeed T1000-E boards
2024-07-12 20:22:34 +07:00
Mark Trevor Birss 91fc6735e9 Update board.h 2024-07-12 12:34:49 +02:00
Mark Trevor Birss 6b62aacdc9 Update board.h 2024-07-12 09:20:53 +02:00
Mark Trevor Birss 4f747e416b Update board.h 2024-07-12 09:02:34 +02:00
Mark Trevor Birss 155dedb048 Add files via upload 2024-07-12 08:55:57 +02:00
Ha Thach 29ca3ebfab Merge pull request #332 from adafruit/bump-feather833-sd
remove feather 833 specific SD_VERSION
2024-06-05 17:45:15 +07:00
hathach 4e700d4904 bump feather 833 SD to 7.3.0 2024-06-05 17:42:13 +07:00
Ha Thach 8473ff6f35 Merge pull request #331 from adafruit/minor-update
Minor update
2024-06-05 17:38:36 +07:00
hathach 5f99d530ff revert fetch-depth 0 2024-06-05 17:34:56 +07:00
hathach c5150ccf02 update PR template 2024-06-05 17:32:51 +07:00
hathach 438a08e0ac change PID of argon,boron,xenon, pca10056 to 0x00DA (allocated by Adafruit), previously these shared with feather nrf52840
change PID of pca10100 to 0x00D8 (allocated by Adafruit)
2024-06-05 17:30:27 +07:00
hathach 2d68ec56e3 default SD version to 7.3.0 for 833, 6.1.1 for 840 and 832
some cmake rename
2024-06-05 17:29:26 +07:00
Ha Thach 836c8dcc76 Merge pull request #329 from adafruit/ci-auto-matrix
use script to set board matrix
2024-05-09 21:40:35 +07:00
hathach 9e25f4ac0a use script to set board matrix 2024-05-09 20:40:04 +07:00
20 changed files with 365 additions and 177 deletions

No files matched your search

-2
View File
@@ -3,10 +3,8 @@
*By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes*
- [ ] Please provide specific title of the PR describing the change
- [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*)
- [ ] If you are adding an new boards, please make sure
- [ ] Provide link to your allocated VID/PID if applicable
- [ ] Add your board to [action ci](/.github/workflows) in correct workflow and alphabet order for release binary
- [ ] `UF2_BOARD_ID` in your board.h follow correct format from [uf2 specs](https://github.com/microsoft/uf2#files-exposed-by-bootloaders)
*This checklist items that are not applicable to your PR can be deleted.*
+18 -54
View File
@@ -9,66 +9,30 @@ on:
- created
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set matrix
id: set-matrix
working-directory: src/boards
run: |
MATRIX_JSON=$(ls -d */ | sed 's/\/$//' | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
build:
needs: set-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
# Adafruit Boards
- 'circuitplayground_nrf52840'
- 'clue_nrf52840'
- 'feather_nrf52832'
- 'feather_nrf52833_express'
- 'feather_nrf52840_express'
- 'feather_nrf52840_sense'
- 'feather_nrf52840_sense_tft'
- 'itsybitsy_nrf52840_express'
- 'metro_nrf52840_express'
- 'ledglasses_nrf52840'
# Other Makers (Alphabetical order)
- 'adm_b_nrf52840_1'
- 'ae_bl652_bo'
- 'aramcon_badge_2019'
- 'aramcon2_badge'
- 'arcade_feather_nrf52840_express'
- 'arduino_nano_33_ble'
- 'bast_ble'
- 'bluemicro_nrf52833'
- 'bluemicro_nrf52840'
- 'challenger_840_ble'
- 'ebyte_e104_bt5032a'
- 'ebyte_e73_tbb'
- 'electronut_labs_papyr'
- 'ikigaisense_vita'
- 'm60_keyboard'
- 'mdk_nrf52840_dongle'
- 'mikoto'
- 'nice_nano'
- 'nrf52840_bboard'
- 'nRF52840_connect_kit'
- 'nrf52840_m2'
- 'ohs2020_badge'
- 'particle_argon'
- 'particle_boron'
- 'particle_xenon'
- 'pca10056'
- 'pca10059'
- 'pca10100'
- 'pitaya_go'
- 'raytac_mdbt50q_db_40'
- 'raytac_mdbt50q_rx'
- 'sparkfun_nrf52840_micromod'
- 'waveshare_nrf52840_eval'
- 'xiao_nrf52840_ble'
- 'xiao_nrf52840_ble_sense'
board: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Checkout Code
uses: actions/checkout@v4
with:
+73 -77
View File
@@ -25,11 +25,11 @@ set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/cmake/toolchain/arm_${TOOLCHA
project(Adafruit_nRF52_Bootloader C ASM)
set(NRFX ${CMAKE_CURRENT_LIST_DIR}/lib/nrfx)
set(SDK11 ${CMAKE_CURRENT_LIST_DIR}/lib/sdk11/components)
set(SDK ${CMAKE_CURRENT_LIST_DIR}/lib/sdk/components)
set(SOFTDEVICE ${CMAKE_CURRENT_LIST_DIR}/lib/softdevice)
set(TUSB ${CMAKE_CURRENT_LIST_DIR}/lib/tinyusb/src)
set(NRFX_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/nrfx)
set(SDK11_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/sdk11/components)
set(SDK_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/sdk/components)
set(SOFTDEVICE_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/softdevice)
set(TINYUSB_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/tinyusb/src)
set(UF2CONV_PY ${CMAKE_CURRENT_LIST_DIR}/lib/uf2/utils/uf2conv.py)
set(UF2_FAMILY_ID_BOOTLOADER 0xd663823c)
@@ -42,10 +42,14 @@ add_executable(bootloader)
# SD_VERSION can be overwritten by board.cmake
if(NOT DEFINED SD_VERSION)
set(SD_VERSION 6.1.1)
if(MCU_VARIANT STREQUAL "nrf52833")
set(SD_VERSION 7.3.0)
else()
set(SD_VERSION 6.1.1)
endif()
endif ()
set(MBR_HEX ${SOFTDEVICE}/mbr/hex/mbr_nrf52_2.4.1_mbr.hex)
set(MBR_HEX ${SOFTDEVICE_DIR}/mbr/hex/mbr_nrf52_2.4.1_mbr.hex)
target_sources(bootloader PUBLIC
# src
@@ -57,31 +61,31 @@ target_sources(bootloader PUBLIC
src/images.c
src/boards/boards.c
# nrfx
${NRFX}/drivers/src/nrfx_power.c
${NRFX}/drivers/src/nrfx_nvmc.c
${NRFX}/mdk/system_${MCU_VARIANT}.c
${NRFX_DIR}/drivers/src/nrfx_power.c
${NRFX_DIR}/drivers/src/nrfx_nvmc.c
${NRFX_DIR}/mdk/system_${MCU_VARIANT}.c
# sdk 11
${SDK11}/libraries/bootloader_dfu/bootloader.c
${SDK11}/libraries/bootloader_dfu/bootloader_settings.c
${SDK11}/libraries/bootloader_dfu/bootloader_util.c
${SDK11}/libraries/bootloader_dfu/dfu_transport_serial.c
${SDK11}/libraries/bootloader_dfu/dfu_transport_ble.c
${SDK11}/libraries/bootloader_dfu/dfu_single_bank.c
${SDK11}/ble/ble_services/ble_dfu/ble_dfu.c
${SDK11}/ble/ble_services/ble_dis/ble_dis.c
${SDK11}/drivers_nrf/pstorage/pstorage_raw.c
${SDK11_DIR}/libraries/bootloader_dfu/bootloader.c
${SDK11_DIR}/libraries/bootloader_dfu/bootloader_settings.c
${SDK11_DIR}/libraries/bootloader_dfu/bootloader_util.c
${SDK11_DIR}/libraries/bootloader_dfu/dfu_transport_serial.c
${SDK11_DIR}/libraries/bootloader_dfu/dfu_transport_ble.c
${SDK11_DIR}/libraries/bootloader_dfu/dfu_single_bank.c
${SDK11_DIR}/ble/ble_services/ble_dfu/ble_dfu.c
${SDK11_DIR}/ble/ble_services/ble_dis/ble_dis.c
${SDK11_DIR}/drivers_nrf/pstorage/pstorage_raw.c
# latest sdk
${SDK}/libraries/timer/app_timer.c
${SDK}/libraries/scheduler/app_scheduler.c
${SDK}/libraries/util/app_error.c
${SDK}/libraries/util/app_util_platform.c
${SDK}/libraries/crc16/crc16.c
${SDK}/libraries/hci/hci_mem_pool.c
${SDK}/libraries/hci/hci_slip.c
${SDK}/libraries/hci/hci_transport.c
${SDK}/libraries/util/nrf_assert.c
${SDK_DIR}/libraries/timer/app_timer.c
${SDK_DIR}/libraries/scheduler/app_scheduler.c
${SDK_DIR}/libraries/util/app_error.c
${SDK_DIR}/libraries/util/app_util_platform.c
${SDK_DIR}/libraries/crc16/crc16.c
${SDK_DIR}/libraries/hci/hci_mem_pool.c
${SDK_DIR}/libraries/hci/hci_slip.c
${SDK_DIR}/libraries/hci/hci_transport.c
${SDK_DIR}/libraries/util/nrf_assert.c
# ASM
${NRFX}/mdk/gcc_startup_${MCU_VARIANT}.S
${NRFX_DIR}/mdk/gcc_startup_${MCU_VARIANT}.S
)
target_include_directories(bootloader PUBLIC
src
@@ -89,31 +93,31 @@ target_include_directories(bootloader PUBLIC
src/boards/${BOARD}
src/cmsis/include
src/usb
${TUSB}
${TINYUSB_DIR}
# nrfx
${NRFX}
${NRFX}/mdk
${NRFX}/hal
${NRFX}/drivers/include
${NRFX}/drivers/src
${NRFX_DIR}
${NRFX_DIR}/mdk
${NRFX_DIR}/hal
${NRFX_DIR}/drivers/include
${NRFX_DIR}/drivers/src
# sdk 11 for cdc/ble dfu
${SDK11}/libraries/bootloader_dfu
${SDK11}/libraries/bootloader_dfu/hci_transport
${SDK11}/drivers_nrf/pstorage
${SDK11}/ble/common
${SDK11}/ble/ble_services/ble_dfu
${SDK11}/ble/ble_services/ble_dis
${SDK11_DIR}/libraries/bootloader_dfu
${SDK11_DIR}/libraries/bootloader_dfu/hci_transport
${SDK11_DIR}/drivers_nrf/pstorage
${SDK11_DIR}/ble/common
${SDK11_DIR}/ble/ble_services/ble_dfu
${SDK11_DIR}/ble/ble_services/ble_dis
# later sdk with updated drivers
${SDK}/libraries/timer
${SDK}/libraries/scheduler
${SDK}/libraries/crc16
${SDK}/libraries/util
${SDK}/libraries/hci/config
${SDK}/libraries/hci
${SDK}/libraries/uart
${SDK}/drivers_nrf/delay
${SDK_DIR}/libraries/timer
${SDK_DIR}/libraries/scheduler
${SDK_DIR}/libraries/crc16
${SDK_DIR}/libraries/util
${SDK_DIR}/libraries/hci/config
${SDK_DIR}/libraries/hci
${SDK_DIR}/libraries/uart
${SDK_DIR}/drivers_nrf/delay
# Softdevice
${SOFTDEVICE}/mbr/headers
${SOFTDEVICE_DIR}/mbr/headers
)
# Debug option
@@ -145,7 +149,7 @@ endif ()
target_link_options(bootloader PUBLIC
"LINKER:--script=${LD_FILE}"
-L${NRFX}/mdk
-L${NRFX_DIR}/mdk
--specs=nosys.specs --specs=nano.specs
)
target_compile_options(bootloader PUBLIC
@@ -181,14 +185,14 @@ endif ()
if (MCU_VARIANT STREQUAL "nrf52")
# UART transport
target_sources(bootloader PUBLIC
${SDK}/libraries/uart/app_uart.c
${SDK}/drivers_nrf/uart/nrf_drv_uart.c
${SDK}/drivers_nrf/common/nrf_drv_common.c
${SDK_DIR}/libraries/uart/app_uart.c
${SDK_DIR}/drivers_nrf/uart/nrf_drv_uart.c
${SDK_DIR}/drivers_nrf/common/nrf_drv_common.c
)
target_include_directories(bootloader PUBLIC
${SDK11}/libraries/util
${SDK}/drivers_nrf/common
${SDK}/drivers_nrf/uart
${SDK11_DIR}/libraries/util
${SDK_DIR}/drivers_nrf/common
${SDK_DIR}/drivers_nrf/uart
)
else ()
# USB transport
@@ -199,13 +203,13 @@ else ()
src/usb/usb_desc.c
src/usb/uf2/ghostfat.c
# TinyUSB
${TUSB}/portable/nordic/nrf5x/dcd_nrf5x.c
${TUSB}/common/tusb_fifo.c
${TUSB}/device/usbd.c
${TUSB}/device/usbd_control.c
${TUSB}/class/cdc/cdc_device.c
${TUSB}/class/msc/msc_device.c
${TUSB}/tusb.c
${TINYUSB_DIR}/portable/nordic/nrf5x/dcd_nrf5x.c
${TINYUSB_DIR}/common/tusb_fifo.c
${TINYUSB_DIR}/device/usbd.c
${TINYUSB_DIR}/device/usbd_control.c
${TINYUSB_DIR}/class/cdc/cdc_device.c
${TINYUSB_DIR}/class/msc/msc_device.c
${TINYUSB_DIR}/tusb.c
)
endif ()
@@ -222,10 +226,6 @@ if (MCU_VARIANT STREQUAL "nrf52")
NRF52832_XXAA
S132
)
target_include_directories(bootloader PUBLIC
${SOFTDEVICE}/s132_nrf52_6.1.1/s132_nrf52_6.1.1_API/include
)
elseif (MCU_VARIANT STREQUAL "nrf52833")
set(SD_NAME s140)
set(DFU_DEV_REV 52833)
@@ -234,10 +234,6 @@ elseif (MCU_VARIANT STREQUAL "nrf52833")
NRF52833_XXAA
S140
)
target_include_directories(bootloader PUBLIC
${SOFTDEVICE}/s140_nrf52_6.1.1/s140_nrf52_6.1.1_API/include
)
elseif (MCU_VARIANT STREQUAL "nrf52840")
set(SD_NAME s140)
set(DFU_DEV_REV 52840)
@@ -247,16 +243,16 @@ elseif (MCU_VARIANT STREQUAL "nrf52840")
NRF52840_XXAA
S140
)
target_include_directories(bootloader PUBLIC
${SOFTDEVICE}/s140_nrf52_6.1.1/s140_nrf52_6.1.1_API/include
)
else ()
message(FATAL_ERROR "MCU_VARIANT ${MCU_VARIANT} is unknown")
endif ()
set(SD_FILENAME ${SD_NAME}_nrf52_${SD_VERSION})
set(SD_HEX ${SOFTDEVICE}/${SD_FILENAME}/${SD_FILENAME}_softdevice.hex)
set(SD_HEX ${SOFTDEVICE_DIR}/${SD_FILENAME}/${SD_FILENAME}_softdevice.hex)
target_include_directories(bootloader PUBLIC
${SOFTDEVICE_DIR}/${SD_FILENAME}/${SD_FILENAME}_API/include
)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(bootloader PUBLIC DFU_APP_DATA_RESERVED=${DFU_APP_DATA_RESERVED})
+16 -17
View File
@@ -10,6 +10,9 @@
# local customization
-include Makefile.user
# Board specific
-include src/boards/$(BOARD)/board.mk
SDK_PATH = lib/sdk/components
SDK11_PATH = lib/sdk11/components
TUSB_PATH = lib/tinyusb/src
@@ -18,7 +21,11 @@ SD_PATH = lib/softdevice/$(SD_FILENAME)
# SD_VERSION can be overwritten by board.mk
ifndef SD_VERSION
SD_VERSION = 6.1.1
ifeq ($(MCU_SUB_VARIANT),nrf52833)
SD_VERSION = 7.3.0
else
SD_VERSION = 6.1.1
endif
endif
SD_FILENAME = $(SD_NAME)_nrf52_$(SD_VERSION)
@@ -42,6 +49,8 @@ OUT_NAME = $(BOARD)_bootloader-$(GIT_VERSION)
# merged file = compiled + sd
MERGED_FILE = $(OUT_NAME)_$(SD_NAME)_$(SD_VERSION)
UF2_FAMILY_ID_BOOTLOADER = 0xd663823c
#------------------------------------------------------------------------------
# Tool Configure
#------------------------------------------------------------------------------
@@ -89,25 +98,10 @@ endif
BMP_PORT ?= $(shell ls -1 /dev/cu.usbmodem????????1 | head -1)
GDB_BMP = $(GDB) -ex 'target extended-remote $(BMP_PORT)' -ex 'monitor swdp_scan' -ex 'attach 1'
#---------------------------------
# Select the board to build
#---------------------------------
# Note: whitespace is not allowed in the filenames... it WILL break this part of the script
BOARD_LIST = $(sort $(filter-out boards.h boards.c,$(notdir $(wildcard src/boards/*))))
ifeq ($(filter $(BOARD),$(BOARD_LIST)),)
$(info You must provide a BOARD parameter with 'BOARD='. Supported boards are:)
$(foreach b,$(BOARD_LIST),$(info - $(b)))
$(error Invalid BOARD specified)
endif
# Build directory
BUILD = _build/build-$(BOARD)
BIN = _bin/$(BOARD)
# Board specific
-include src/boards/$(BOARD)/board.mk
# MCU_SUB_VARIANT can be nrf52 (nrf52832), nrf52833, nrf52840
ifeq ($(MCU_SUB_VARIANT),nrf52)
SD_NAME = s132
@@ -443,7 +437,7 @@ $(BUILD)/$(OUT_NAME)_nosd.hex: $(BUILD)/$(OUT_NAME).hex
# Bootolader self-update uf2
$(BUILD)/update-$(OUT_NAME)_nosd.uf2: $(BUILD)/$(OUT_NAME)_nosd.hex
@echo Create $(notdir $@)
@python3 lib/uf2/utils/uf2conv.py -f 0xd663823c -c -o $@ $^
@python3 lib/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_BOOTLOADER) -c -o $@ $^
# merge bootloader and sd hex together
$(BUILD)/$(MERGED_FILE).hex: $(BUILD)/$(OUT_NAME).hex
@@ -496,6 +490,11 @@ flash-mbr:
@echo Flashing: $(MBR_HEX)
$(call FLASH_NOUICR_CMD,$(MBR_HEX))
# flash using uf2
flash-uf2: $(BUILD)/update-$(OUT_NAME)_nosd.uf2
@echo Flashing: $(notdir $<)
python lib/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_BOOTLOADER) --deploy $<
# dfu with adafruit-nrfutil using CDC interface
dfu-flash: flash-dfu
flash-dfu: $(BUILD)/$(MERGED_FILE).zip
+7 -7
View File
@@ -27,14 +27,14 @@
#include "app_scheduler.h"
#include "app_timer.h"
#ifdef LED_APA102
#ifdef LED_APA102_CLK
#include "nrf_spim.h"
#endif
#define SCHED_MAX_EVENT_DATA_SIZE sizeof(app_timer_event_t) /**< Maximum size of scheduler events. */
#define SCHED_QUEUE_SIZE 30 /**< Maximum number of events in the scheduler queue. */
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102_CLK)
void neopixel_init(void);
void neopixel_write(uint8_t* pixels);
void neopixel_teardown(void);
@@ -86,7 +86,7 @@ void board_init(void) {
#endif
#endif
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102_CLK)
// use neopixel for use enumeration
#ifdef NEOPIXEL_POWER_PIN
nrf_gpio_cfg_output(NEOPIXEL_POWER_PIN);
@@ -147,7 +147,7 @@ void board_teardown(void) {
led_pwm_teardown();
#endif
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102_CLK)
neopixel_teardown();
#endif
@@ -362,7 +362,7 @@ static uint32_t primary_cycle_length;
static uint32_t secondary_cycle_length;
#endif
void led_tick() {
void led_tick(void) {
uint32_t millis = _systick_count;
uint32_t cycle = millis % primary_cycle_length;
@@ -452,7 +452,7 @@ void led_state(uint32_t state) {
final_color = (uint8_t*) &rgb_color;
}
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN) || defined(LED_APA102_CLK)
if (final_color != NULL) {
neopixel_write(final_color);
}
@@ -560,7 +560,7 @@ void neopixel_write(uint8_t* pixels) {
#endif
#ifdef LED_APA102
#ifdef LED_APA102_CLK
#define BYTE_PER_PIXEL 4
// 4 zero bytes are required to initiate update
@@ -1,2 +1 @@
MCU_SUB_VARIANT = nrf52833
SD_VERSION = 7.3.0
@@ -0,0 +1 @@
set(MCU_VARIANT nrf52840)
@@ -34,9 +34,14 @@
#define LED_PRIMARY_PIN _PINNUM(0, 6)
#define LED_STATE_ON 1
#define LED_NEOPIXEL _PINNUM(0, 8)
#define NEOPIXELS_NUMBER 1
#define BOARD_RGB_BRIGHTNESS 0x040404
#define LED_APA102_CLK _PINNUM(1, 9)
#define LED_APA102_DATA _PINNUM(0, 8)
#define LED_APA102_BRIGHTNESS 0x1
#define APA102_NUMBER 1
// For dotstart set to max for colour information is not masked off
#define BOARD_RGB_BRIGHTNESS 0xffffffff
/*------------------------------------------------------------------*/
/* BUTTON
+3 -3
View File
@@ -57,10 +57,10 @@
// USB
//--------------------------------------------------------------------+
// Shared VID/PID with Feather nRF52840, will be disabled for building in the future
// Shared VID/PID with pca10056
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x0029
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "Particle Argon"
#define UF2_VOLUME_LABEL "ARGONBOOT "
+3 -3
View File
@@ -57,10 +57,10 @@
// USB
//--------------------------------------------------------------------+
// Shared VID/PID with Feather nRF52840, will be disabled for building in the future
// Shared VID/PID with pca10056
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x0029
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "Particle Boron"
#define UF2_VOLUME_LABEL "BORONBOOT "
+3 -3
View File
@@ -57,10 +57,10 @@
// USB
//--------------------------------------------------------------------+
// Shared VID/PID with Feather nRF52840, will be disabled for building in the future
// Shared VID/PID with pca10056
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x0029
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "Particle Xenon"
#define UF2_VOLUME_LABEL "XENONBOOT "
+2 -2
View File
@@ -53,8 +53,8 @@
// Shared VID/PID with Feather nRF52840, will be disabled for building in the future
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x0029
#define USB_DESC_CDC_ONLY_PID 0x0029
#define USB_DESC_UF2_PID 0x00DA
#define USB_DESC_CDC_ONLY_PID 0x00DA
#define UF2_PRODUCT_NAME "Nordic nRF52840 DK"
#define UF2_BOARD_ID "nRF52840-pca10056-v1"
+1
View File
@@ -0,0 +1 @@
set(MCU_VARIANT nrf52833)
+4 -3
View File
@@ -50,11 +50,12 @@
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x1915
#define USB_DESC_UF2_PID 0x521F
#define USB_DESC_CDC_ONLY_PID 0x521F
#define USB_DESC_VID 0x239A
#define USB_DESC_UF2_PID 0x00D8
#define USB_DESC_CDC_ONLY_PID 0x00D8
#define UF2_PRODUCT_NAME "Nordic nRF52833 DK"
#define UF2_VOLUME_LABEL "NRF833BOOT"
#define UF2_BOARD_ID "nRF52833-pca10100-v1"
#define UF2_INDEX_URL "https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK"
+1 -2
View File
@@ -1,2 +1 @@
MCU_SUB_VARIANT = nrf52833
SD_VERSION=7.2.0
MCU_SUB_VARIANT = nrf52833
+67
View File
@@ -0,0 +1,67 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Yihui Xiong for Makerdiary
*
* 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.
*/
#ifndef _T1000_E_H
#define _T1000_E_H
#define _PINNUM(port, pin) ((port)*32 + (pin))
/*------------------------------------------------------------------*/
/* LED
*------------------------------------------------------------------*/
#define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(0, 24) // Green
#define LED_STATE_ON 0
/*------------------------------------------------------------------*/
/* BUTTON
*------------------------------------------------------------------*/
#define BUTTONS_NUMBER 2
#define BUTTON_1 _PINNUM(0, 6) // Primary Button
#define BUTTON_2 _PINNUM(0, 18) // unusable: RESET
#define BUTTON_PULL NRF_GPIO_PIN_PULLUP
//--------------------------------------------------------------------+
// BLE OTA
//--------------------------------------------------------------------+
#define BLEDIS_MANUFACTURER "Seeed Studio"
#define BLEDIS_MODEL "T1000-E"
//--------------------------------------------------------------------+
// USB
//--------------------------------------------------------------------+
#define USB_DESC_VID 0x2886
#define USB_DESC_UF2_PID 0x0057
#define USB_DESC_CDC_ONLY_PID 0x0057
//--------------------------------------------------------------------+
// UF2
//--------------------------------------------------------------------+
#define UF2_PRODUCT_NAME "Seeed T1000-E for Meshtastic"
#define UF2_VOLUME_LABEL "T1000-E"
#define UF2_BOARD_ID "nRF52840-T1000-E-v1"
#define UF2_INDEX_URL "https://www.seeedstudio.com/SenseCAP-Card-Tracker-T1000-E-for-Meshtastic-p-5913.html"
#endif /* _T1000_E_H */
+3
View File
@@ -0,0 +1,3 @@
MCU_SUB_VARIANT = nrf52840
SD_VERSION = 7.3.0
+19
View File
@@ -0,0 +1,19 @@
#include "boards.h"
#include "uf2/configkeys.h"
__attribute__((used, section(".bootloaderConfig")))
const uint32_t bootloaderConfig[] =
{
/* CF2 START */
CFG_MAGIC0, CFG_MAGIC1, // magic
5, 100, // used entries, total entries
204, 0x100000, // FLASH_BYTES = 0x100000
205, 0x40000, // RAM_BYTES = 0x40000
208, (USB_DESC_VID << 16) | USB_DESC_UF2_PID, // BOOTLOADER_BOARD_ID = USB VID+PID, used for verification when updating bootloader via uf2
209, 0xada52840, // UF2_FAMILY = 0xada52840
210, 0x20, // PINS_PORT_SIZE = PA_32
0, 0, 0, 0, 0, 0, 0, 0
/* CF2 END */
};
+1
View File
@@ -10,6 +10,7 @@
#define NRFX_PRS_ENABLED 0
// PWM
#define NRFX_PWM_ENABLED 0
#define NRFX_PWM0_ENABLED 0
#define NRFX_PWM1_ENABLED 0
+135
View File
@@ -0,0 +1,135 @@
/*
* Copyright (c) 2017 - 2019, Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NRFX_LOG_H__
#define NRFX_LOG_H__
// THIS IS A TEMPLATE FILE.
// It should be copied to a suitable location within the host environment into
// which nrfx is integrated, and the following macros should be provided with
// appropriate implementations.
// And this comment should be removed from the customized file.
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup nrfx_log nrfx_log.h
* @{
* @ingroup nrfx
*
* @brief This file contains macros that should be implemented according to
* the needs of the host environment into which @em nrfx is integrated.
*/
/**
* @brief Macro for logging a message with the severity level ERROR.
*
* @param format printf-style format string, optionally followed by arguments
* to be formatted and inserted in the resulting string.
*/
#define NRFX_LOG_ERROR(format, ...)
/**
* @brief Macro for logging a message with the severity level WARNING.
*
* @param format printf-style format string, optionally followed by arguments
* to be formatted and inserted in the resulting string.
*/
#define NRFX_LOG_WARNING(format, ...)
/**
* @brief Macro for logging a message with the severity level INFO.
*
* @param format printf-style format string, optionally followed by arguments
* to be formatted and inserted in the resulting string.
*/
#define NRFX_LOG_INFO(format, ...)
/**
* @brief Macro for logging a message with the severity level DEBUG.
*
* @param format printf-style format string, optionally followed by arguments
* to be formatted and inserted in the resulting string.
*/
#define NRFX_LOG_DEBUG(format, ...)
/**
* @brief Macro for logging a memory dump with the severity level ERROR.
*
* @param[in] p_memory Pointer to the memory region to be dumped.
* @param[in] length Length of the memory region in bytes.
*/
#define NRFX_LOG_HEXDUMP_ERROR(p_memory, length)
/**
* @brief Macro for logging a memory dump with the severity level WARNING.
*
* @param[in] p_memory Pointer to the memory region to be dumped.
* @param[in] length Length of the memory region in bytes.
*/
#define NRFX_LOG_HEXDUMP_WARNING(p_memory, length)
/**
* @brief Macro for logging a memory dump with the severity level INFO.
*
* @param[in] p_memory Pointer to the memory region to be dumped.
* @param[in] length Length of the memory region in bytes.
*/
#define NRFX_LOG_HEXDUMP_INFO(p_memory, length)
/**
* @brief Macro for logging a memory dump with the severity level DEBUG.
*
* @param[in] p_memory Pointer to the memory region to be dumped.
* @param[in] length Length of the memory region in bytes.
*/
#define NRFX_LOG_HEXDUMP_DEBUG(p_memory, length)
/**
* @brief Macro for getting the textual representation of a given error code.
*
* @param[in] error_code Error code.
*
* @return String containing the textual representation of the error code.
*/
#define NRFX_LOG_ERROR_STRING_GET(error_code)
/** @} */
#ifdef __cplusplus
}
#endif
#endif // NRFX_LOG_H__