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

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   From Xiaomi Vela, split out of #22206 as asked in its review.
   
   **cmake: fix section not take effect**: the CMake build passed 
`SEGGER_RTT_SECTION` and `SEGGER_RTT_BUFFER_SECTION` as the bare section name 
(`-DSEGGER_RTT_SECTION=.bss.rtt`), which is not the string literal that 
`locate_data()` takes. They are passed as the quoted name now, and 
`IOB_SECTION` too, which used to name the Kconfig symbol.
   
   ## Impact
   
   - CMake builds with `CONFIG_SEGGER_RTT_SECTION` or 
`CONFIG_SEGGER_RTT_BUFFER_SECTION` set now build, and the RTT control block and 
buffers go to that section.
   - `IOB_SECTION`: the IOB buffer stays in the same section; only the way the 
name is passed changes.
   - The Make build is not changed.
   
   ## Testing
   
   Host: Ubuntu 22.04 x86_64, GCC 13.4.0, Arm GNU Toolchain 13.2.rel1, CMake 
3.23 + Ninja 1.10. Base: master 25b649e1c08.
   
   `./tools/checkpatch.sh -c -u -m -g HEAD~1..HEAD` passes.
   
   `mps2-an500:nsh` with `CONFIG_SYSLOG_RTT=y CONFIG_SYSLOG_MAX_CHANNELS=2 
CONFIG_SEGGER_RTT_SECTION=".bss.rtt"`: master fails to build (`<command-line>: 
error: expected expression before '.' token`); with this PR it builds and 
`SEGGER_RTT.c.o` has a `.bss.rtt` section.
   
   `sim:nsh` with `CONFIG_MM_IOB=y CONFIG_IOB_SECTION=".bss.iob"`: builds, and 
`iob_initialize.c.o` has the `.bss.iob` section.
   
   Not tested: RTT with a J-Link probe, real hardware.
   


-- 
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]

Reply via email to