File tree 7 files changed +743
-0
lines changed
7 files changed +743
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ static void user_init_entry(void *param)
93
93
esp_set_cpu_freq (ESP_CPU_FREQ_160M );
94
94
#endif
95
95
96
+ #ifdef CONFIG_ENABLE_TH25Q16HB_PATCH_0
97
+ assert (th25q16hb_apply_patch_0 () == 0 );
98
+ #endif
99
+
96
100
app_main ();
97
101
98
102
vTaskDelete (NULL );
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ if(BOOTLOADER_BUILD)
5
5
set (srcs "${srcs} " "port/port.c" )
6
6
set (priv_requires "bootloader_support" )
7
7
else ()
8
+ if (CONFIG_ENABLE_TH25Q16HB_PATCH_0)
9
+ list (APPEND srcs "src/patch/th25q16hb.c" )
10
+ endif ()
11
+
8
12
set (priv_requires "esp8266" "freertos" "bootloader_support" )
9
13
endif ()
10
14
Original file line number Diff line number Diff line change
1
+ menu "SPI Flash"
2
+
3
+ menu "Patch"
4
+ config ENABLE_TH25Q16HB_PATCH_0
5
+ bool "Enable TH25Q16HB Patch 0"
6
+ default n
7
+ help
8
+ WARNING: If you don't use TH25Q16HB, you must not enable this option.
9
+ Although you use TH25Q16HB, you should ask your flash manufacturer
10
+ if your flash need use this patch.
11
+ endmenu
12
+ endmenu
Original file line number Diff line number Diff line change @@ -15,4 +15,8 @@ CFLAGS += -DPARTITION_QUEUE_HEADER=\"sys/queue.h\"
15
15
ifdef IS_BOOTLOADER_BUILD
16
16
COMPONENT_SRCDIRS += port
17
17
COMPONENT_OBJS += port/port.o
18
+ else
19
+ ifdef CONFIG_ENABLE_TH25Q16HB_PATCH_0
20
+ COMPONENT_SRCDIRS += src/patch
21
+ endif
18
22
endif
Original file line number Diff line number Diff line change @@ -204,6 +204,15 @@ int esp_patition_table_init_data(void *partition_info);
204
204
int esp_patition_copy_ota1_to_ota0 (const void * partition_info );
205
205
#endif
206
206
207
+ #ifdef CONFIG_ENABLE_TH25Q16HB_PATCH_0
208
+ /**
209
+ * @brief Apply TH25Q16HB patch 0 to avoid some hardware issues.
210
+ *
211
+ * @return 0 if success or others if failed
212
+ */
213
+ int th25q16hb_apply_patch_0 (void );
214
+ #endif
215
+
207
216
#ifdef __cplusplus
208
217
}
209
218
#endif
Original file line number Diff line number Diff line change 2
2
archive: libspi_flash.a
3
3
entries:
4
4
spi_flash_raw (noflash)
5
+ th25q16hb (noflash)
You can’t perform that action at this time.
0 commit comments