include/debug.h: Move to include/nuttx/debug.h#18660
include/debug.h: Move to include/nuttx/debug.h#18660PiyushPatle26 wants to merge 1 commit intoapache:masterfrom
Conversation
arch/arm/src/arm/arm_prefetchabort.c
Outdated
| #include <stdint.h> | ||
| #include <assert.h> | ||
| #include <debug.h> | ||
| #include <nuttx/debug.h> |
There was a problem hiding this comment.
could you use script or AI to make nuttx/xxx.h in the same group, e.g.:
#include <stdint.h>
#include <assert.h>
#include <nuttx/debug.h>
#include <nuttx/irq.h>
9921de7 to
968b6ed
Compare
|
@xiaoxiang781216 I have done the change you asked for! Can you help me with the CI |
|
Please test by enabling the debug features in Kconfig. |
debug.h is a NuttX-specific, non-POSIX header. Placing it in the top-level include/ directory creates naming conflicts with external projects that define their own debug.h. This commit moves the canonical header to include/nuttx/debug.h, following the NuttX convention for non-POSIX/non-standard headers, and updates all in-tree references. A backward-compatibility shim is left at include/debug.h that emits a deprecation #warning and re-includes <nuttx/debug.h>, allowing out-of-tree code to continue building while migrating. Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
968b6ed to
df05041
Compare
|
@linguini1 I ran as you asked, I received a bunch of warnings: Now , I have removed the unconditional deprecation #warning from include/debug.h |
|
Doesn't the warning indicate that you haven't migrated all places to use the new header location? |
No |
@linguini1 I think the warning is from checkpatch on the modified files, not from a scan of remaining #include <debug.h> usages. |
No, the warnings you pasted in your last comment are from compilation. If I understand correctly, this warning is inside the legacy debug.h header you kept for backwards compatibility? So if it's appearing, it means that header is still getting included somewhere. One inclusion is in nsh_console.c. Maybe you can open a twin PR to nuttx-apps to replace the includes there too |
|
@linguini1 I’ve already submitted the PR for nuttx_apps. Regarding the warnings, you’re right. My understanding is that the CI is failing because it checks against the current master of nuttx_apps, which doesn’t yet include the corresponding changes. |
My bad, didn't realize! Could you please link to it in the description of this PR?
Hmmm, usually warnings do not cause CI to fail, but I'm on mobile right now so I can't check to give a reason. |
|
@linguini1 I have updated the description |
Note: Please adhere to Contributing Guidelines.
Summary
Move the NuttX-specific
debug.hheader from the top-levelinclude/directory to
include/nuttx/debug.h, and update in-tree includes to use the new path.debug.his not a POSIX or standard C header. Keeping it at the top levelcreates avoidable naming conflicts with external projects that also provide a
debug.h. Moving it underinclude/nuttx/aligns it with NuttX conventions for non-standard headers.A backward-compatibility shim is left at
include/debug.hthat emits a deprecation#warningand re-includes
<nuttx/debug.h>, allowing out-of-tree code to continue building while migrating.Impact
include/nuttx/debug.h.<nuttx/debug.h>.<debug.h>.Other PR for nuttx_apps
Testing
Tested on Ubuntu Linux in the local NuttX tree.
Host:
Target:
Test application:
ostestI have also tested with
sim:nshconfiguration:Test logs

No board runtime testing was performed because this change is a mechanical
header relocation and include-path update.
Fixes #8986