fdcavalcanti opened a new pull request, #3439:
URL: https://github.com/apache/nuttx-apps/pull/3439
## Summary
<!-- This field should contain a summary of the changes. It will be
pre-filled with the commit's message and descriptions. Adjust it accordingly -->
* netutils/cjson: fix apps path in CMake
Fix mismatch on apps directory naming when it is cloned under 'nuttx-apps'
instead of 'apps'.
It replaces the hardcoded `${CMAKE_BINARY_DIR}/apps` directory with
`${NUTTX_APPS_BINDIR}`.
## Impact
<!-- Please fill the following sections with YES/NO and provide a brief
explanation -->
Impact on user: No.
<!-- Does it impact user's applications? How? -->
Impact on build: Yes, it automatically uses the proper `nuttx-apps`
repository name instead of requiring a hardcoded one.
<!-- Does it impact on building NuttX? How? (please describe the required
changes on the build system) -->
Impact on hardware: No.
<!-- Does it impact a specific hardware supported by NuttX? -->
Impact on documentation: No.
<!-- Does it impact the existing documentation? Please provide additional
documentation to reflect that -->
Impact on security: No.
<!-- Does it impact NuttX's security? -->
Impact on compatibility: No.
<!-- Does it impact compatibility between previous and current versions? Is
this a breaking change? -->
## Testing
<!-- Please provide all the testing procedure. Consider that upstream
reviewers should be able to reproduce the same testing performed internally -->
Build any application that requires CJSON. In my case, I used
`esp32c3-devkit:sta_softap` (which CMake support is under test) and it kept
failing the build.
### Building
<!-- Provide how to build the test for each SoC being tested -->
- `cmake -B build -DBOARD_CONFIG=esp32c3-devkit:sta_softap -GNinja
-DNXTMPDIR=on`
- `cmake --build build`
### Results
Before changes:
```
[1685/1783] Building C object
apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o
FAILED: apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o
/home/fdcavalcanti/work/toolchains/riscv-none-elf-gcc/bin/riscv-none-elf-gcc
-D__NuttX__
-I/home/fdcavalcanti/nuttxspace1/nuttx-apps/system/argtable3/argtable3/src
-I/home/fdcavalcanti/nuttxspace1/nuttx-apps/include
-I/home/fdcavalcanti/nuttxspace1/nuttx/build/nuttx-apps/include -isystem
/home/fdcavalcanti/nuttxspace1/nuttx/include -isystem
/home/fdcavalcanti/nuttxspace1/nuttx/build/include -Os -fno-strict-aliasing
-fomit-frame-pointer -fno-common -Wall -Wshadow -Wundef -Wno-attributes
-Wno-unknown-pragmas -Wstrict-prototypes -ffunction-sections -fdata-sections
-march=rv32imc_zicsr_zifencei -mabi=ilp32 -fdiagnostics-color=always
-fmacro-prefix-map=/home/fdcavalcanti/nuttxspace1/nuttx=
-fmacro-prefix-map=/home/fdcavalcanti/nuttxspace1/nuttx-apps=
-fmacro-prefix-map=/home/fdcavalcanti/nuttxspace1/nuttx/boards/risc-v/esp32c3/esp32c3-devkit=
-fmacro-prefix-map=/home/fdcavalcanti/nuttxspace1/nuttx/arch/risc-v/src/esp32c3=
@apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o.rsp -MD -MT
apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o -MF
apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o.d -o
apps/CMakeFiles/apps.dir/wireless/wapi/src/util.c.o -c
/home/fdcavalcanti/nuttxspace1/nuttx-apps/wireless/wapi/src/util.c
/home/fdcavalcanti/nuttxspace1/nuttx-apps/wireless/wapi/src/util.c:55:10:
fatal error: netutils/cJSON.h: No such file or directory
55 | #include "netutils/cJSON.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
```
After changes:
```
[1644/1779] Building C object
apps/CMakeFiles/apps.dir/netutils/dhcpd/dhcpd.c.o
/home/fdcavalcanti/nuttxspace5/nuttx-apps/netutils/dhcpd/dhcpd.c: In
function 'dhcpd_allocipaddr':
/home/fdcavalcanti/nuttxspace5/nuttx-apps/netutils/dhcpd/dhcpd.c:519:4:
warning: #warning "FIXME: Should check if anything responds to an ARP request
or ping" [-Wcpp]
519 | # warning "FIXME: Should check if anything responds to an ARP
request or ping"
| ^~~~~~~
/home/fdcavalcanti/nuttxspace5/nuttx-apps/netutils/dhcpd/dhcpd.c:520:4:
warning: #warning " to verify that there is no other user of this IP
address" [-Wcpp]
520 | # warning " to verify that there is no other user of this IP
address"
| ^~~~~~~
[1779/1779] Running utility command for nuttx_post_build
-- Generate NuttX image (esptool elf2image)
esptool v5.2.0
Creating ESP32-C3 image...
Image has only RAM segments visible. ROM segments are hidden and SHA256
digest is not appended.
Merged 1 ELF section.
Successfully created ESP32-C3 image.
-- Generated: nuttx.bin
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]