mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
Update high level interrupt command DOC-280
This commit is contained in:
parent
49c8d076cd
commit
7c31aec2c2
@ -31,13 +31,13 @@ Using these symbols is done by creating an assembly file (suffix .S) and definin
|
|||||||
rsr a0, EXCSAVE_5
|
rsr a0, EXCSAVE_5
|
||||||
rfi 5
|
rfi 5
|
||||||
|
|
||||||
For a real-life example, see the :component_file:`{IDF_TARGET_PATH_NAME}/dport_panic_highint_hdl.S` file; the panic handler interrupt is implemented there.
|
For a real-life example, see the :component_file:`esp_system/port/{IDF_TARGET_PATH_NAME}/dport_panic_highint_hdl.S` file; the panic handler interrupt is implemented there.
|
||||||
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
- Do not call C code from a high-level interrupt; because these interupts still run in critical sections, this can cause crashes.
|
- Do not call C code from a high-level interrupt; because these interrupts still run in critical sections, this can cause crashes.
|
||||||
(The panic handler interrupt does call normal C code, but this is OK because there is no intention of returning to the normal code
|
(The panic handler interrupt does call normal C code, but this is OK because there is no intention of returning to the normal code
|
||||||
flow afterwards.)
|
flow afterwards.)
|
||||||
|
|
||||||
@ -49,11 +49,17 @@ Notes
|
|||||||
ld_include_my_isr_file:
|
ld_include_my_isr_file:
|
||||||
|
|
||||||
|
|
||||||
(The symbol is called ``ld_include_my_isr_file`` here but can have any arbitrary name not defined anywhere else.)
|
The symbol is called ``ld_include_my_isr_file`` here but can have any arbitrary name not defined anywhere else.
|
||||||
Then, in the component.mk, add this file as an unresolved symbol to the ld command line arguments::
|
|
||||||
|
Then, in the component CMakeLists.txt, add this file as an unresolved symbol to the ld command line arguments::
|
||||||
|
|
||||||
|
target_link_libraries(${COMPONENT_TARGET} "-u ld_include_my_isr_file")
|
||||||
|
|
||||||
|
If using the legacy Make build system, add the following to component.mk, instead::
|
||||||
|
|
||||||
COMPONENT_ADD_LDFLAGS := -u ld_include_my_isr_file
|
COMPONENT_ADD_LDFLAGS := -u ld_include_my_isr_file
|
||||||
|
|
||||||
|
|
||||||
This should cause the linker to always include a file defining ``ld_include_my_isr_file``, causing the ISR to always be linked in.
|
This should cause the linker to always include a file defining ``ld_include_my_isr_file``, causing the ISR to always be linked in.
|
||||||
|
|
||||||
- High-level interrupts can be routed and handled using esp_intr_alloc and associated functions. The handler and handler arguments
|
- High-level interrupts can be routed and handled using esp_intr_alloc and associated functions. The handler and handler arguments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user