Skip to content

Commit

Permalink
Merge pull request #4306 from Neradoc/fix-reset-to-safe
Browse files Browse the repository at this point in the history
press reset to safe mode on ports where reset reason is not implemented
  • Loading branch information
dhalbert authored Mar 2, 2021
2 parents e4f0e47 + 248acd0 commit 0a58d45
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 73 deletions.
15 changes: 0 additions & 15 deletions ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,5 @@ CIRCUITPY_MSGPACK = 0
CIRCUITPY_VECTORIO = 0
CIRCUITPY_BUSDEVICE = 0

CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0

CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
15 changes: 0 additions & 15 deletions ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,5 @@ CIRCUITPY_MSGPACK = 0
CIRCUITPY_VECTORIO = 0
CIRCUITPY_BUSDEVICE = 0

CFLAGS_INLINE_LIMIT = 60
SUPEROPT_GC = 0

CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
35 changes: 0 additions & 35 deletions ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,5 @@ CIRCUITPY_MSGPACK = 0
CIRCUITPY_VECTORIO = 0
CIRCUITPY_BUSDEVICE = 0

CFLAGS_INLINE_LIMIT = 55
SUPEROPT_GC = 0

CFLAGS_BOARD = --param max-inline-insns-auto=15
ifeq ($(TRANSLATION), ja)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
ifeq ($(TRANSLATION), pl)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
ifeq ($(TRANSLATION), fr)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
ifeq ($(TRANSLATION), pt_BR)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
ifeq ($(TRANSLATION), es)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
8 changes: 1 addition & 7 deletions ports/atmel-samd/boards/ugame10/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,4 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/ugame10

CIRCUITPY_DISPLAY_FONT = $(TOP)/ports/atmel-samd/boards/ugame10/brutalist-6.bdf

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 45
else
CFLAGS_INLINE_LIMIT = 70
endif
SUPEROPT_GC = 0
3 changes: 2 additions & 1 deletion supervisor/shared/safe_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ safe_mode_t wait_for_safe_mode_reset(void) {

const mcu_reset_reason_t reset_reason = common_hal_mcu_processor_get_reset_reason();
if (reset_reason != RESET_REASON_POWER_ON &&
reset_reason != RESET_REASON_RESET_PIN) {
reset_reason != RESET_REASON_RESET_PIN &&
reset_reason != RESET_REASON_UNKNOWN) {
return NO_SAFE_MODE;
}
port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8));
Expand Down

0 comments on commit 0a58d45

Please sign in to comment.