mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'docs/update_high_level_interrupt_command' into 'master'
Update high level interrupt command DOC-280 See merge request espressif/esp-idf!9522
This commit is contained in:
commit
7f8aa3b303
@ -31,13 +31,13 @@ Using these symbols is done by creating an assembly file (suffix .S) and definin
|
||||
rsr a0, EXCSAVE_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
|
||||
-----
|
||||
|
||||
- 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
|
||||
flow afterwards.)
|
||||
|
||||
@ -49,11 +49,17 @@ Notes
|
||||
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.)
|
||||
Then, in the component.mk, add this file as an unresolved symbol to the ld command line arguments::
|
||||
The symbol is called ``ld_include_my_isr_file`` here but can have any arbitrary name not defined anywhere else.
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user