tools: add GDB v11.1 as a tool

GDB now is standalone tool separated from toolchain due to frequent updates.

Added installation tests for the new tool.

Tests are changed because they were wrong, see explanation:
esp32 objdump:
    40084290 <esp_crosscore_int_send_yield>:
    ......
    /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
    4008429c:    000090            retw

With previous GDB backtrace was:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144

This commit fixes the backtrace with the right line number:
    #0  0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145

Other tests changes have the same cause of fixing.

Closes https://github.com/espressif/esp-idf/issues/6334
This commit is contained in:
Alexey Lapshin 2022-02-10 15:25:58 +07:00 committed by Anton Maklakov
parent c3bac72cbb
commit b5bafae596
8 changed files with 248 additions and 41 deletions

View File

@ -66,13 +66,13 @@ a15 0x0 0
======================== THREADS INFO =========================
Id Target Id Frame
* 1 process 1073451064 0x400d4c01 in recur_func () at ../main/test_core_dump.c:70
2 process 1073443948 0x400e7b66 in esp_pm_impl_waiti () at ../../../hal/esp32/include/hal/cpu_ll.h:183
3 process 1073445836 0x400e7b66 in esp_pm_impl_waiti () at ../../../hal/esp32/include/hal/cpu_ll.h:183
4 process 1073453464 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
5 process 1073448664 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
6 process 1073413412 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
2 process 1073443948 0x400e7b66 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
3 process 1073445836 0x400e7b66 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
4 process 1073453464 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
5 process 1073448664 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
6 process 1073413412 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
7 process 1073437612 0x4000bff0 in ?? ()
8 process 1073433164 0x4008429c in esp_crosscore_int_send_yield (core_id=1) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
8 process 1073433164 0x4008429c in esp_crosscore_int_send_yield (core_id=1) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
==================== THREAD 1 (TCB: 0x3ffb9038, name: 'unaligned_ptr_t') =====================
#0 0x400d4c01 in recur_func () at ../main/test_core_dump.c:70
@ -82,31 +82,31 @@ a15 0x0 0
#4 0x40087cfc in vPortTaskWrapper (pxCode=0x400d4c0c <unaligned_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 2 (TCB: 0x3ffb746c, name: 'IDLE') =====================
#0 0x400e7b66 in esp_pm_impl_waiti () at ../../../hal/esp32/include/hal/cpu_ll.h:183
#0 0x400e7b66 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x400d1a42 in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
#2 0x40086351 in prvIdleTask (pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/tasks.c:3959
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x40086348 <prvIdleTask>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 3 (TCB: 0x3ffb7bcc, name: 'IDLE') =====================
#0 0x400e7b66 in esp_pm_impl_waiti () at ../../../hal/esp32/include/hal/cpu_ll.h:183
#0 0x400e7b66 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x400d1a42 in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
#2 0x40086351 in prvIdleTask (pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/tasks.c:3959
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x40086348 <prvIdleTask>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 4 (TCB: 0x3ffb9998, name: 'failed_assert_t') =====================
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x400865aa in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32/include/hal/cpu_ll.h:39
#2 0x400d4adf in failed_assert_task (pvParameter=0x0) at ../main/test_core_dump.c:89
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x400d4ad0 <failed_assert_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 5 (TCB: 0x3ffb86d8, name: 'bad_ptr_task') =====================
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x400865aa in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32/include/hal/cpu_ll.h:39
#2 0x400d4b9f in bad_ptr_task (pvParameter=0x0) at ../main/test_core_dump.c:43
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x400d4b90 <bad_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 6 (TCB: 0x3ffafd24, name: 'ipc0') =====================
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x40085e55 in xQueueSemaphoreTake (xQueue=0x3ffafccc, xTicksToWait=<optimized out>) at ../../../hal/esp32/include/hal/cpu_ll.h:39
#2 0x400826f3 in ipc_task (arg=0x0) at /builds/espressif/esp-idf/components/esp_ipc/src/esp_ipc.c:59
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x400826c8 <ipc_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
@ -119,7 +119,7 @@ a15 0x0 0
#4 0x40087cfc in vPortTaskWrapper (pxCode=0x400d4570 <timer_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 8 (TCB: 0x3ffb4a4c, name: 'ipc1') =====================
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=1) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x4008429c in esp_crosscore_int_send_yield (core_id=1) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x40085e55 in xQueueSemaphoreTake (xQueue=0x3ffaff30, xTicksToWait=<optimized out>) at ../../../hal/esp32/include/hal/cpu_ll.h:39
#2 0x400826f3 in ipc_task (arg=0x1) at /builds/espressif/esp-idf/components/esp_ipc/src/esp_ipc.c:59
#3 0x40087cfc in vPortTaskWrapper (pxCode=0x400826c8 <ipc_task>, pvParameters=0x1) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159

