diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 115ab7175306..8c617fe33a06 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -252,4 +252,4 @@ Also, holding Shift will add the flash target (`:flash`) to the command. Holdin And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. -?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader. +?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index df8d406988fe..b98ad869869c 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -113,3 +113,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; //Process all other keycodes normally } } + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index e8a3a0654109..133695fb1e7c 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -11,7 +11,7 @@ MCU = cortex-m4 BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/platforms/arm_atsam/flash.mk b/platforms/arm_atsam/flash.mk index f31d4b4d95ae..2076a7106452 100644 --- a/platforms/arm_atsam/flash.mk +++ b/platforms/arm_atsam/flash.mk @@ -3,9 +3,20 @@ # Architecture or project specific options # +MDLOADER_CLI ?= mdloader + +define EXEC_MDLOADER + $(MDLOADER_CLI) --first --download $(BUILD_DIR)/$(TARGET).bin --restart --forceeep=y +endef + +mdloader: bin + $(call EXEC_MDLOADER) + flash: bin ifneq ($(strip $(PROGRAM_CMD)),) $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD) +else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER) else $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)" endif