-
Notifications
You must be signed in to change notification settings - Fork 1
tooling: Add make daplink-firmware and make daplink-deploy targets. #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cddeceb
tooling: Add make daplink-firmware and make daplink-deploy targets.
nedseb 58759bd
fix(daplink_bridge): Pin gcc 10.3 and expose venv python for DAPLink …
nedseb d0a5783
ci(daplink_bridge): Attach DAPLink interface firmware to GitHub relea…
nedseb 9e6ac93
ci(daplink_bridge): Cache gcc toolchain and Python venv for DAPLink b…
nedseb 79560dd
fix(daplink_bridge): Address review on portability and venv staleness.
nedseb e8e001f
fix(daplink_bridge): Order venv sentinel after DAPLink clone.
nedseb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,44 @@ | ||
| export PATH := $(CURDIR)/node_modules/.bin:$(PATH) | ||
| PORT ?= /dev/ttyACM0 | ||
|
|
||
| # Firmware build configuration | ||
| BUILD_DIR ?= .build | ||
|
|
||
| # MicroPython firmware build configuration | ||
| MICROPYTHON_REPO ?= https://github.com/steamicc/micropython-steami.git | ||
| MICROPYTHON_BRANCH ?= stm32-steami-rev1d-final | ||
| BOARD ?= STEAM32_WB55RG | ||
| BUILD_DIR ?= .build | ||
| MPY_DIR ?= $(BUILD_DIR)/micropython-steami | ||
| STM32_DIR ?= $(MPY_DIR)/ports/stm32 | ||
|
|
||
| # DAPLink firmware build configuration | ||
| DAPLINK_REPO ?= https://github.com/steamicc/DAPLink.git | ||
| DAPLINK_BRANCH ?= release_letssteam | ||
| DAPLINK_DIR ?= $(BUILD_DIR)/DAPLink | ||
| DAPLINK_TARGET ?= stm32f103xb_steami32_if | ||
| DAPLINK_BUILD_DIR ?= $(DAPLINK_DIR)/projectfiles/make_gcc_arm/$(DAPLINK_TARGET)/build | ||
|
|
||
| # DAPLink requires gcc-arm-none-eabi 10.3-2021.10. System toolchains >= 11.3 | ||
| # produce code that overflows m_text (see DAPLink docs/DEVELOPERS-GUIDE.md and | ||
| # ARMmbed/DAPLink#1043). The toolchain is downloaded once into BUILD_DIR. | ||
| # | ||
| # ARM publishes 10.3-2021.10 binaries for: x86_64 Linux, aarch64 Linux, and | ||
| # Intel macOS. Apple Silicon and Windows are NOT supported by this target — | ||
| # users on those platforms must install the toolchain manually and override | ||
| # DAPLINK_GCC_DIR / DAPLINK_GCC_URL, or build inside the dev container. | ||
| DAPLINK_GCC_VERSION ?= 10.3-2021.10 | ||
| DAPLINK_GCC_DIR ?= $(BUILD_DIR)/gcc-arm-none-eabi-$(DAPLINK_GCC_VERSION) | ||
|
|
||
| DAPLINK_GCC_HOST_OS := $(shell uname -s) | ||
| DAPLINK_GCC_HOST_ARCH := $(shell uname -m) | ||
| ifeq ($(DAPLINK_GCC_HOST_OS),Linux) | ||
| ifeq ($(DAPLINK_GCC_HOST_ARCH),x86_64) | ||
| DAPLINK_GCC_ARCHIVE ?= gcc-arm-none-eabi-$(DAPLINK_GCC_VERSION)-x86_64-linux.tar.bz2 | ||
| else ifeq ($(DAPLINK_GCC_HOST_ARCH),aarch64) | ||
| DAPLINK_GCC_ARCHIVE ?= gcc-arm-none-eabi-$(DAPLINK_GCC_VERSION)-aarch64-linux.tar.bz2 | ||
| endif | ||
| else ifeq ($(DAPLINK_GCC_HOST_OS),Darwin) | ||
| ifeq ($(DAPLINK_GCC_HOST_ARCH),x86_64) | ||
| DAPLINK_GCC_ARCHIVE ?= gcc-arm-none-eabi-$(DAPLINK_GCC_VERSION)-mac.tar.bz2 | ||
| endif | ||
| endif | ||
| DAPLINK_GCC_URL ?= https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(DAPLINK_GCC_VERSION)/$(DAPLINK_GCC_ARCHIVE) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(DAPLINK_DIR)/venv/.installeddepends on$(DAPLINK_DIR)/requirements.txt, but there’s no rule that producesrequirements.txtand it won’t exist until after$(DAPLINK_DIR)is cloned. With parallel builds (make -j) or different prerequisite evaluation order on a fresh checkout, this can fail with “No rule to make target '.../requirements.txt'”. Add an explicit (preferably order-only) dependency on$(DAPLINK_DIR)for the.installedsentinel (and/or for$(DAPLINK_DIR)/requirements.txt) so the clone always happens before venv setup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e8e001f: added an order-only prerequisite
| $(DAPLINK_DIR)on the.installedsentinel so the clone runs before make checksrequirements.txt, even on a fresh checkout or undermake -j.