File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,7 @@ VPATH = $(MGOS_VPATH) $(APP_SOURCE_DIRS) $(MGOS_SRC_PATH) \
128
128
$(MGOS_ESP_SRC_PATH)
129
129
IPATH = $(MGOS_IPATH) $(sort $(APP_SOURCE_DIRS) $(APP_INCLUDES)) \
130
130
$(MGOS_ESP8266_PATH)/include $(MGOS_ESP8266_PATH)/include/spiffs \
131
- $(BOOTLOADER_PATH)/rboot $(SDK_PATH)/include/lwip \
132
- $(SDK_PATH) $(SDK_PATH)/include \
131
+ $(BOOTLOADER_PATH)/rboot \
133
132
$(MGOS_ESP_SRC_PATH)
134
133
LPATH = $(SDK_PATH)/lib $(BUILD_DIR)/lwip
135
134
Original file line number Diff line number Diff line change 20
20
#include "esp_missing_includes.h"
21
21
22
22
#include <user_interface.h>
23
+ #include "version.h"
23
24
24
25
#include "common/cs_dbg.h"
25
26
#include "mgos_app.h"
@@ -267,6 +268,7 @@ void user_init(void) {
267
268
system_init_done_cb (sdk_init_done_cb );
268
269
}
269
270
271
+ #if ESP_SDK_VERSION_MAJOR >= 3
270
272
#if !defined(FW_RF_CAL_DATA_ADDR ) || !defined(FW_SYS_PARAMS_ADDR )
271
273
#error FW_RF_CAL_DATA_ADDR or FW_SYS_PARAMS_ADDR are not defined
272
274
#endif
@@ -316,3 +318,19 @@ void user_pre_init(void) {
316
318
__libc_init_array (); /* C++ global contructors. */
317
319
mgos_app_preinit ();
318
320
}
321
+ #else
322
+ #ifndef FW_RF_CAL_DATA_ADDR
323
+ #error FW_RF_CAL_DATA_ADDR is not defined
324
+ #endif
325
+ uint32_t user_rf_cal_sector_set (void ) {
326
+ /* Defined externally. */
327
+ return FW_RF_CAL_DATA_ADDR / 4096 ;
328
+ }
329
+
330
+ void user_rf_pre_init (void ) {
331
+ esp_exception_handler_init ();
332
+ esp_core_dump_init ();
333
+ __libc_init_array (); /* C++ global contructors. */
334
+ mgos_app_preinit ();
335
+ }
336
+ #endif
You can’t perform that action at this time.
0 commit comments