-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/esp_intr_dump' into 'master'
system: add esp_intr_dump API to debug interrupt allocation Closes IDF-4281 and IDF-6066 See merge request espressif/esp-idf!23877
- Loading branch information
Showing
16 changed files
with
708 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
set(COMPONENTS main) | ||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(esp_intr_dump) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | | ||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | | ||
|
||
# Test for esp_intr_dump | ||
|
||
This test app serves two purposes: | ||
1. Sanity-checking `esp_intr_dump` function. These tests run in QEMU and make sure that `esp_intr_dump` produces expected output when e.g. a shared interrupt is allocated. | ||
2. Making unintended changes to the default interrupt allocations more visible in MRs. The way this works is, the output of `esp_intr_dump` is compared to the expected output, for example [expected_output/esp32.txt](expected_output/esp32.txt). If you change IDF startup code so that it allocates an additional interrupt, you will need to update the expected output file. MR reviewers will see the modification of the expected output file and will evaluate the impact of the change. | ||
|
||
## When adding support for a new chip target | ||
|
||
1. Build the test app for the new target, flash it to the board. | ||
2. Enter `intr_dump` command in the console. | ||
3. Copy the output and save it in `expected_output/<target>.txt`. |
70 changes: 70 additions & 0 deletions
70
tools/test_apps/system/esp_intr_dump/expected_output/esp32.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
CPU 0 interrupt status: | ||
Int Level Type Status | ||
0 1 Level Reserved | ||
1 1 Level Reserved | ||
2 1 Level Used: RTC_CORE | ||
3 1 Level Used: TG0_LACT_LEVEL | ||
4 1 Level Reserved | ||
5 1 Level Reserved | ||
6 1 Level Reserved | ||
7 1 Level CPU-internal | ||
8 1 Level Reserved | ||
9 1 Level Used: FROM_CPU0 | ||
10 1 Edge Free (not general-use) | ||
11 3 Level CPU-internal | ||
12 1 Level Used: TG0_WDT_LEVEL | ||
13 1 Level Used: UART0 | ||
14 7 Level Reserved | ||
15 3 Level CPU-internal | ||
16 5 Level CPU-internal | ||
17 1 Level Free | ||
18 1 Level Free | ||
19 2 Level Free | ||
20 2 Level Free | ||
21 2 Level Free | ||
22 3 Edge Reserved | ||
23 3 Level Free | ||
24 4 Level Reserved | ||
25 4 Level Reserved | ||
26 5 Level Free (not general-use) | ||
27 3 Level Reserved | ||
28 4 Edge Free (not general-use) | ||
29 3 Level CPU-internal | ||
30 4 Edge Reserved | ||
31 5 Level Reserved | ||
CPU 1 interrupt status: | ||
Int Level Type Status | ||
0 1 Level Reserved | ||
1 1 Level Reserved | ||
2 1 Level Used: FROM_CPU1 | ||
3 1 Level Free | ||
4 1 Level Free | ||
5 1 Level Reserved | ||
6 1 Level Reserved | ||
7 1 Level CPU-internal | ||
8 1 Level Reserved | ||
9 1 Level Free | ||
10 1 Edge Free (not general-use) | ||
11 3 Level CPU-internal | ||
12 1 Level Free | ||
13 1 Level Free | ||
14 7 Level Reserved | ||
15 3 Level CPU-internal | ||
16 5 Level CPU-internal | ||
17 1 Level Free | ||
18 1 Level Free | ||
19 2 Level Free | ||
20 2 Level Free | ||
21 2 Level Free | ||
22 3 Edge Free (not general-use) | ||
23 3 Level Free | ||
24 4 Level Free (not general-use) | ||
25 4 Level Reserved | ||
26 5 Level Reserved | ||
27 3 Level Reserved | ||
28 4 Edge Free (not general-use) | ||
29 3 Level CPU-internal | ||
30 4 Edge Reserved | ||
31 5 Level Reserved | ||
Interrupts available for general use: 17 | ||
Shared interrupts: 0 |
36 changes: 36 additions & 0 deletions
36
tools/test_apps/system/esp_intr_dump/expected_output/esp32c2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CPU 0 interrupt status: | ||
Int Level Type Status | ||
0 * * Reserved | ||
1 * * Reserved | ||
2 2 Level Used: RTC_CORE | ||
3 2 Level Used: SYSTIMER_TARGET2_EDGE | ||
4 2 Level Used: ETS_FROM_CPU_INTR0 | ||
5 * * Reserved | ||
6 * * Reserved | ||
7 2 Level Used: SYSTIMER_TARGET0_EDGE | ||
8 * * Reserved | ||
9 2 Level Used: UART | ||
10 * * Free | ||
11 * * Free | ||
12 * * Free | ||
13 * * Free | ||
14 * * Free | ||
15 * * Free | ||
16 * * Free | ||
17 * * Free | ||
18 * * Free | ||
19 * * Free | ||
20 * * Free | ||
21 * * Free | ||
22 * * Free | ||
23 * * Free | ||
24 * * Reserved | ||
25 * * Reserved | ||
26 * * Free | ||
27 * * Reserved | ||
28 * * Free | ||
29 * * Free | ||
30 * * Free | ||
31 * * Free | ||
Interrupts available for general use: 19 | ||
Shared interrupts: 0 |
36 changes: 36 additions & 0 deletions
36
tools/test_apps/system/esp_intr_dump/expected_output/esp32c3.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CPU 0 interrupt status: | ||
Int Level Type Status | ||
0 * * Reserved | ||
1 * * Reserved | ||
2 2 Level Used: RTC_CORE | ||
3 2 Level Used: SYSTIMER_TARGET2_EDGE | ||
4 2 Level Used: FROM_CPU_INTR0 | ||
5 * * Reserved | ||
6 * * Reserved | ||
7 2 Level Used: SYSTIMER_TARGET0_EDGE | ||
8 * * Reserved | ||
9 2 Level Used: TG0_WDT_LEVEL | ||
10 2 Level Used: UART0 | ||
11 * * Free | ||
12 * * Free | ||
13 * * Free | ||
14 * * Free | ||
15 * * Free | ||
16 * * Free | ||
17 * * Free | ||
18 * * Free | ||
19 * * Free | ||
20 * * Free | ||
21 * * Free | ||
22 * * Free | ||
23 * * Free | ||
24 * * Reserved | ||
25 * * Reserved | ||
26 * * Reserved | ||
27 * * Reserved | ||
28 * * Free | ||
29 * * Free | ||
30 * * Free | ||
31 * * Free | ||
Interrupts available for general use: 17 | ||
Shared interrupts: 0 |
Oops, something went wrong.