View File

@ -43,46 +43,46 @@ pc 0x4200583c 0x4200583c <recur_func+88>
#1 0x4200581a in recur_func () at ../main/test_core_dump.c:63
#2 0x4200581a in recur_func () at ../main/test_core_dump.c:63
#3 0x42005874 in unaligned_ptr_task (pvParameter=<optimized out>) at ../main/test_core_dump.c:80
#4 0x40385f2a in vPortEnterCritical () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:129
#4 0x40385f2a in vPortEnterCritical () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:131
#5 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
======================== THREADS INFO =========================
Id Target Id Frame
* 1 process 1070144160 0x4200583c in recur_func () at ../main/test_core_dump.c:70
2 process 1070141676 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
3 process 1070138176 0x4200c022 in esp_pm_impl_waiti () at ../../../hal/esp32c3/include/hal/cpu_ll.h:168
4 process 1070146556 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
5 process 1070131784 0x40385eb4 in vPortClearInterruptMask (mask=1) at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:177
2 process 1070141676 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
3 process 1070138176 0x4200c022 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
4 process 1070146556 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
5 process 1070131784 0x40385eb4 in vPortClearInterruptMask (mask=1) at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:178
==================== THREAD 1 (TCB: 0x3fc91aa0, name: 'unaligned_ptr_t') =====================
#0 0x4200583c in recur_func () at ../main/test_core_dump.c:70
#1 0x4200581a in recur_func () at ../main/test_core_dump.c:63
#2 0x4200581a in recur_func () at ../main/test_core_dump.c:63
#3 0x42005874 in unaligned_ptr_task (pvParameter=<optimized out>) at ../main/test_core_dump.c:80
#4 0x40385f2a in vPortEnterCritical () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:129
#4 0x40385f2a in vPortEnterCritical () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:131
#5 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
==================== THREAD 2 (TCB: 0x3fc910ec, name: 'bad_ptr_task') =====================
#0 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x4038601e in vPortYield () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:316
#2 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
==================== THREAD 3 (TCB: 0x3fc90340, name: 'IDLE') =====================
#0 0x4200c022 in esp_pm_impl_waiti () at ../../../hal/esp32c3/include/hal/cpu_ll.h:168
#0 0x4200c022 in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x4200b476 in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
Backtrace stopped: Cannot access memory at address 0xa5a5a5b1
==================== THREAD 4 (TCB: 0x3fc923fc, name: 'failed_assert_t') =====================
#0 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:144
#0 0x40382dba in esp_crosscore_int_send_yield (core_id=core_id@entry=0) at /builds/espressif/esp-idf/components/esp_system/crosscore_int.c:145
#1 0x4038601e in vPortYield () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:316
#2 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
==================== THREAD 5 (TCB: 0x3fc8ea48, name: 'esp_timer') =====================
#0 0x40385eb4 in vPortClearInterruptMask (mask=1) at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:177
#0 0x40385eb4 in vPortClearInterruptMask (mask=1) at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:178
#1 0x40385ede in vPortExitCritical () at /builds/espressif/esp-idf/components/freertos/port/riscv/port.c:138
Backtrace stopped: Cannot access memory at address 0xa5a5a5b1

View File

