From a5bfd9b9b8fd88fae1e29f935d714da081087ce2 Mon Sep 17 00:00:00 2001 From: "Peter D. Gray" Date: Wed, 13 Mar 2024 15:23:33 -0400 Subject: [PATCH] remove version.mk, etc --- stm32/COLDCARD_Q1/file_time.c | 6 ++--- stm32/MK3-Makefile | 45 ----------------------------------- stm32/MK4-Makefile | 4 ++++ stm32/Makefile | 16 ++++++++----- stm32/Q1-Makefile | 9 +++---- stm32/shared.mk | 5 ++-- stm32/version.mk | 5 ---- 7 files changed, 24 insertions(+), 66 deletions(-) delete mode 100644 stm32/MK3-Makefile delete mode 100644 stm32/version.mk diff --git a/stm32/COLDCARD_Q1/file_time.c b/stm32/COLDCARD_Q1/file_time.c index 59c5abfb..1d14d337 100644 --- a/stm32/COLDCARD_Q1/file_time.c +++ b/stm32/COLDCARD_Q1/file_time.c @@ -2,12 +2,12 @@ // // AUTO-generated. // -// built: 2024-03-10 -// version: 1.0.0Q +// built: 2024-03-13 +// version: 1.0.1Q // #include // this overrides ports/stm32/fatfs_port.c uint32_t get_fattime(void) { - return 0x586a0800UL; + return 0x586d0800UL; } diff --git a/stm32/MK3-Makefile b/stm32/MK3-Makefile deleted file mode 100644 index 0c92bdd9..00000000 --- a/stm32/MK3-Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC. -# -# Build micropython for stm32 (an ARM processor). Also handles signing of resulting firmware images. -# -# XXX obsolete, not supported but kept as reference? -# -include version.mk - -BOARD = COLDCARD -HW_MODEL = mk3 -PARENT_MKFILE = MK3-Makefile - -# These values used to make .DFU files. Flash memory locations. -FIRMWARE_BASE = 0x08008000 -BOOTLOADER_BASE = 0x08000000 -FILESYSTEM_BASE = 0x080e0000 - -# This is release of the bootloader that will be built into the release firmware. -BOOTLOADER_VERSION = 2.0.1 -BOOTLOADER_DIR = bootloader - -LATEST_RELEASE = $(shell ls -t1 ../releases/*.dfu | grep -v mk4 | head -1) - -include shared.mk - -# This is fast for Coinkite devs, but no DFU support in the wild. -up: dev.dfu - $(PYTHON_DO_DFU) -u dev.dfu - - -# In another window: -# -# openocd -f openocd-mk3.cfg -# -# Can do: -# - "load" which writes the flash (medium speed, lots of output on st-util) -# - "cont" starts/continues system -# - "br main" sets breakpoints -# - "mon reset" to reset micro -# - and so on -# -debug: - arm-none-eabi-gdb $(BUILD_DIR)/firmware.elf -x gogo-mk3.gdb - -# EOF diff --git a/stm32/MK4-Makefile b/stm32/MK4-Makefile index 223cad40..0504c824 100644 --- a/stm32/MK4-Makefile +++ b/stm32/MK4-Makefile @@ -18,6 +18,10 @@ BOOTLOADER_DIR = mk4-bootloader LATEST_RELEASE = $(shell ls -t1 ../releases/*-mk4-*.dfu | head -1) +# Our version for this release. +# - caution, the bootrom will not accept version < 3.0.0 +VERSION_STRING = 5.3.0Q + # keep near top, because defined default target (all) include shared.mk diff --git a/stm32/Makefile b/stm32/Makefile index 73591568..34c9c669 100644 --- a/stm32/Makefile +++ b/stm32/Makefile @@ -1,20 +1,24 @@ # (c) Copyright 2021 by Coinkite Inc. This file is covered by license found in COPYING-CC. # -# Placeholder for lazy devs. Builds debug version of Q1 by default. For a few specific -# goals, will do it for all supported platforms. +# This file is just a placeholder/short-cut for lazy devs. +# It builds a debug version of Q1 by default. # -# Normally you should use: +# Normally you must use: # # make -f MK4-Makefile # or # make -f Q1-Makefile # -.DEFAULT: +.DEFAULT_GOAL := all +.DEFAULT all: $(MAKE) DEBUG_BUILD=1 -f Q1-Makefile $(MAKECMDGOALS) clean clobber rc1 release repro: - $(MAKE) -f Q1-Makefile $(MAKECMDGOALS) -# $(MAKE) -f MK4-Makefile $(MAKECMDGOALS) + @echo You should do either: + @echo + @echo " make" -f Q1-Makefile $(MAKECMDGOALS) + @echo "-OR-" + @echo " make" -f MK4-Makefile $(MAKECMDGOALS) # EOF diff --git a/stm32/Q1-Makefile b/stm32/Q1-Makefile index 0d3cadc2..7a71c05e 100644 --- a/stm32/Q1-Makefile +++ b/stm32/Q1-Makefile @@ -1,10 +1,7 @@ -# (c) Copyright 2021 by Coinkite Inc. This file is covered by license found in COPYING-CC. -# -# Build micropython for stm32 (an ARM processor). Also handles signing of resulting firmware images. +# (c) Copyright 2023 by Coinkite Inc. This file is covered by license found in COPYING-CC. # # Q1 .. mostly same as Mk4 # -include version.mk BOARD = COLDCARD_Q1 FIRMWARE_BASE = 0x08020000 @@ -18,6 +15,10 @@ BOOTLOADER_DIR = q1-bootloader LATEST_RELEASE = $(shell ls -t1 ../releases/*-q1-*.dfu | head -1) +# Our version for this release. +# - caution, some bootroms (Q < 1.0.3) will not accept version < 3.0.0 (but that never shipped) +VERSION_STRING = 1.0.1Q + # Remove this closer to shipping. #$(warning "Forcing debug build") #DEBUG_BUILD ?= 1 diff --git a/stm32/shared.mk b/stm32/shared.mk index c5e8713a..43f6833a 100644 --- a/stm32/shared.mk +++ b/stm32/shared.mk @@ -2,7 +2,6 @@ # # Shared values and target rules for Mk4 and Q. # -include version.mk # Define these vars to suit board #BOARD = COLDCARD_MK4 @@ -79,9 +78,9 @@ dev: dev.dfu up-dfu: dev.dfu $(PYTHON_DO_DFU) -u dev.dfu -$(BOARD)/file_time.c: make_filetime.py version.mk +$(BOARD)/file_time.c: make_filetime.py *-Makefile ./make_filetime.py $(BOARD)/file_time.c $(VERSION_STRING) - cp $(BOARD)/file_time.c . + #WHY#cp $(BOARD)/file_time.c . # Make a factory release: using key #1 # - when executed in a repro w/o the required key, it defaults to key zero diff --git a/stm32/version.mk b/stm32/version.mk deleted file mode 100644 index b4b8916c..00000000 --- a/stm32/version.mk +++ /dev/null @@ -1,5 +0,0 @@ - -# Our version for this release. -# - caution, some bootroms (Q < 1.0.3, all mk4) will not accept version < 3.0.0 -VERSION_STRING = 1.0.0Q -