Skip to content

Commit a314256

Browse files
marcoramirezcastrohathach
authored andcommitted
-Added README Instructions for:
--Compiling Bootloader --Compiling example apps --Flashing Bootloader --Flashing Example Apps -Added feature to export examples application log for: --building --celaning -Added .gitignore file for excluding log files -Fixed RADME typo - Change MaximSDK instances to MSDK - Added robust information about enviroment builds and optional MSDK usage - Fixed typos - Upgraded the Navigation menu - Fixed navigation menu (missing windows reqs) - Fixed the Navigation menu (added windows req link) - Updated enviroment requirements on README - Added MacOS and Linux requirements - Added Dependencies guide for max32 - Removed default MAXIM_PATH on port.mk
1 parent d1e0234 commit a314256

File tree

16 files changed

+1767
-32
lines changed

16 files changed

+1767
-32
lines changed

ports/max32650/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore build logs
2+
logs/
3+
*.log

ports/max32650/Makefile

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,82 @@ include ../make.mk
55
include port.mk
66
include ../rules.mk
77

8-
#------------------------------------------
8+
################################################################################
9+
# Optional Save Log Support
10+
################################################################################
11+
ifeq ($(SAVELOG),1)
12+
TIMESTAMP := $(shell date +%Y%m%d_%H%M%S)
13+
LOG_SUFFIX = _$(TIMESTAMP).log
14+
endif
15+
16+
################################################################################
917
# Self-update
10-
#------------------------------------------
11-
self-update: $(BUILD)/$(OUTNAME).bin
12-
$(PYTHON3) $(TOP)/lib/uf2/utils/uf2conv.py --carray $^ -o apps/self_update/_build/bootloader_bin.c
18+
################################################################################
19+
self-update:
20+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/self_update/logs/self-update
21+
@echo "Building self-update application..."
22+
ifeq ($(SAVELOG),1)
23+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/self_update uf2 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/self_update/logs/self-update/self-update$(LOG_SUFFIX)
24+
else
1325
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/self_update uf2
26+
endif
1427

1528
self-update-clean:
29+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/self_update/logs/self-update-clean
30+
@echo "Cleaning self-update application..."
31+
ifeq ($(SAVELOG),1)
32+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/self_update clean 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/self_update/logs/self-update-clean/self-update-clean$(LOG_SUFFIX)
33+
else
1634
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/self_update clean
35+
endif
1736

18-
#---------- Erase Firmware ----------
19-
# Compile apps/erase_firmware/erase_firmware.c
37+
################################################################################
38+
# Erase Firmware
39+
################################################################################
2040
erase-firmware:
41+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/erase_firmware/logs/erase-firmware
42+
@echo "Building erase-firmware application..."
43+
ifeq ($(SAVELOG),1)
44+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/erase_firmware uf2 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/erase_firmware/logs/erase-firmware/erase-firmware$(LOG_SUFFIX)
45+
else
2146
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/erase_firmware uf2
47+
endif
2248

2349
erase-firmware-clean:
50+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/erase_firmware/logs/erase-firmware-clean
51+
@echo "Cleaning erase-firmware application..."
52+
ifeq ($(SAVELOG),1)
53+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/erase_firmware clean 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/erase_firmware/logs/erase-firmware-clean/erase-firmware-clean$(LOG_SUFFIX)
54+
else
2455
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/erase_firmware clean
56+
endif
2557

26-
#---------- Blinky ----------
27-
# Compile apps/blinky/blinky.c
58+
################################################################################
59+
# Blinky
60+
################################################################################
2861
blinky:
62+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/blinky/logs/blinky
63+
@echo "Building blinky application..."
64+
ifeq ($(SAVELOG),1)
65+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/blinky uf2 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/blinky/logs/blinky/blinky$(LOG_SUFFIX)
66+
else
2967
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/blinky uf2
68+
endif
3069

3170
blinky-clean:
71+
@mkdir -p $(TOP)/$(PORT_DIR)/apps/blinky/logs/blinky-clean
72+
@echo "Cleaning blinky application..."
73+
ifeq ($(SAVELOG),1)
74+
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/blinky clean 2>&1 | tee $(TOP)/$(PORT_DIR)/apps/blinky/logs/blinky-clean/blinky-clean$(LOG_SUFFIX)
75+
else
3276
$(MAKE) -C $(TOP)/$(PORT_DIR)/apps/blinky clean
77+
endif
78+
79+
################################################################################
80+
# Clean Logs
81+
################################################################################
82+
clean-logs:
83+
@echo "Cleaning all log files..."
84+
@rm -rf $(TOP)/$(PORT_DIR)/apps/self_update/logs
85+
@rm -rf $(TOP)/$(PORT_DIR)/apps/erase_firmware/logs
86+
@rm -rf $(TOP)/$(PORT_DIR)/apps/blinky/logs

0 commit comments

Comments
 (0)