jingfei195887 opened a new pull request, #21679:
URL: https://github.com/apache/nuttx/pull/21679
## Summary
`fs/CMakeLists.txt` adds the `FS_HEAPBUF_SECTION` definition before the
`fs` target is created, so configuring with `CONFIG_FS_HEAPBUF_SECTION`
set fails:
```
CMake Error at fs/CMakeLists.txt:24 (target_compile_definitions):
Cannot specify compile definitions for target "fs" which is not built by
this project.
```
The value is also passed without quotes, while `locate_data()` needs a
string literal, as the Make build provides. Add the definition after the
target is created and quote the value.
## Impact
CMake builds with `CONFIG_FS_HEAPBUF_SECTION` set now configure and
place the fs heap buffer in the requested section. Other configurations
are unchanged.
## Testing
Host: Ubuntu x86_64, gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, master
03aea78639, `sim:nsh` with
`CONFIG_FS_SHMFS=y`, `CONFIG_FS_HEAPSIZE=65536`,
`CONFIG_FS_HEAPBUF_SECTION=".fsheap"`.
- master: Make build passes, CMake configure fails with the error above.
- this PR: Make and CMake builds pass. `fs_heap.c.o` and the final
`nuttx` image contain a 0x10000-byte `.fsheap` section.
- `./tools/checkpatch.sh -g master..HEAD`: all checks pass;
`ostest` exits with status 0.
--
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]