Maximum Recursion Depth when adding include(pico_extras_import.cmake)

Open
#31 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cmake
Domain
build-system

Research direction

Reproduce the configuration from CMakeLists.txt using the shown PICO_EXTRAS_PATH and include(pico_extras_import.cmake). Trace the include chain through pico_extras_import.cmake, pico_sdk_import.cmake, and pico_sdk_init.cmake to identify why initialization recurses. Done means the pico-examples configuration completes without exceeding the recursion limit.

Written by the indexing model from the issue text.

Description

Hi,
as soon as I add these two lines to my CMakeLists.txt of pico-examples:

set(PICO_EXTRAS_PATH "S:/Programming/Pico/Downloads/pico-extras/")
include(pico_extras_import.cmake)

I get an error saying

PICO_SDK_PATH is S:/Programming/Pico/Downloads/pico-sdk
PICO platform is rp2040.
CMake Error at S:/Programming/Pico/Downloads/pico-sdk/pico_sdk_init.cmake:8 (if):
  Maximum recursion depth of 1000 exceeded
Call Stack (most recent call first):
  pico_sdk_import.cmake:62 (include)
  CMakeLists.txt:4 (include)


-- Configuring incomplete, errors occurred!
See also "S:/Programming/Pico/Downloads/pico-examples/build/CMakeFiles/CMakeOutput.log".
See also "S:/Programming/Pico/Downloads/pico-examples/build/CMakeFiles/CMakeError.log".

How can I fix it?
Any help would be appreciated!

Dominant language
C
Stars
605
Forks
155
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-extras

All issues in raspberrypi/pico-extras

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.