pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

how to use/include rename_exceptions.h, is there a detailed document talk about enable cmsis-compatible layer?

Open xiongyu0523 opened this issue 4 years ago • 4 comments

By default this file does not take effects, in final image i can't find replaced symbol., though default value of PICO_CMSIS_RENAME_EXCEPTIONS is 1.

In \src\rp2_common\cmsis\CMakeLists.txt, looks like PICO_CMSIS_CORE_PATH is defined by default.

set(PICO_CMSIS_CORE_PATH ${CMAKE_CURRENT_LIST_DIR}/stub)

xiongyu0523 avatar Sep 02 '21 06:09 xiongyu0523

add cmsis_core to my project's link libraries seems solve this issue, any document tells these steps?

xiongyu0523 avatar Sep 02 '21 06:09 xiongyu0523

Appendix F in https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-c-sdk.pdf mentions:

Added CMSIS core headers CMSIS core headers (e.g. core_cm0plus.h and RP2040.h) are made available via cmsis_core INTERFACE library. Additionally, CMSIS standard exception naming is available via PICO_CMSIS_RENAME_EXCEPTIONS=1

lurch avatar Sep 02 '21 08:09 lurch

Thanks. Is there any example in pico-example has a demonstration of using this cmsis_core INTERFACE library?

xiongyu0523 avatar Sep 03 '21 03:09 xiongyu0523

Not yet, but we welcome PRs... :wink:

lurch avatar Sep 03 '21 08:09 lurch