parent
8f9ecace4d
commit
12341118e3
|
@ -67,6 +67,11 @@ jobs:
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
|
|
||||||
|
- name: Install ARM GCC
|
||||||
|
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||||
|
with:
|
||||||
|
release: '11.2-2022.02'
|
||||||
|
|
||||||
- name: Checkout TinyUSB
|
- name: Checkout TinyUSB
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -86,10 +91,10 @@ jobs:
|
||||||
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
|
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
|
||||||
git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB
|
git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB
|
||||||
|
|
||||||
- name: Install ARM GCC
|
- name: Get Dependencies
|
||||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
run: |
|
||||||
with:
|
b=`find hw/bsp/${{ matrix.family }}/boards -depth -maxdepth 1 -type d -name '[^.]?*' -printf %f -quit`
|
||||||
release: '11.2-2022.02'
|
make BOARD={b} get-deps
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||||
|
|
|
@ -50,7 +50,12 @@ Some TinyUSB examples also requires external submodule libraries in ``/lib`` suc
|
||||||
|
|
||||||
$ git submodule update --init lib
|
$ git submodule update --init lib
|
||||||
|
|
||||||
In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. Luckily, it will be fetched if needed when you run the ``make`` to build your board.
|
In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. To download these depencies for your board, run the ``get-dpes`` as follow.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
$ make BOARD=feather_nrf52840_express get-deps
|
||||||
|
|
||||||
|
|
||||||
Some modules will also require a module-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples.
|
Some modules will also require a module-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples.
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,6 @@ else
|
||||||
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
|
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Fetch submodules depended by family
|
|
||||||
fetch_submodule_if_empty = $(if $(wildcard $(TOP)/$1/*),,$(info $(shell git -C $(TOP) submodule update --init $1)))
|
|
||||||
ifdef DEPS_SUBMODULES
|
|
||||||
$(foreach s,$(DEPS_SUBMODULES),$(call fetch_submodule_if_empty,$(s)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
#-------------- Cross Compiler ------------
|
#-------------- Cross Compiler ------------
|
||||||
# Can be set by board, default to ARM GCC
|
# Can be set by board, default to ARM GCC
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
# Set all as default goal
|
# Set all as default goal
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
|
# ---------------- GNU Make Start -----------------------
|
||||||
# ESP32-Sx and RP2040 has its own CMake build system
|
# ESP32-Sx and RP2040 has its own CMake build system
|
||||||
ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040))
|
ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040))
|
||||||
|
|
||||||
|
@ -141,7 +142,23 @@ $(BUILD)/obj/%_asm.o: %.S
|
||||||
@echo AS $(notdir $@)
|
@echo AS $(notdir $@)
|
||||||
@$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $<
|
@$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
endif # GNU Make
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
ifeq ($(CMDEXE),1)
|
||||||
|
rd /S /Q $(subst /,\,$(BUILD))
|
||||||
|
else
|
||||||
|
$(RM) -rf $(BUILD)
|
||||||
|
endif
|
||||||
|
# ---------------- GNU Make End -----------------------
|
||||||
|
|
||||||
|
# get depenecies
|
||||||
|
.PHONY: get-deps
|
||||||
|
get-deps:
|
||||||
|
ifdef DEPS_SUBMODULES
|
||||||
|
git -C $(TOP) submodule update --init $(DEPS_SUBMODULES)
|
||||||
|
endif
|
||||||
|
|
||||||
size: $(BUILD)/$(PROJECT).elf
|
size: $(BUILD)/$(PROJECT).elf
|
||||||
-@echo ''
|
-@echo ''
|
||||||
|
@ -152,14 +169,6 @@ size: $(BUILD)/$(PROJECT).elf
|
||||||
linkermap: $(BUILD)/$(PROJECT).elf
|
linkermap: $(BUILD)/$(PROJECT).elf
|
||||||
@linkermap -v $<.map
|
@linkermap -v $<.map
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
ifeq ($(CMDEXE),1)
|
|
||||||
rd /S /Q $(subst /,\,$(BUILD))
|
|
||||||
else
|
|
||||||
$(RM) -rf $(BUILD)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Flash Targets
|
# Flash Targets
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue