mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
add CFG_EXAMPLE_MSC_READONLY for curiosity
allow family/board to exclude specific example. exclude net_lwip_webserver from curiosity.
This commit is contained in:
parent
b169db3fd6
commit
a05ea0d83b
@ -169,6 +169,7 @@ flash-stlink: $(BUILD)/$(PROJECT).elf
|
|||||||
STM32_Programmer_CLI --connect port=swd --write $< --go
|
STM32_Programmer_CLI --connect port=swd --write $< --go
|
||||||
|
|
||||||
# flash with pyocd
|
# flash with pyocd
|
||||||
|
PYOCD_OPTION ?=
|
||||||
flash-pyocd: $(BUILD)/$(PROJECT).hex
|
flash-pyocd: $(BUILD)/$(PROJECT).hex
|
||||||
pyocd flash -t $(PYOCD_TARGET) $(PYOCD_OPTION) $<
|
pyocd flash -t $(PYOCD_TARGET) $(PYOCD_OPTION) $<
|
||||||
pyocd reset -t $(PYOCD_TARGET)
|
pyocd reset -t $(PYOCD_TARGET)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CFLAGS += -D__SAMD21G17A__
|
CFLAGS += -D__SAMD21G17A__ -DCFG_EXAMPLE_MSC_READONLY
|
||||||
|
|
||||||
# All source paths should be relative to the top level.
|
# All source paths should be relative to the top level.
|
||||||
LD_FILE = $(BOARD_PATH)/samd21g17a_flash.ld
|
LD_FILE = $(BOARD_PATH)/samd21g17a_flash.ld
|
||||||
|
@ -98,21 +98,28 @@ def build_size(example, board):
|
|||||||
def skip_example(example, board):
|
def skip_example(example, board):
|
||||||
ex_dir = 'examples/' + example
|
ex_dir = 'examples/' + example
|
||||||
|
|
||||||
|
# Check if example is skipped by family or board directory
|
||||||
|
skip_file = ".skip." + example.replace('/', '.');
|
||||||
|
if os.path.isfile("hw/bsp/{}/{}".format(family, skip_file)) or os.path.isfile("hw/bsp/{}/boards/{}/{}".format(family, board, skip_file)):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
# Otherwise check if mcu is excluded by example directory
|
||||||
|
|
||||||
# family CMake
|
# family CMake
|
||||||
board_mk = 'hw/bsp/{}/family.cmake'.format(family)
|
family_mk = 'hw/bsp/{}/family.cmake'.format(family)
|
||||||
|
|
||||||
# family.mk
|
# family.mk
|
||||||
if not os.path.exists(board_mk):
|
if not os.path.exists(family_mk):
|
||||||
board_mk = 'hw/bsp/{}/family.mk'.format(family)
|
family_mk = 'hw/bsp/{}/family.mk'.format(family)
|
||||||
|
|
||||||
with open(board_mk) as mk:
|
with open(family_mk) as mk:
|
||||||
mk_contents = mk.read()
|
mk_contents = mk.read()
|
||||||
|
|
||||||
# Skip all OPT_MCU_NONE these are WIP port
|
# Skip all OPT_MCU_NONE these are WIP port
|
||||||
if 'CFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
|
if 'CFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
# Skip if CFG_TUSB_MCU in board.mk to match skip file
|
# Skip if CFG_TUSB_MCU in family.mk to match skip file
|
||||||
for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'):
|
for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'):
|
||||||
mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
|
mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
|
||||||
if mcu_cflag in mk_contents:
|
if mcu_cflag in mk_contents:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user