@ -66,9 +66,9 @@ a15 0x0 0
======================== THREADS INFO =========================
Id Target Id Frame
* 1 process 1073493400 0x40085825 in recur_func () at ../main/test_core_dump.c:70
2 process 1073490916 0x40027c8f in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s2/include/hal/cpu_ll.h:33
3 process 1073487360 0x400958be in esp_pm_impl_waiti () at ../../../hal/esp32s2/include/hal/cpu_ll.h:202
4 process 1073495796 0x40027c8f in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s2/include/hal/cpu_ll.h:33
2 process 1073490916 0x40027c8f in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
3 process 1073487360 0x400958be in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
4 process 1073495796 0x40027c8f in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
5 process 1073347944 0x4001a8d4 in ?? ()
==================== THREAD 1 (TCB: 0x3ffc3598, name: 'unaligned_ptr_t') =====================
@ -79,18 +79,18 @@ a15 0x0 0
#4 0x40028ea8 in vPortTaskWrapper (pxCode=0x40085830 <unaligned_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 2 (TCB: 0x3ffc2be4, name: 'bad_ptr_task') =====================
#0 0x40027c8f in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s2/include/hal/cpu_ll.h:33
#0 0x40027c8f in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
#1 0x400857c3 in bad_ptr_task (pvParameter=0x0) at ../main/test_core_dump.c:43
#2 0x40028ea8 in vPortTaskWrapper (pxCode=0x400857b4 <bad_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 3 (TCB: 0x3ffc1e00, name: 'IDLE') =====================
#0 0x400958be in esp_pm_impl_waiti () at ../../../hal/esp32s2/include/hal/cpu_ll.h:202
#0 0x400958be in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x4008a0fa in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
#2 0x40027b99 in prvIdleTask (pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/tasks.c:3959
#3 0x40028ea8 in vPortTaskWrapper (pxCode=0x40027b90 <prvIdleTask>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 4 (TCB: 0x3ffc3ef4, name: 'failed_assert_t') =====================
#0 0x40027c8f in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s2/include/hal/cpu_ll.h:33
#0 0x40027c8f in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
#1 0x40085703 in failed_assert_task (pvParameter=0x0) at ../main/test_core_dump.c:89
#2 0x40028ea8 in vPortTaskWrapper (pxCode=0x400856f4 <failed_assert_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159

View File

@ -66,10 +66,10 @@ a15 0x1 1
======================== THREADS INFO =========================
Id Target Id Frame
* 1 process 1070472340 0x42004ecd in recur_func () at ../main/test_core_dump.c:70
2 process 1070549672 0x42018d5a in esp_pm_impl_waiti () at ../../../hal/esp32s3/include/hal/cpu_ll.h:182
3 process 1070551560 0x42018d5a in esp_pm_impl_waiti () at ../../../hal/esp32s3/include/hal/cpu_ll.h:182
4 process 1070474740 0x4037a26a in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s3/include/hal/cpu_ll.h:38
5 process 1070469940 0x4037a26a in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s3/include/hal/cpu_ll.h:38
2 process 1070549672 0x42018d5a in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
3 process 1070551560 0x42018d5a in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
4 process 1070474740 0x4037a26a in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
5 process 1070469940 0x4037a26a in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
6 process 1070537184 0x40379b0d in xQueueSemaphoreTake (xQueue=0x3fcf1584, xTicksToWait=<optimized out>) at ../../../hal/esp32s3/include/hal/cpu_ll.h:38
7 process 1070543272 0x400559e0 in ?? ()
8 process 1070538824 xQueueSemaphoreTake (xQueue=0x3fcf1bec, xTicksToWait=<optimized out>) at /builds/espressif/esp-idf/components/freertos/queue.c:1563
@ -82,24 +82,24 @@ a15 0x1 1
#4 0x4037b9bc in vPortTaskWrapper (pxCode=0x42004ed8 <unaligned_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 2 (TCB: 0x3fcf4aa8, name: 'IDLE') =====================
#0 0x42018d5a in esp_pm_impl_waiti () at ../../../hal/esp32s3/include/hal/cpu_ll.h:182
#0 0x42018d5a in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x42001cfe in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
#2 0x4037a010 in prvIdleTask (pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/tasks.c:3959
#3 0x4037b9bc in vPortTaskWrapper (pxCode=0x4037a004 <prvIdleTask>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 3 (TCB: 0x3fcf5208, name: 'IDLE') =====================
#0 0x42018d5a in esp_pm_impl_waiti () at ../../../hal/esp32s3/include/hal/cpu_ll.h:182
#0 0x42018d5a in esp_pm_impl_waiti () at /builds/espressif/esp-idf/components/esp_pm/pm_impl.c:840
#1 0x42001cfe in esp_vApplicationIdleHook () at /builds/espressif/esp-idf/components/esp_system/freertos_hooks.c:63
#2 0x4037a010 in prvIdleTask (pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/tasks.c:3959
#3 0x4037b9bc in vPortTaskWrapper (pxCode=0x4037a004 <prvIdleTask>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 4 (TCB: 0x3fce25f4, name: 'failed_assert_t') =====================
#0 0x4037a26a in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s3/include/hal/cpu_ll.h:38
#0 0x4037a26a in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
#1 0x42004d9e in failed_assert_task (pvParameter=0x0) at ../main/test_core_dump.c:89
#2 0x4037b9bc in vPortTaskWrapper (pxCode=0x42004d8c <failed_assert_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159
==================== THREAD 5 (TCB: 0x3fce1334, name: 'bad_ptr_task') =====================
#0 0x4037a26a in vTaskDelay (xTicksToDelay=100) at ../../../hal/esp32s3/include/hal/cpu_ll.h:38
#0 0x4037a26a in vTaskDelay (xTicksToDelay=100) at /builds/espressif/esp-idf/components/freertos/tasks.c:1593
#1 0x42004e6a in bad_ptr_task (pvParameter=0x0) at ../main/test_core_dump.c:43
#2 0x4037b9bc in vPortTaskWrapper (pxCode=0x42004e58 <bad_ptr_task>, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/port/xtensa/port.c:159

