mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
|
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
This change fixes NuttX’s CMake support when NuttX is embedded in another project via add_subdirectory(). CMake’s CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR refer to the outermost project, causing NuttX to access its .config, generated files, host tools, and build artifacts in the parent project’s directories. The fix introduces NUTTX_DIR and NUTTX_BINARY_DIR, based on CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR, and consistently uses them for NuttX self-references while preserving existing standalone builds. It fixes the Kconfig initialization failure reported in #19697 and allows an embedded sim:nsh build to configure, build, and boot successfully. The change affects only the CMake build system (not Make or Kconfig defaults), requires the corresponding nuttx-apps change, and does not extend add_subdirectory() support to cross-compiled non-sim boards due to CMake’s toolchain-file limitation. Fixes #19697. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com> |
||
|---|---|---|
| .. | ||
| hardware | ||
| sdc | ||
| .gitignore | ||
| chip.h | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| nrf52_adc.c | ||
| nrf52_adc.h | ||
| nrf52_allocateheap.c | ||
| nrf52_clockconfig.c | ||
| nrf52_clockconfig.h | ||
| nrf52_config.h | ||
| nrf52_flash.c | ||
| nrf52_gpio.c | ||
| nrf52_gpio.h | ||
| nrf52_gpiote.c | ||
| nrf52_gpiote.h | ||
| nrf52_i2c.c | ||
| nrf52_i2c.h | ||
| nrf52_i2c_bitbang.c | ||
| nrf52_i2c_bitbang.h | ||
| nrf52_idle.c | ||
| nrf52_ieee802154.c | ||
| nrf52_ieee802154_priv.h | ||
| nrf52_ieee802154_radio.c | ||
| nrf52_ieee802154_radio.h | ||
| nrf52_ieee802154_rtc.c | ||
| nrf52_ieee802154_rtc.h | ||
| nrf52_ieee802154_tim.c | ||
| nrf52_ieee802154_tim.h | ||
| nrf52_ieee802154_trace.c | ||
| nrf52_ieee802154_trace.h | ||
| nrf52_irq.c | ||
| nrf52_irq.h | ||
| nrf52_lowputc.c | ||
| nrf52_lowputc.h | ||
| nrf52_nvmc.c | ||
| nrf52_nvmc.h | ||
| nrf52_pminitialize.c | ||
| nrf52_ppi.c | ||
| nrf52_ppi.h | ||
| nrf52_pwm.c | ||
| nrf52_pwm.h | ||
| nrf52_qdec.c | ||
| nrf52_qdec.h | ||
| nrf52_qspi.c | ||
| nrf52_qspi.h | ||
| nrf52_radio.c | ||
| nrf52_radio.h | ||
| nrf52_radio_ieee802154.h | ||
| nrf52_rng.c | ||
| nrf52_rtc.c | ||
| nrf52_rtc.h | ||
| nrf52_sdc.c | ||
| nrf52_sdc.h | ||
| nrf52_serial.c | ||
| nrf52_serial.h | ||
| nrf52_spi.c | ||
| nrf52_spi.h | ||
| nrf52_start.c | ||
| nrf52_start.h | ||
| nrf52_systick.c | ||
| nrf52_tickless_rtc.c | ||
| nrf52_tim.c | ||
| nrf52_tim.h | ||
| nrf52_tim_lowerhalf.c | ||
| nrf52_tim_lowerhalf.h | ||
| nrf52_uid.c | ||
| nrf52_uid.h | ||
| nrf52_usbd.c | ||
| nrf52_usbd.h | ||
| nrf52_utils.c | ||
| nrf52_wdt.c | ||
| nrf52_wdt.h | ||
| nrf52_wdt_lowerhalf.c | ||
| nrf52_wdt_lowerhalf.h | ||
| nrf52832_errdata.c | ||