Skip to content

Commit 3683484

Browse files
committed
fix(systimer): fixed ETM not working with systimer on C61 ECO3
1 parent 138a094 commit 3683484

File tree

16 files changed

+43
-4
lines changed

16 files changed

+43
-4
lines changed

components/esp_rom/esp32c5/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ config ESP_ROM_HAS_HAL_SYSTIMER
4343
bool
4444
default y
4545

46+
config ESP_ROM_SYSTIMER_INIT_PATCH
47+
bool
48+
default y
49+
4650
config ESP_ROM_HAS_HEAP_TLSF
4751
bool
4852
default y

components/esp_rom/esp32c5/esp_rom_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define ESP_ROM_HAS_RVFPLIB (1) // ROM has the rvfplib
1717
#define ESP_ROM_HAS_HAL_WDT (1) // ROM has the implementation of Watchdog HAL driver
1818
#define ESP_ROM_HAS_HAL_SYSTIMER (1) // ROM has the implementation of Systimer HAL driver
19+
#define ESP_ROM_SYSTIMER_INIT_PATCH (1) // ROM version initializes SYSTIMER without ETM
1920
#define ESP_ROM_HAS_HEAP_TLSF (1) // ROM has the implementation of the tlsf and multi-heap library
2021
#define ESP_ROM_TLSF_CHECK_PATCH (1) // ROM does not contain the patch of tlsf_check_pool()
2122
#define ESP_ROM_MULTI_HEAP_WALK_PATCH (1) // ROM does not contain the patch of multi_heap_walk()

components/esp_rom/esp32c6/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ config ESP_ROM_HAS_HAL_SYSTIMER
4343
bool
4444
default y
4545

46+
config ESP_ROM_SYSTIMER_INIT_PATCH
47+
bool
48+
default y
49+
4650
config ESP_ROM_HAS_HEAP_TLSF
4751
bool
4852
default y

components/esp_rom/esp32c6/esp_rom_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define ESP_ROM_HAS_RVFPLIB (1) // ROM has the rvfplib
1717
#define ESP_ROM_HAS_HAL_WDT (1) // ROM has the implementation of Watchdog HAL driver
1818
#define ESP_ROM_HAS_HAL_SYSTIMER (1) // ROM has the implementation of Systimer HAL driver
19+
#define ESP_ROM_SYSTIMER_INIT_PATCH (1) // ROM version initializes SYSTIMER without ETM
1920
#define ESP_ROM_HAS_HEAP_TLSF (1) // ROM has the implementation of the tlsf and multi-heap library
2021
#define ESP_ROM_TLSF_CHECK_PATCH (1) // ROM does not contain the patch of tlsf_check_pool()
2122
#define ESP_ROM_MULTI_HEAP_WALK_PATCH (1) // ROM does not contain the patch of multi_heap_walk()

components/esp_rom/esp32c61/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ config ESP_ROM_HAS_HAL_SYSTIMER
4343
bool
4444
default y
4545

46+
config ESP_ROM_SYSTIMER_INIT_PATCH
47+
bool
48+
default y
49+
4650
config ESP_ROM_HAS_HEAP_TLSF
4751
bool
4852
default y

components/esp_rom/esp32c61/esp_rom_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define ESP_ROM_HAS_RVFPLIB (1) // ROM has the rvfplib
1717
#define ESP_ROM_HAS_HAL_WDT (1) // ROM has the implementation of Watchdog HAL driver
1818
#define ESP_ROM_HAS_HAL_SYSTIMER (1) // ROM has the implementation of Systimer HAL driver
19+
#define ESP_ROM_SYSTIMER_INIT_PATCH (1) // ROM version initializes SYSTIMER without ETM
1920
#define ESP_ROM_HAS_HEAP_TLSF (1) // ROM has the implementation of the tlsf and multi-heap library
2021
#define ESP_ROM_TLSF_CHECK_PATCH (1) // ROM does not contain the patch of tlsf_check_pool()
2122
#define ESP_ROM_MULTI_HEAP_WALK_PATCH (1) // ROM does not contain the patch of multi_heap_walk()

components/esp_rom/esp32c61/ld/esp32c61.rom.systimer.ld

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
***************************************/
1010

1111
/* Functions */
12-
systimer_hal_init = 0x400003d0;
13-
systimer_hal_deinit = 0x400003d4;
12+
13+
/* The following ROM functions are commented out because they're patched in the esp_rom_systimer.c */
14+
/* systimer_hal_init = 0x400003d0; */
15+
/* systimer_hal_deinit = 0x400003d4; */
16+
1417
systimer_hal_set_tick_rate_ops = 0x400003d8;
1518
systimer_hal_get_counter_value = 0x400003dc;
1619
systimer_hal_get_time = 0x400003e0;

components/esp_rom/esp32h2/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ config ESP_ROM_HAS_HAL_SYSTIMER
3535
bool
3636
default y
3737

38+
config ESP_ROM_SYSTIMER_INIT_PATCH
39+
bool
40+
default y
41+
3842
config ESP_ROM_HAS_HEAP_TLSF
3943
bool
4044
default y

components/esp_rom/esp32h2/esp_rom_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define ESP_ROM_GET_CLK_FREQ (1) // Get clk frequency with rom function `ets_get_cpu_frequency`
1515
#define ESP_ROM_HAS_HAL_WDT (1) // ROM has the implementation of Watchdog HAL driver
1616
#define ESP_ROM_HAS_HAL_SYSTIMER (1) // ROM has the implementation of Systimer HAL driver
17+
#define ESP_ROM_SYSTIMER_INIT_PATCH (1) // ROM version initializes SYSTIMER without ETM
1718
#define ESP_ROM_HAS_HEAP_TLSF (1) // ROM has the implementation of the tlsf and multi-heap library
1819
#define ESP_ROM_TLSF_CHECK_PATCH (1) // ROM does not contain the patch of tlsf_check_pool()
1920
#define ESP_ROM_MULTI_HEAP_WALK_PATCH (1) // ROM does not contain the patch of multi_heap_walk()

components/esp_rom/esp32h21/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ config ESP_ROM_HAS_HAL_SYSTIMER
3535
bool
3636
default y
3737

38+
config ESP_ROM_SYSTIMER_INIT_PATCH
39+
bool
40+
default y
41+
3842
config ESP_ROM_HAS_HEAP_TLSF
3943
bool
4044
default y

0 commit comments

Comments
 (0)