View File

@ -2,6 +2,16 @@
.. Comments "tool-NAME-notes" act as delimiters.
.. tool-xtensa-esp-elf-gdb-notes
---
.. tool-riscv32-esp-elf-gdb-notes
---
.. tool-xtensa-esp32-elf-notes

View File

@ -4,6 +4,16 @@
.. before processing :start-after: and :end-before: options.
.. tool-xtensa-esp-elf-gdb-notes
---
.. tool-riscv32-esp-elf-gdb-notes
---
.. tool-xtensa-esp32-elf-notes

View File

@ -46,6 +46,8 @@ RISCV_ELF = 'riscv32-esp-elf'
XTENSA_ESP32_ELF = 'xtensa-esp32-elf'
XTENSA_ESP32S2_ELF = 'xtensa-esp32s2-elf'
XTENSA_ESP32S3_ELF = 'xtensa-esp32s3-elf'
XTENSA_ESP_GDB = 'xtensa-esp-elf-gdb'
RISCV_ESP_GDB = 'riscv32-esp-elf-gdb'
def get_version_dict():
@ -70,6 +72,8 @@ RISCV_ELF_VERSION = version_dict[RISCV_ELF]
XTENSA_ESP32_ELF_VERSION = version_dict[XTENSA_ESP32_ELF]
XTENSA_ESP32S2_ELF_VERSION = version_dict[XTENSA_ESP32S2_ELF]
XTENSA_ESP32S3_ELF_VERSION = version_dict[XTENSA_ESP32S3_ELF]
XTENSA_ESP_GDB_VERSION = version_dict[XTENSA_ESP_GDB]
RISCV_ESP_GDB_VERSION = version_dict[RISCV_ESP_GDB]
class TestUsage(unittest.TestCase):
@ -145,7 +149,7 @@ class TestUsage(unittest.TestCase):
self.assertIn('* %s:' % XTENSA_ESP32S3_ELF, output)
self.assertIn('- %s (recommended)' % XTENSA_ESP32S3_ELF_VERSION, output)
required_tools_installed = 7
required_tools_installed = 9
output = self.run_idf_tools_with_action(['install'])
self.assert_tool_installed(output, OPENOCD, OPENOCD_VERSION)
self.assert_tool_installed(output, RISCV_ELF, RISCV_ELF_VERSION)
@ -154,6 +158,8 @@ class TestUsage(unittest.TestCase):
self.assert_tool_installed(output, XTENSA_ESP32S3_ELF, XTENSA_ESP32S3_ELF_VERSION)
self.assert_tool_installed(output, ESP32ULP, ESP32ULP_VERSION, ESP32ULP_ARCHIVE)
self.assert_tool_installed(output, ESP32S2ULP, ESP32S2ULP_VERSION, ESP32S2ULP_ARCHIVE)
self.assert_tool_installed(output, XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION)
self.assert_tool_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION)
self.assertIn('Destination: {}'.format(os.path.join(self.temp_tools_dir, 'dist')), output)
self.assertEqual(required_tools_installed, output.count('Done'))
@ -165,6 +171,8 @@ class TestUsage(unittest.TestCase):
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32S2_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32S3_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP_GDB_VERSION, output)
self.assertIn('version installed in tools directory: ' + RISCV_ESP_GDB_VERSION, output)
output = self.run_idf_tools_with_action(['export'])
self.assertIn('%s/tools/esp32ulp-elf/%s/esp32ulp-elf-binutils/bin' %
@ -181,17 +189,23 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, XTENSA_ESP32S2_ELF_VERSION), output)
self.assertIn('%s/tools/xtensa-esp32s3-elf/%s/xtensa-esp32s3-elf/bin' %
(self.temp_tools_dir, XTENSA_ESP32S3_ELF_VERSION), output)
self.assertIn('%s/tools/xtensa-esp-elf-gdb/%s/xtensa-esp-elf-gdb/bin' %
(self.temp_tools_dir, XTENSA_ESP_GDB_VERSION), output)
self.assertIn('%s/tools/riscv32-esp-elf-gdb/%s/riscv32-esp-elf-gdb/bin' %
(self.temp_tools_dir, RISCV_ESP_GDB_VERSION), output)
def test_tools_for_esp32(self):
required_tools_installed = 3
required_tools_installed = 4
output = self.run_idf_tools_with_action(['install', '--targets=esp32'])
self.assert_tool_installed(output, XTENSA_ESP32_ELF, XTENSA_ESP32_ELF_VERSION)
self.assert_tool_installed(output, OPENOCD, OPENOCD_VERSION)
self.assert_tool_installed(output, ESP32ULP, ESP32ULP_VERSION, ESP32ULP_ARCHIVE)
self.assert_tool_installed(output, XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, RISCV_ELF, RISCV_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S2_ELF, XTENSA_ESP32S2_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S3_ELF, XTENSA_ESP32S3_ELF_VERSION)
self.assert_tool_not_installed(output, ESP32S2ULP, ESP32S2ULP_VERSION, ESP32S2ULP_ARCHIVE)
self.assert_tool_not_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION)
self.assertIn('Destination: {}'.format(os.path.join(self.temp_tools_dir, 'dist')), output)
self.assertEqual(required_tools_installed, output.count('Done'))
@ -199,6 +213,7 @@ class TestUsage(unittest.TestCase):
self.assertIn('version installed in tools directory: ' + ESP32ULP_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + OPENOCD_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP_GDB_VERSION, output)
output = self.run_idf_tools_with_action(['export'])
self.assertIn('%s/tools/esp32ulp-elf/%s/esp32ulp-elf-binutils/bin' %
@ -207,6 +222,8 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, XTENSA_ESP32_ELF_VERSION), output)
self.assertIn('%s/tools/openocd-esp32/%s/openocd-esp32/bin' %
(self.temp_tools_dir, OPENOCD_VERSION), output)
self.assertIn('%s/tools/xtensa-esp-elf-gdb/%s/xtensa-esp-elf-gdb/bin' %
(self.temp_tools_dir, XTENSA_ESP_GDB_VERSION), output)
self.assertNotIn('%s/tools/riscv32-esp-elf/%s/riscv32-esp-elf/bin' %
(self.temp_tools_dir, RISCV_ELF_VERSION), output)
self.assertNotIn('%s/tools/esp32s2ulp-elf/%s/esp32s2ulp-elf-binutils/bin' %
@ -215,23 +232,28 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, XTENSA_ESP32S2_ELF_VERSION), output)
self.assertNotIn('%s/tools/xtensa-esp32s3-elf/%s/xtensa-esp32s3-elf/bin' %
(self.temp_tools_dir, XTENSA_ESP32S3_ELF_VERSION), output)
self.assertNotIn('%s/tools/riscv32-esp-elf-gdb/%s/riscv32-esp-elf-gdb/bin' %
(self.temp_tools_dir, RISCV_ESP_GDB_VERSION), output)
def test_tools_for_esp32c3(self):
required_tools_installed = 2
required_tools_installed = 3
output = self.run_idf_tools_with_action(['install', '--targets=esp32c3'])
self.assert_tool_installed(output, OPENOCD, OPENOCD_VERSION)
self.assert_tool_installed(output, RISCV_ELF, RISCV_ELF_VERSION)
self.assert_tool_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32_ELF, XTENSA_ESP32_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S2_ELF, XTENSA_ESP32S2_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S3_ELF, XTENSA_ESP32S3_ELF_VERSION)
self.assert_tool_not_installed(output, ESP32ULP, ESP32ULP_VERSION, ESP32ULP_ARCHIVE)
self.assert_tool_not_installed(output, ESP32S2ULP, ESP32S2ULP_VERSION, ESP32S2ULP_ARCHIVE)
self.assert_tool_not_installed(output, XTENSA_ESP_GDB_VERSION, XTENSA_ESP_GDB_VERSION)
self.assertIn('Destination: {}'.format(os.path.join(self.temp_tools_dir, 'dist')), output)
self.assertEqual(required_tools_installed, output.count('Done'))
output = self.run_idf_tools_with_action(['check'])
self.assertIn('version installed in tools directory: ' + OPENOCD_VERSION, output)
self.assertIn('version installed in tools directory: ' + RISCV_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + RISCV_ESP_GDB_VERSION, output)
output = self.run_idf_tools_with_action(['export'])
self.assertIn('%s/tools/openocd-esp32/%s/openocd-esp32/bin' %
@ -248,13 +270,17 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, XTENSA_ESP32S2_ELF_VERSION), output)
self.assertNotIn('%s/tools/xtensa-esp32s3-elf/%s/xtensa-esp32s3-elf/bin' %
(self.temp_tools_dir, XTENSA_ESP32S3_ELF_VERSION), output)
self.assertNotIn('%s/tools/xtensa-esp-elf-gdb/%s/xtensa-esp-elf-gdb/bin' %
(self.temp_tools_dir, XTENSA_ESP_GDB_VERSION), output)
def test_tools_for_esp32s2(self):
required_tools_installed = 4
required_tools_installed = 5
output = self.run_idf_tools_with_action(['install', '--targets=esp32s2'])
self.assert_tool_installed(output, XTENSA_ESP32S2_ELF, XTENSA_ESP32S2_ELF_VERSION)
self.assert_tool_installed(output, OPENOCD, OPENOCD_VERSION)
self.assert_tool_installed(output, RISCV_ELF, RISCV_ELF_VERSION)
self.assert_tool_installed(output, XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32_ELF, XTENSA_ESP32_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S3_ELF, XTENSA_ESP32S3_ELF_VERSION)
self.assert_tool_not_installed(output, ESP32ULP, ESP32ULP_VERSION, ESP32ULP_ARCHIVE)
@ -266,6 +292,7 @@ class TestUsage(unittest.TestCase):
self.assertIn('version installed in tools directory: ' + ESP32S2ULP_VERSION, output)
self.assertIn('version installed in tools directory: ' + OPENOCD_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32S2_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP_GDB_VERSION, output)
output = self.run_idf_tools_with_action(['export'])
self.assertIn('%s/tools/esp32s2ulp-elf/%s/esp32s2ulp-elf-binutils/bin' %
@ -282,13 +309,19 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, RISCV_ELF_VERSION), output)
self.assertNotIn('%s/tools/xtensa-esp32s3-elf/%s/xtensa-esp32s3-elf/bin' %
(self.temp_tools_dir, XTENSA_ESP32S3_ELF_VERSION), output)
self.assertIn('%s/tools/xtensa-esp-elf-gdb/%s/xtensa-esp-elf-gdb/bin' %
(self.temp_tools_dir, XTENSA_ESP_GDB_VERSION), output)
self.assertNotIn('%s/tools/riscv32-esp-elf-gdb/%s/riscv32-esp-elf-gdb/bin' %
(self.temp_tools_dir, RISCV_ESP_GDB_VERSION), output)
def test_tools_for_esp32s3(self):
required_tools_installed = 4
required_tools_installed = 5
output = self.run_idf_tools_with_action(['install', '--targets=esp32s3'])
self.assert_tool_installed(output, XTENSA_ESP32S3_ELF, XTENSA_ESP32S3_ELF_VERSION)
self.assert_tool_installed(output, OPENOCD, OPENOCD_VERSION)
self.assert_tool_installed(output, RISCV_ELF, RISCV_ELF_VERSION)
self.assert_tool_installed(output, XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32_ELF, XTENSA_ESP32_ELF_VERSION)
self.assert_tool_not_installed(output, XTENSA_ESP32S2_ELF, XTENSA_ESP32S2_ELF_VERSION)
self.assert_tool_not_installed(output, ESP32ULP, ESP32ULP_VERSION, ESP32ULP_ARCHIVE)
@ -299,6 +332,8 @@ class TestUsage(unittest.TestCase):
output = self.run_idf_tools_with_action(['check'])
self.assertIn('version installed in tools directory: ' + OPENOCD_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP32S3_ELF_VERSION, output)
self.assertIn('version installed in tools directory: ' + XTENSA_ESP_GDB_VERSION, output)
self.assertIn('version installed in tools directory: ' + RISCV_ESP_GDB_VERSION, output)
output = self.run_idf_tools_with_action(['export'])
self.assertIn('%s/tools/openocd-esp32/%s/openocd-esp32/bin' %
@ -315,6 +350,10 @@ class TestUsage(unittest.TestCase):
(self.temp_tools_dir, ESP32S2ULP_VERSION), output)
self.assertNotIn('%s/tools/xtensa-esp32s2-elf/%s/xtensa-esp32s2-elf/bin' %
(self.temp_tools_dir, XTENSA_ESP32S2_ELF_VERSION), output)
self.assertIn('%s/tools/xtensa-esp-elf-gdb/%s/xtensa-esp-elf-gdb/bin' %
(self.temp_tools_dir, XTENSA_ESP_GDB_VERSION), output)
self.assertNotIn('%s/tools/riscv32-esp-elf-gdb/%s/riscv32-esp-elf-gdb/bin' %
(self.temp_tools_dir, RISCV_ESP_GDB_VERSION), output)
def test_uninstall_option(self):
self.run_idf_tools_with_action(['install', '--targets=esp32,esp32c3'])

