Skip to content

Commit 46ddacd

Browse files
authored
Merge branch 'main' into efr32-doc-fixes
2 parents 40a3139 + 6cf7e45 commit 46ddacd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5869
-5417
lines changed

BUILDING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ This project has a bunch of git submodules. You will need to update them regula
2727

2828
In the root folder of the CircuitPython repository, execute the following:
2929

30-
make fetch-submodules
30+
make fetch-all-submodules
31+
32+
Or, in the ports directory for the particular port you are building, do:
33+
34+
make fetch-port-submodules
3135

3236
### Required Python Packages
3337

Makefile

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
6161

6262
help:
6363
@echo "Please use \`make <target>' where <target> is one of"
64-
@echo " fetch-submodules to fetch dependencies from submodules, run this right after you clone the repo"
6564
@echo " html to make standalone HTML files"
6665
@echo " dirhtml to make HTML files named index.html in directories"
6766
@echo " singlehtml to make a single large HTML file"
@@ -84,6 +83,8 @@ help:
8483
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
8584
@echo " linkcheck to check all external links for integrity"
8685
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
86+
@echo " fetch-all-submodules to fetch submodules for all ports"
87+
@echo " remove-all-submodules remove all submodules, including files and .git/ data"
8788

8889
clean:
8990
rm -rf $(BUILDDIR)/*
@@ -324,25 +325,12 @@ clean-stm:
324325
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express clean
325326

326327

327-
# If available, do blobless partial clones of submodules to save time and space.
328-
# A blobless partial clone lazily fetches data as needed, but has all the metadata available (tags, etc.)
329-
# so it does not have the idiosyncrasies of a shallow clone.
330-
#
331-
# If not available, do a fetch that will fail, and then fix it up with a second fetch.
332-
# (Only works for git servers that allow sha fetches.)
333-
.PHONY: fetch-submodules
334-
fetch-submodules:
335-
git submodule sync
336-
#####################################################################################
337-
# NOTE: Ideally, use git version 2.36.0 or later, to do partial clones of submodules.
338-
# If an older git is used, submodules will be cloned with a shallow clone of depth 1.
339-
# You will see a git usage message first if the git version is too old to do
340-
# clones of submodules.
341-
#####################################################################################
342-
git submodule update --init --filter=blob:none || git submodule update --init -N --depth 1 || git submodule foreach 'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1' || echo 'make fetch-submodules FAILED'
343-
344-
.PHONY: remove-submodules
345-
remove-submodules:
328+
.PHONY: fetch-all-submodules
329+
fetch-all-submodules:
330+
tools/fetch-submodules.sh
331+
332+
.PHONY: remove-all-submodules
333+
remove-all-submodules:
346334
git submodule deinit -f --all
347335
rm -rf .git/modules/*
348336

ports/atmel-samd/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,15 @@ SRC_QSTR_PREPROCESSOR += peripherals/samd/$(PERIPHERALS_CHIP_FAMILY)/clocks.c
363363

364364
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2
365365

366+
ifeq ($(VALID_BOARD),)
367+
$(BUILD)/firmware.elf: invalid-board
368+
else
366369
$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE)
367370
$(STEPECHO) "LINK $@"
368371
$(Q)echo $(OBJ) > $(BUILD)/firmware.objs
369372
$(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--print-memory-usage -Wl,--start-group $(LIBS) -Wl,--end-group
370373
$(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE) $(BUILD)
374+
endif
371375

372376
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
373377
$(STEPECHO) "Create $@"

ports/broadcom/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,14 @@ all: $(BUILD)/firmware.kernel$(SUFFIX).img $(BUILD)/firmware.disk.img.zip
142142
%.o: %.c
143143
$(CC) $(CFLAGS) -c $< -o $@
144144

145+
ifeq ($(VALID_BOARD),)
146+
$(BUILD)/kernel$(SUFFIX).elf: invalid-board
147+
else
145148
$(BUILD)/kernel$(SUFFIX).elf: $(OBJ)
146149
$(STEPECHO) "LINK $@"
147150
$(Q)echo $(OBJ) > $(BUILD)/firmware.objs
148151
$(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group
152+
endif
149153

150154
$(BUILD)/kernel$(SUFFIX).img: $(BUILD)/kernel$(SUFFIX).elf
151155
$(STEPECHO) "Create $@"

ports/cxd56/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,13 @@ $(BUILD)/firmware.elf: $(BUILD)/libmpy.a
183183
$(MKSPK):
184184
$(MAKE) -C mkspk
185185

186+
ifeq ($(VALID_BOARD),)
187+
$(BUILD)/firmware.spk: invalid-board
188+
else
186189
$(BUILD)/firmware.spk: $(BUILD)/firmware.elf $(MKSPK)
187190
$(ECHO) "Creating $@"
188191
$(MKSPK) -c 2 $(BUILD)/firmware.elf nuttx $(BUILD)/firmware.spk
192+
endif
189193

190194
flash: $(BUILD)/firmware.spk
191195
$(ECHO) "Writing $< to the board"

ports/espressif/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp32-camera/libesp32-ca
411411
#$(error $(ESP_IDF_COMPONENTS_EXPANDED))
412412
endif
413413

414+
ifneq ($(VALID_BOARD),)
414415
# BOOTLOADER_OFFSET is determined by chip type, based on the ROM bootloader, and is not changeable.
415416
ifeq ($(IDF_TARGET),esp32)
416417
BOOTLOADER_OFFSET = 0x1000
@@ -423,6 +424,7 @@ BOOTLOADER_OFFSET = 0x1000
423424
else
424425
$(error unknown IDF_TARGET $(IDF_TARGET))
425426
endif
427+
endif
426428

427429
IDF_CMAKE_TARGETS = \
428430
bootloader/bootloader.bin \
@@ -457,8 +459,12 @@ $(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_
457459
$(Q)esptool.py --chip $(IDF_TARGET) elf2image $(FLASH_FLAGS) --elf-sha256-offset 0xb0 -o $@ $^
458460
$(Q)$(PYTHON) tools/build_memory_info.py $< $(BUILD)/esp-idf/sdkconfig $@ $(BUILD)
459461

462+
ifeq ($(VALID_BOARD),)
463+
$(BUILD)/firmware.bin: invalid-board
464+
else
460465
$(BUILD)/firmware.bin: $(BUILD)/circuitpython-firmware.bin | esp-idf-stamp
461466
$(Q)$(PYTHON) ../../tools/join_bins.py $@ $(BOOTLOADER_OFFSET) $(BUILD)/esp-idf/bootloader/bootloader.bin $(PARTITION_TABLE_OFFSET) $(BUILD)/esp-idf/partition_table/partition-table.bin $(FIRMWARE_OFFSET) $(BUILD)/circuitpython-firmware.bin
467+
endif
462468

463469
UF2_FAMILY_ID_esp32s2 = 0xbfdd4eee
464470
UF2_FAMILY_ID_esp32s3 = 0xc47e5767

ports/litex/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,14 @@ SRC_QSTR_PREPROCESSOR +=
133133

134134
all: $(BUILD)/firmware.bin $(BUILD)/firmware.dfu
135135

136+
ifeq ($(VALID_BOARD),)
137+
$(BUILD)/firmware.elf: invalid-board
138+
else
136139
$(BUILD)/firmware.elf: $(OBJ)
137140
$(STEPECHO) "LINK $@"
138141
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group
139142
$(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py $(LD_FILE) $(BUILD)
143+
endif
140144

141145
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
142146
$(STEPECHO) "Create $@"

ports/mimxrt10xx/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,13 @@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_M
200200

201201
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 $(BUILD)/firmware.hex
202202

203+
ifeq ($(VALID_BOARD),)
204+
$(BUILD)/firmware.elf: invalid-board
205+
else
203206
$(BUILD)/firmware.elf: $(OBJ) $(LD_FILES)
204207
$(STEPECHO) "LINK $@"
205208
$(Q)$(CC) -o $@ $(LDFLAGS) $(filter-out %.ld, $^) -Wl,--print-memory-usage -Wl,--start-group $(LIBS) -Wl,--end-group
209+
endif
206210

207211
# -R excludes sections from the output files.
208212
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf

ports/nrf/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,15 @@ UF2_FAMILY_ID_nrf52833 = 0x621E937A
208208

209209
all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 $(BUILD)/firmware.combined.hex
210210

211+
ifeq ($(VALID_BOARD),)
212+
$(BUILD)/firmware.elf: invalid-board
213+
else
211214
$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE)
212215
$(STEPECHO) "LINK $@"
213216
$(Q)echo $(OBJ) > $(BUILD)/firmware.objs
214217
$(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group
215218
$(Q)$(SIZE) $@ | $(PYTHON) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE) $(BUILD)
219+
endif
216220

217221
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
218222
$(STEPECHO) "Create $@"

ports/nrf/boards/pca10100/mpconfigboard.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#define MICROPY_HW_MCU_NAME "nRF52833"
3232

3333
#define MICROPY_HW_LED_STATUS (&pin_P0_13)
34-
#define MICROPY_HW_LED_TX (&pin_P0_14)
35-
#define MICROPY_HW_LED_RX (&pin_P0_15)
3634

3735
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
3836
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (60 * 1024)

0 commit comments

Comments
 (0)