mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-31 07:26:28 +08:00
Merge branch 'feature/factory_test' into 'master'
factory-test: add factory test code and document See merge request sdk/ESP8266_RTOS_SDK!890
This commit is contained in:
@ -82,7 +82,7 @@ CFLAGS += -D__ESP_FILE__='"null"'
|
||||
CXXFLAGS += -D__ESP_FILE__='"null"'
|
||||
endif
|
||||
|
||||
.PHONY: ota ota-clean
|
||||
.PHONY: ota ota-clean app2 app2-flash app2-flash-all
|
||||
|
||||
RAW_BIN := ./build/$(PROJECT_NAME).bin
|
||||
OTA_BIN := ./build/$(PROJECT_NAME).ota.bin
|
||||
@ -97,6 +97,20 @@ __COMBILE_OTA_BIN := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
app2: all
|
||||
ifdef CONFIG_ESPTOOLPY_FLASHSIZE_1MB
|
||||
@rm -f ./build/esp8266/esp8266_out.ld
|
||||
@export CFLAGS= && export CXXFLAGS= && make APP_OFFSET=$(APP2_OFFSET) APP_SIZE=$(APP2_SIZE)
|
||||
endif
|
||||
@echo "To flash all build output, run 'make flash' or:"
|
||||
@echo $(ESPTOOLPY_WRITE_FLASH) $(APP2_OFFSET) $(APP_BIN)
|
||||
|
||||
app2-flash: app2
|
||||
@$(ESPTOOLPY_WRITE_FLASH) $(APP2_OFFSET) $(APP_BIN)
|
||||
|
||||
app2-flash-all: app2
|
||||
@$(ESPTOOLPY_WRITE_FLASH) $(patsubst $(APP_OFFSET),$(APP2_OFFSET),$(ESPTOOL_ALL_FLASH_ARGS))
|
||||
|
||||
$(OTA1_BIN): all_binaries
|
||||
@cp $(RAW_BIN) $(OTA1_BIN)
|
||||
@echo [GEN] $(OTA1_BIN)
|
||||
|
@ -248,22 +248,42 @@ void show_critical_info(void)
|
||||
ets_printf("SWReq:%u\n", SWReq);
|
||||
}
|
||||
|
||||
#ifdef ESP_DPORT_CLOSE_NMI
|
||||
static int s_nmi_is_closed;
|
||||
|
||||
void esp_dport_close_nmi(void)
|
||||
{
|
||||
vPortEnterCritical();
|
||||
REG_WRITE(PERIPHS_DPORT_BASEADDR, REG_READ(PERIPHS_DPORT_BASEADDR) & ~0x1);
|
||||
s_nmi_is_closed = 1;
|
||||
vPortExitCritical();
|
||||
}
|
||||
|
||||
#define ESP_NMI_IS_CLOSED() s_nmi_is_closed
|
||||
#else
|
||||
#define ESP_NMI_IS_CLOSED() 0
|
||||
#endif
|
||||
|
||||
void IRAM_ATTR vPortETSIntrLock(void)
|
||||
{
|
||||
if (NMIIrqIsOn == 0) {
|
||||
vPortEnterCritical();
|
||||
do {
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_TSF0_REACH_INT);
|
||||
} while(REG_READ(INT_ENA_WDEV) != WDEV_TSF0_REACH_INT);
|
||||
if (!ESP_NMI_IS_CLOSED()) {
|
||||
do {
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_TSF0_REACH_INT);
|
||||
} while(REG_READ(INT_ENA_WDEV) != WDEV_TSF0_REACH_INT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IRAM_ATTR vPortETSIntrUnlock(void)
|
||||
{
|
||||
if (NMIIrqIsOn == 0) {
|
||||
extern uint32_t WDEV_INTEREST_EVENT;
|
||||
if (!ESP_NMI_IS_CLOSED()) {
|
||||
extern uint32_t WDEV_INTEREST_EVENT;
|
||||
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_INTEREST_EVENT);
|
||||
REG_WRITE(INT_ENA_WDEV, WDEV_INTEREST_EVENT);
|
||||
}
|
||||
vPortExitCritical();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user