View File

@ -1,5 +1,153 @@
{
"tools": [
{
"description": "GDB for Xtensa",
"export_paths": [
[
"xtensa-esp-elf-gdb",
"bin"
]
],
"export_vars": {},
"info_url": "https://github.com/espressif/binutils-gdb",
"install": "always",
"license": "GPL-3.0-or-later",
"name": "xtensa-esp-elf-gdb",
"supported_targets": [
"esp32",
"esp32s2",
"esp32s3"
],
"version_cmd": [
"xtensa-esp-elf-gdb-no-python",
"--version"
],
"version_regex": "GNU gdb \\(esp-gdb\\) ([a-z0-9.-_]+)",
"versions": [
{
"linux-amd64": {
"sha256": "c2bfb97c61fa3d2e3720aa1cc8163806a8bc712a173a374b60f6f5c061d33d3f",
"size": 26802753,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-x86_64-linux-gnu.tar.gz"
},
"linux-arm64": {
"sha256": "849c523037499de4f49f0ddf96c8ede5d4f7e1a4673b1449141468502edb1141",
"size": 27074996,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-aarch64-linux-gnu.tar.gz"
},
"linux-armel": {
"sha256": "352622085efc9dca1d2f148920e297751bd2d5bfc83e1c5a417f5a9369f92a96",
"size": 25172145,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-arm-linux-gnueabi.tar.gz"
},
"linux-armhf": {
"sha256": "482928dc7b54f85b1c92106c74141773270974744a4f7111deb5407411b97711",
"size": 23455642,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-arm-linux-gnueabihf.tar.gz"
},
"linux-i686": {
"sha256": "b4f61c82a41b5187dd59c2bb7371001b9d3bbac13dd66158a57097f4d7b951b0",
"size": 25841496,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-i586-linux-gnu.tar.gz"
},
"macos": {
"sha256": "18324682734ca2a23a45c5505f7bc1824336f88a4d59327d545083dc8a633bba",
"size": 36455524,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-x86_64-apple-darwin14.tar.gz"
},
"macos-arm64": {
"sha256": "18324682734ca2a23a45c5505f7bc1824336f88a4d59327d545083dc8a633bba",
"size": 36455524,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-x86_64-apple-darwin14.tar.gz"
},
"name": "11.1_20220318",
"status": "recommended",
"win32": {
"sha256": "b9f43a758d1bc3d9552c816033aaa439620459edb2b3618ef5bd4eadb1bb771b",
"size": 22423882,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-i686-w64-mingw32.zip"
},
"win64": {
"sha256": "b1bff9ee6b2a0025f33a9ddc97b92bab7578c11172c06e38a7483f98e157fb93",
"size": 21938075,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/xtensa-esp-elf-gdb-11.1_20220318-x86_64-w64-mingw32.zip"
}
}
]
},
{
"description": "GDB for RISC-V",
"export_paths": [
[
"riscv32-esp-elf-gdb",
"bin"
]
],
"export_vars": {},
"info_url": "https://github.com/espressif/binutils-gdb",
"install": "always",
"license": "GPL-3.0-or-later",
"name": "riscv32-esp-elf-gdb",
"supported_targets": [
"esp32c3"
],
"version_cmd": [
"riscv32-esp-elf-gdb",
"--version"
],
"version_regex": "GNU gdb \\(esp-gdb\\) ([a-z0-9.-_]+)",
"versions": [
{
"linux-amd64": {
"sha256": "b34bab21a39a04d5d863ce3ed58a1836403fd0240875a14553ce78773443cb0b",
"size": 26558532,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-x86_64-linux-gnu.tar.gz"
},
"linux-arm64": {
"sha256": "6c7392d91c5e3bdf00b2b1d998c370d48f4ff96c8fe7f2beb49df2aed65f455f",
"size": 26889510,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-aarch64-linux-gnu.tar.gz"
},
"linux-armel": {
"sha256": "af794c5ebc8651d717f307efa70d6a5d189f33f239c74d11ace8ddcb476f868a",
"size": 25408085,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-arm-linux-gnueabi.tar.gz"
},
"linux-armhf": {
"sha256": "511b5caf0495eb8f5eaa0272eaed4828f05619d34b63460936db14e75310bfb0",
"size": 23658001,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-arm-linux-gnueabihf.tar.gz"
},
"linux-i686": {
"sha256": "71627a0416f3dc8ee1c8f6a0e263c648ecbef6bc497c5ed4f708290c5db0c37e",
"size": 25947586,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-i586-linux-gnu.tar.gz"
},
"macos": {
"sha256": "315676b51b51d2aa04e1d0c49008a74c44ff3a5c6298b4ab06ef5878318551e2",
"size": 36357845,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-x86_64-apple-darwin14.tar.gz"
},
"macos-arm64": {
"sha256": "315676b51b51d2aa04e1d0c49008a74c44ff3a5c6298b4ab06ef5878318551e2",
"size": 36357845,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-x86_64-apple-darwin14.tar.gz"
},
"name": "11.1_20220318",
"status": "recommended",
"win32": {
"sha256": "a87dec111437a3774d3c21665d0ed89a3040e5f423de00e710fe5557da8c4388",
"size": 22325998,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-i686-w64-mingw32.zip"
},
"win64": {
"sha256": "07672aa7ac944a99ab8d7caa5fb815565ad06e5cd9f455aeecf433640f7da354",
"size": 21474146,
"url": "https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v11.1_20220318/riscv32-esp-elf-gdb-11.1_20220318-x86_64-w64-mingw32.zip"
}
}
]
},
{
"description": "Toolchain for Xtensa (ESP32) based on GCC",
"export_paths": [