File tree Expand file tree Collapse file tree 7 files changed +743
-0
lines changed Expand file tree Collapse file tree 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)
9393 esp_set_cpu_freq (ESP_CPU_FREQ_160M );
9494#endif
9595
96+ #ifdef CONFIG_ENABLE_TH25Q16HB_PATCH_0
97+ assert (th25q16hb_apply_patch_0 () == 0 );
98+ #endif
99+
96100 app_main ();
97101
98102 vTaskDelete (NULL );
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ if(BOOTLOADER_BUILD)
55 set (srcs "${srcs} " "port/port.c" )
66 set (priv_requires "bootloader_support" )
77else ()
8+ if (CONFIG_ENABLE_TH25Q16HB_PATCH_0)
9+ list (APPEND srcs "src/patch/th25q16hb.c" )
10+ endif ()
11+
812 set (priv_requires "esp8266" "freertos" "bootloader_support" )
913endif ()
1014
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\"
1515ifdef IS_BOOTLOADER_BUILD
1616COMPONENT_SRCDIRS += port
1717COMPONENT_OBJS += port/port.o
18+ else
19+ ifdef CONFIG_ENABLE_TH25Q16HB_PATCH_0
20+ COMPONENT_SRCDIRS += src/patch
21+ endif
1822endif
Original file line number Diff line number Diff line change @@ -204,6 +204,15 @@ int esp_patition_table_init_data(void *partition_info);
204204int esp_patition_copy_ota1_to_ota0 (const void * partition_info );
205205#endif
206206
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+
207216#ifdef __cplusplus
208217}
209218#endif
Original file line number Diff line number Diff line change 22archive: libspi_flash.a
33entries:
44 spi_flash_raw (noflash)
5+ th25q16hb (noflash)
You can’t perform that action at this time.
0 commit comments