1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 07:51:19 +01:00

boards/feather-nrf52840*: move common files to bootloader folder

This commit is contained in:
crasbe 2025-03-08 00:55:25 +01:00
parent ea5df2ef7e
commit 250b3bdc81
11 changed files with 58 additions and 35 deletions

View File

@ -0,0 +1,3 @@
MODULE = boards_common_adafruit-nrf52-bootloader
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,4 @@
include $(RIOTBOARD)/common/nrf52/bootloader_nrfutil.dep.mk
# make sure the bootloader module is used for reset to work
USEMODULE += boards_common_adafruit-nrf52-bootloader

View File

@ -0,0 +1,29 @@
PROGRAMMER ?= uf2conv
UF2CONV_FLAGS = -f 0xADA52840
ifeq (uf2conv,$(PROGRAMMER))
# Using uf2conv implies using the UF2 bootloader
#
# It has a static MBR at the first 4k, and a 38k UF2 Bootloader at
# the end, leaving 972k for the application. This overwrites any SoftDevice,
# but that's what the minimal working example does as well.
ROM_OFFSET = 0x1000
ROM_LEN = 0xf3000
# Driver can take some time to get mounted
PREFLASH_DELAY ?= 3
include $(RIOTMAKE)/tools/usb_board_reset.mk
endif
PROGRAMMERS_SUPPORTED += uf2conv
# HACK: replicate dependency resolution in Makefile.dep, only works
# if `USEMODULE` or `DEFAULT_MODULE` is set by the command line or in the
# application Makefile.
ifeq (,$(filter stdio_%,$(DISABLE_MODULE) $(USEMODULE)))
RIOT_TERMINAL ?= jlink
endif
include $(RIOTBOARD)/common/nrf52/Makefile.include

View File

@ -7,10 +7,10 @@
*/
/**
* @ingroup boards_feather-nrf52840
* @ingroup boards_common_adafruit-nrf52-bootloader
* @{
* @file
* @brief Implementation for managing the nrfutil bootloader
* @brief Reset Logic for the Adafruit nRF52 Bootloader
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*

View File

@ -1,3 +1,8 @@
MODULE = board
ifneq (,$(filter boards_common_adafruit-nrf52-bootloader,$(USEMODULE)))
# add the adafruit-nrf52-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/adafruit-nrf52-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -9,6 +9,8 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += ws281x
endif
# include common Adafruit nRF52 Bootloader dependencies
include $(RIOTBOARD)/common/adafruit-nrf52-bootloader/Makefile.dep
# include common nrf52 dependencies
include $(RIOTBOARD)/common/nrf52/bootloader_nrfutil.dep.mk
include $(RIOTBOARD)/common/nrf52/Makefile.dep

View File

@ -1 +0,0 @@
../feather-nrf52840/Makefile.include

View File

@ -0,0 +1,2 @@
# Include the common definitions for the Adafruit nRF52 Bootloader
include $(RIOTBOARD)/common/adafruit-nrf52-bootloader/Makefile.include

View File

@ -1 +0,0 @@
../feather-nrf52840/reset.c

View File

@ -1,3 +1,8 @@
MODULE = board
ifneq (,$(filter boards_common_adafruit-nrf52-bootloader,$(USEMODULE)))
# add the adafruit-nrf52-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/adafruit-nrf52-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -4,6 +4,8 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += ws281x
endif
# include common Adafruit nRF52 Bootloader dependencies
include $(RIOTBOARD)/common/adafruit-nrf52-bootloader/Makefile.dep
# include common nrf52 dependencies
include $(RIOTBOARD)/common/nrf52/bootloader_nrfutil.dep.mk
include $(RIOTBOARD)/common/nrf52/Makefile.dep

View File

@ -1,29 +1,2 @@
PROGRAMMER ?= uf2conv
UF2CONV_FLAGS = -f 0xADA52840
ifeq (uf2conv,$(PROGRAMMER))
# Using uf2conv implies using the UF2 bootloader
#
# It has a static MBR at the first 4k, and a 38k UF2 Bootloader at
# the end, leaving 972k for the application. This overwrites any SoftDevice,
# but that's what the minimal working example does as well.
ROM_OFFSET = 0x1000
ROM_LEN = 0xf3000
# Driver can take some time to get mounted
PREFLASH_DELAY ?= 3
include $(RIOTMAKE)/tools/usb_board_reset.mk
endif
PROGRAMMERS_SUPPORTED += uf2conv
# HACK: replicate dependency resolution in Makefile.dep, only works
# if `USEMODULE` or `DEFAULT_MODULE` is set by the command line or in the
# application Makefile.
ifeq (,$(filter stdio_%,$(DISABLE_MODULE) $(USEMODULE)))
RIOT_TERMINAL ?= jlink
endif
include $(RIOTBOARD)/common/nrf52/Makefile.include
# Include the common definitions for the Adafruit nRF52 Bootloader
include $(RIOTBOARD)/common/adafruit-nrf52-bootloader/Makefile.include