1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-01 03:26:58 +03:00

Merge remote-tracking branch 'remotes/esp8266/esp8266' into esp8266

Conflicts:
	hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_main.cpp
This commit is contained in:
Markus Sattler
2015-06-23 13:08:05 +02:00
25 changed files with 1197 additions and 137 deletions

View File

@ -59,7 +59,7 @@ void preloop_update_frequency() {
extern void (*__init_array_start)(void);
extern void (*__init_array_end)(void);
static cont_t g_cont;
cont_t g_cont __attribute__ ((aligned (16)));
static os_event_t g_loop_queue[LOOP_QUEUE_SIZE];
static uint32_t g_micros_at_task_start;
@ -114,31 +114,17 @@ static void do_global_ctors(void) {
}
void init_done() {
system_set_os_print(1);
do_global_ctors();
esp_schedule();
}
extern "C" {
void user_rf_pre_init() {
}
}
extern "C" {
void user_init(void) {
struct rst_info *rtc_info_ptr = system_get_rst_info();
memcpy((void *) &resetInfo, (void *) rtc_info_ptr, sizeof(resetInfo));
os_printf("Last reset reason: 0x%02X\n", resetInfo.reason);
if(resetInfo.reason == REASON_WDT_RST || resetInfo.reason == REASON_EXCEPTION_RST || resetInfo.reason == REASON_SOFT_WDT_RST) {
if(resetInfo.reason == REASON_EXCEPTION_RST) {
os_printf("Fatal exception (%d):\n", resetInfo.exccause);
}
os_printf("epc1=0x%08x, epc2=0x%08x, epc3=0x%08x, excvaddr=0x%08x, depc=0x%08x\n", resetInfo.epc1, resetInfo.epc2, resetInfo.epc3, resetInfo.excvaddr, resetInfo.depc);
}
uart_div_modify(0, UART_CLK_FREQ / (115200));