Merge branch 'master' into 3.0_hid

This commit is contained in:
Dan Halbert 2018-04-08 09:52:29 -04:00
commit 726d5e52a3
14 changed files with 23 additions and 19 deletions

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

View File

@ -55,7 +55,7 @@ extern uint32_t _ezero;
void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
// Set up the defaults.
_bootloader_dbl_tap = DBL_TAP_MAGIC;
_bootloader_dbl_tap = DBL_TAP_MAGIC_QUICK_BOOT;
_ezero = CIRCUITPY_CANARY_WORD;
if (runmode == RUNMODE_BOOTLOADER) {

View File

@ -31,6 +31,7 @@
// Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
extern uint32_t _bootloader_dbl_tap;

View File

@ -73,6 +73,17 @@ SECTIONS
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
/* Vendor SDK in v2.1.0-7-gb8fd588 started to build these with
-ffunction-sections -fdata-sections, and require routing to
irom via linker:
https://github.com/espressif/ESP8266_NONOS_SDK/commit/b8fd588a33f0319dc135523b51655e97b483b205
*/
*libcrypto.a:(.literal.* .text.*)
*libnet80211.a:(.literal.* .text.*)
*libwpa.a:(.literal.* .text.*)
*libwpa2.a:(.literal.* .text.*)
/* we put some specific text in this section */
*common-hal/*.o*(.literal* .text*)

View File

@ -6,14 +6,12 @@
// see http://esp8266-re.foogod.com/wiki/Random_Number_Generator
#define WDEV_HWRNG ((volatile uint32_t*)0x3ff20e44)
void ets_delay_us();
void ets_intr_lock(void);
void ets_intr_unlock(void);
void ets_isr_mask(uint32_t mask);
void ets_isr_unmask(uint32_t mask);
void ets_isr_attach(int irq_no, void (*handler)(void *), void *arg);
void ets_install_putc1();
void uart_div_modify();
void ets_set_idle_cb(void (*handler)(void *), void *arg);
void ets_timer_arm_new(os_timer_t *tim, uint32_t millis, bool repeat, bool is_milli_timer);
@ -32,12 +30,6 @@ void MD5Init(MD5_CTX *context);
void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
void MD5Final(unsigned char digest[16], MD5_CTX *context);
// These prototypes are for recent SDKs with "malloc tracking"
void *pvPortMalloc(unsigned sz, const char *fname, int line);
void *pvPortZalloc(unsigned sz, const char *fname, int line);
void *pvPortRealloc(void *p, unsigned sz, const char *fname, int line);
void vPortFree(void *p, const char *fname, int line);
uint32_t SPIRead(uint32_t offset, void *buf, uint32_t len);
uint32_t SPIWrite(uint32_t offset, const void *buf, uint32_t len);
uint32_t SPIEraseSector(int sector);

View File

@ -76,7 +76,7 @@ STATIC void mcu_runmode_print(const mp_print_t *print, mp_obj_t self_in, mp_prin
runmode = MP_QSTR_SAFE_MODE;
} else if (MP_OBJ_TO_PTR(self_in) ==
MP_ROM_PTR(&mcu_runmode_bootloader_obj)) {
runmode = MP_QSTR_SAFE_MODE;
runmode = MP_QSTR_BOOTLOADER;
}
mp_printf(print, "%q.%q.%q", MP_QSTR_microcontroller, MP_QSTR_RunMode,
runmode);