roskuttan opened a new pull request, #16212:
URL: https://github.com/apache/nuttx/pull/16212

   ## Summary
   
   This change introduces CMake build support for the Raspberry Pi Pico board 
in Apache NuttX to provide an alternative build system widely used in modern 
embedded development, enhancing accessibility and maintainability.
   The functional part of the code being changed includes the build 
configuration for the RP2040 architecture and the Raspberry Pi Pico board.
   The change adds new `CMakeLists.txt` files to define build rules: 
`arch/arm/src/rp2040/CMakeLists.txt, 
arch/arm/src/rp2040/hardware/CMakeLists.txt, 
boards/arm/rp2040/raspberrypi-pico/CMakeLists.txt, and 
boards/arm/rp2040/raspberrypi-pico/src/CMakeLists.txt.`
   This work is inspired by existing CMake implementations for other boards in 
the NuttX ecosystem.
   
   ## Impact
   
   New Feature Added?: YES - Adds CMake build support as an optional build 
method for the Raspberry Pi Pico.
   Impact on User: YES - Users familiar with CMake can adopt this build method, 
but the existing Make-based system remains unaffected.
   Impact on Build: YES - Introduces an alternative build process requiring 
CMake installation, with potential configuration adjustments (see Testing).
   Impact on Hardware: YES - Specific to the Raspberry Pi Pico and RP2040 
architecture, with no impact on other hardware.
   Impact on Documentation: NO - As there is existing documentation 
demonstrates the use of cmake in nuttx
   Impact on Security: NO - No security implications as this is a build system 
enhancement.
   Impact on Compatibility: YES - Intended to be compatible with existing 
builds, but current issues prevent full compatibility (see Testing).
   
   ## Testing
   
   - **Build Host(s)**: OS (Ubuntu 24.04 on WSL), CPU (x86_64), compiler 
(arm-none-eabi-gcc), etc.
   - **Target(s)**: arch (ARM), board:config (Raspberry Pi Pico with nsh 
configuration), etc.
   - Steps to reproduce: 
     - Configure the board using `cmake -B build 
-DBOARD_CONFIG=raspberrypi-pico:nsh -GNinja`
     - Build using `cmake --build build -t clean -j12 && cmake --build build 
-j12`
   
   Testing logs :
   
   ```
   roskuttan@SILENT-KILLERED:~/nuttx_pr/nuttx$ cmake --build build -t clean 
-j12 && cmake --build build -j12
   [1/1] Cleaning all built files...
   Cleaning... 0 files.
   [1029/1041] Building C object 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj
   FAILED: 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj
   /usr/bin/arm-none-eabi-gcc -D__KERNEL__ -D__NuttX__ 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/rp2040 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/common 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/armv6-m 
-I/home/roskuttan/nuttx_pr/nuttx/sched 
-I/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/include -isystem 
/home/roskuttan/nuttx_pr/nuttx/include -isystem 
/home/roskuttan/nuttx_pr/nuttx/build/include -mcpu=cortex-m0 -mthumb 
-mfloat-abi=soft --param=min-pagesize=0 -fno-common -Wall -Wshadow -Wundef 
-nostdlib -Os -fno-strict-aliasing -fomit-frame-pointer -Wa,-mthumb 
-Wa,-mimplicit-it=always -ffunction-sections -fdata-sections -g -Wno-attributes 
-Wno-unknown-pragmas -Wstrict-prototypes -Wno-psabi -fdiagnostics-color=always 
-DNDEBUG -fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx= 
-fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx/dummy= 
-fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/raspberrypi-pico=
 -fmacro-prefix-map=/home/roskuttan/nuttx_pr/nut
 tx/arch/arm/src/rp2040= 
@boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj.rsp
 -MD -MT 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj 
-MF 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj.d 
-o 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_common_bringup.c.obj 
-c 
/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/src/rp2040_common_bringup.c
   
/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/src/rp2040_common_bringup.c:39:10:
 fatal error: rp2040_pico.h: No such file or directory
      39 | #include "rp2040_pico.h"
         |          ^~~~~~~~~~~~~~~
   compilation terminated.
   [1030/1041] Building C object 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj
   FAILED: 
boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj
   /usr/bin/arm-none-eabi-gcc -D__KERNEL__ -D__NuttX__ 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/rp2040 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/common 
-I/home/roskuttan/nuttx_pr/nuttx/arch/arm/src/armv6-m 
-I/home/roskuttan/nuttx_pr/nuttx/sched 
-I/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/include -isystem 
/home/roskuttan/nuttx_pr/nuttx/include -isystem 
/home/roskuttan/nuttx_pr/nuttx/build/include -mcpu=cortex-m0 -mthumb 
-mfloat-abi=soft --param=min-pagesize=0 -fno-common -Wall -Wshadow -Wundef 
-nostdlib -Os -fno-strict-aliasing -fomit-frame-pointer -Wa,-mthumb 
-Wa,-mimplicit-it=always -ffunction-sections -fdata-sections -g -Wno-attributes 
-Wno-unknown-pragmas -Wstrict-prototypes -Wno-psabi -fdiagnostics-color=always 
-DNDEBUG -fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx= 
-fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx/dummy= 
-fmacro-prefix-map=/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/raspberrypi-pico=
 -fmacro-prefix-map=/home/roskuttan/nuttx_pr/nut
 tx/arch/arm/src/rp2040= 
@boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj.rsp 
-MD -MT boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj 
-MF boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj.d 
-o boards/CMakeFiles/board.dir/arm/rp2040/common/src/rp2040_uniqueid.c.obj -c 
/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/src/rp2040_uniqueid.c
   
/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/src/rp2040_uniqueid.c:89:27:
 error: 'CONFIG_BOARDCTL_UNIQUEID_SIZE' undeclared here (not in a function)
      89 | static uint8_t g_uniqueid[CONFIG_BOARDCTL_UNIQUEID_SIZE];
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
/home/roskuttan/nuttx_pr/nuttx/boards/arm/rp2040/common/src/rp2040_uniqueid.c:89:16:
 warning: 'g_uniqueid' defined but not used [-Wunused-variable]
      89 | static uint8_t g_uniqueid[CONFIG_BOARDCTL_UNIQUEID_SIZE];
         |                ^~~~~~~~~~
   [1037/1041] Building C object 
boards/CMakeFiles/board.dir/arm/rp2040/raspberrypi-pico/src/rp2040_gpio.c.obj
   ninja: build stopped: subcommand failed.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to