Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ release
.vscode
.DS_Store
.direnv
src/git_info.py
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FROZEN_MANIFEST_DEBUG ?= ../../../../manifests/debug.py
FROZEN_MANIFEST_UNIX ?= ../../../../manifests/unix.py
DEBUG ?= 0
USE_DBOOT ?= 0
GIT_INFO ?= src/git_info.py

$(TARGET_DIR):
mkdir -p $(TARGET_DIR)
Expand All @@ -23,8 +24,13 @@ mpy-cross: $(TARGET_DIR) $(MPY_DIR)/mpy-cross/Makefile
DEBUG=$(DEBUG) && \
cp $(MPY_DIR)/mpy-cross/mpy-cross $(TARGET_DIR)

# embed git metadata for firmware builds
.PHONY: git-info
git-info:
./tools/embed_git_info.py $(GIT_INFO)

# disco board with bitcoin library
disco: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32
disco: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32 git-info
@echo Building firmware
make -C $(MPY_DIR)/ports/stm32 \
BOARD=$(BOARD) \
Expand All @@ -40,7 +46,7 @@ disco: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32
$(TARGET_DIR)/specter-diy.hex

# disco board with bitcoin library
debug: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32
debug: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32 git-info
@echo Building firmware
make -C $(MPY_DIR)/ports/stm32 \
BOARD=$(BOARD) \
Expand All @@ -57,7 +63,7 @@ debug: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/stm32


# unixport (simulator)
unix: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/unix
unix: $(TARGET_DIR) mpy-cross $(MPY_DIR)/ports/unix git-info
@echo Building binary with frozen files
make -C $(MPY_DIR)/ports/unix \
USER_C_MODULES=$(USER_C_MODULES) \
Expand All @@ -83,4 +89,4 @@ clean:
USER_C_MODULES=$(USER_C_MODULES) \
FROZEN_MANIFEST=$(FROZEN_MANIFEST_DISCO) clean

.PHONY: all clean
.PHONY: all clean git-info
6 changes: 4 additions & 2 deletions boot/debug/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ def poweroff(_):
# os.dupterm(None,1)

# inject version to platform module
import platform
platform.version = version
import platform
platform.version = version
platform.bootloader_locked = False
platform.build_type = "debug"

# uncomment to run some custom main:
pyb.main("hardwaretest.py")
8 changes: 5 additions & 3 deletions boot/main/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def poweroff(_):
os.dupterm(None,1)

# inject version and i2c to platform module
import platform
platform.version = version
platform.i2c = i2c
import platform
platform.version = version
platform.i2c = i2c
platform.bootloader_locked = True
platform.build_type = "disco"
4 changes: 3 additions & 1 deletion src/gui/screens/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ def __init__(self, controls, title="Host setttings", note=None, controls_empty_t
switch.on(lv.ANIM.OFF)
self.switches.append(switch)
y = lbl.get_y() + 80
else:
self.next_y = y
if not controls:
label = add_label(controls_empty_text, y, scr=self.page)
self.next_y = label.get_y() + label.get_height() + 40
self.confirm_button.set_event_cb(on_release(self.update))
self.cancel_button.set_event_cb(on_release(lambda: self.set_value(None)))

Expand Down
Loading
Loading