Skip to content

include/debug.h: Use <nuttx/debug.h> in apps#3443

Open
PiyushPatle26 wants to merge 1 commit intoapache:masterfrom
PiyushPatle26:include/refactor-debug-h-location-apps
Open

include/debug.h: Use <nuttx/debug.h> in apps#3443
PiyushPatle26 wants to merge 1 commit intoapache:masterfrom
PiyushPatle26:include/refactor-debug-h-location-apps

Conversation

@PiyushPatle26
Copy link
Copy Markdown

@PiyushPatle26 PiyushPatle26 commented Apr 1, 2026

Note: Please adhere to Contributing Guidelines.

Summary

Update nuttx-apps to include <nuttx/debug.h> instead of <debug.h>.

This is the apps-side follow-up to the corresponding nuttx change that moves
the NuttX-specific debug header from include/debug.h to
include/nuttx/debug.h. Since debug.h is not a POSIX or standard C header,
using the namespaced path avoids collisions with external projects that may
also define a debug.h.

This change is mechanical: it updates existing include directives across
nuttx-apps to use the new header location.

Impact

  • Aligns nuttx-apps with the new canonical debug header location in nuttx.
  • Avoids continued dependency on the deprecated top-level <debug.h> path.
  • No intended functional behavior change.
  • No board-specific or hardware-specific impact.
  • Keeps nuttx-apps compatible with the corresponding nuttx header move.

Other PR for nuttx

Testing

Validation performed on Ubuntu Linux.

Host:

  • OS: Ubuntu Linux
  • Repository: nuttx-apps

Verification:

  • Verified there are no remaining source/header includes of <debug.h> in
    nuttx-apps after the update.
  • This change is a include-path update only; no runtime behavior is
    intended to change.

Target:

  • N/A for direct runtime testing in nuttx-apps alone

Related PR
Related Issue

jerpelea
jerpelea previously approved these changes Apr 1, 2026
@PiyushPatle26
Copy link
Copy Markdown
Author

@jerpelea @linguini1 the CI failure are for <nuttx/debug.h> doesn't exist, as CI takes the current nuttx master branch for testing, Can you guys have a look and give me an update?

@linguini1
Copy link
Copy Markdown
Contributor

Yes, this PR will have to wait for the other PR to be merged.

@PiyushPatle26 PiyushPatle26 force-pushed the include/refactor-debug-h-location-apps branch from 3aa8f88 to 4f92eb3 Compare April 7, 2026 11:13
@PiyushPatle26
Copy link
Copy Markdown
Author

@xiaoxiang781216 @jerpelea the PR got merged, now we can test the CI and if no errors , merge this one too

acassis
acassis previously approved these changes Apr 7, 2026
@PiyushPatle26 PiyushPatle26 force-pushed the include/refactor-debug-h-location-apps branch from 4f92eb3 to f342b60 Compare April 7, 2026 11:30
@PiyushPatle26 PiyushPatle26 dismissed stale reviews from jerpelea and acassis via 29efdfc April 7, 2026 12:20
@PiyushPatle26 PiyushPatle26 force-pushed the include/refactor-debug-h-location-apps branch from f342b60 to 29efdfc Compare April 7, 2026 12:20
jerpelea
jerpelea previously approved these changes Apr 7, 2026
xiaoxiang781216
xiaoxiang781216 previously approved these changes Apr 8, 2026
@xiaoxiang781216
Copy link
Copy Markdown
Contributor

please fix style/spell error from:
https://github.com/apache/nuttx-apps/actions/runs/24081009841/job/70245478358?pr=3443

acassis
acassis previously approved these changes Apr 8, 2026
Replace app-side includes of <debug.h> with <nuttx/debug.h> to use the
header from the NuttX tree explicitly after the header move.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
@PiyushPatle26 PiyushPatle26 dismissed stale reviews from acassis, xiaoxiang781216, and jerpelea via 73f2f4a April 8, 2026 13:30
@PiyushPatle26 PiyushPatle26 force-pushed the include/refactor-debug-h-location-apps branch from 29efdfc to 73f2f4a Compare April 8, 2026 13:30
@cederom
Copy link
Copy Markdown
Contributor

cederom commented Apr 8, 2026

Thank you @PiyushPatle26 great work!

If you could fix the noted checks by CI it would be great :-)

You can note in the git commit message spellcheck fixes.

Do not worry about mixed case identifier issues of the libraries these need to stay like that.

@PiyushPatle26
Copy link
Copy Markdown
Author

82
/home/runner/work/nuttx-apps/nuttx-apps/apps/examples/usbserial/usbserial_main.c:138: Parma ==> Param
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/fsutils/flash_eraseall/flash_eraseall.c:74:81: error: Long line found
/home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/nxwidgets/src/cscrollingpanel.cxx:362: thisY ==> this
/home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/nxwidgets/src/cscrollingpanel.cxx:376: thisY ==> this
/home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/nxwidgets/src/cwidgetcontrol.cxx:471: doubleClick ==> double-click
/home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/nxwidgets/src/cwidgetcontrol.cxx:993: doubleClick ==> double-click
/home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/thttpd/thttpd.c:159: ths ==> the, this
/home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/thttpd/thttpd.c:166: ths ==> the, this
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:675: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:719: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:719: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:720: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:721: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:721: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:722: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:722: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:723: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/termcurses/tcurses_vt100.c:300: Ot ==> To, Of, Or, Not, It

This are the only codespell errors , I think they shouldn't be corrected as these would either alter intended quoted text or modify established identifiers rather than fix genuine spellinging mistakes.

@PiyushPatle26
Copy link
Copy Markdown
Author

@acassis @xiaoxiang781216 can you please take a look

@acassis
Copy link
Copy Markdown
Contributor

acassis commented Apr 9, 2026

@PiyushPatle26 there are a lot of files with issues (they were already, but since you are modifying them, CI will requires that you fix them)

Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:55:78: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:65:78: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:67:80: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:72:79: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:140:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:184:78: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:193:88: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:201:90: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:231:78: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:248:80: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:257:90: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:269:79: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:294:7: error: Missing whitespace after semicolon
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_events.c:294:8: error: Missing whitespace after semicolon
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/nx/nx_kbdin.c:112:91: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:601:98: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:605:7: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:616:89: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:620:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:643:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:658:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:670:85: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:674:7: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:685:86: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:689:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:694:85: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:695:85: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:696:85: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:700:97: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:704:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:714:102: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:717:106: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:723:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:733:88: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:737:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:747:113: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:751:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:761:115: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:765:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:782:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:809:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:822:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:852:80: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:856:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:878:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_initialize.c:887:3: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:96:16: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:99:16: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:115:66: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:117:32: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:120:1: error: Blank line precedes right brace at line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:156:36: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:169:80: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:175:81: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:182:83: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:183:83: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:239:80: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:245:86: error: Long line found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:329:25: error: Operator/assignment must be preceded with whitespace
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:364:7: error: Right brace must be followed by a blank line
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/graphics/tiff/tiff_utils.c:366:3: error: Right brace must be followed by a blank line
/home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/thttpd/thttpd.c:159: ths ==> the, this
/home/runner/work/nuttx-apps/nuttx-apps/apps/netutils/thttpd/thttpd.c:166: ths ==> the, this
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:94:13: error: Mixed case identifier found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:111:17: error: Mixed case identifier found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:137:16: error: Mixed case identifier found
Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:160:16: error: Mixed case identifier found
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:675: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:719: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:719: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:720: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:721: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:721: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:722: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:722: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/nxcamera/nxcamera.c:723: parm ==> param, pram, parma
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/termcurses/tcurses_vt100.c:300: Ot ==> To, Of, Or, Not, It

@PiyushPatle26
Copy link
Copy Markdown
Author

@acassis i already quoted this:

This are the only codespell errors , I think they shouldn't be corrected as these would either alter intended quoted text or modify established identifiers rather than fix genuine spellinging mistakes.

@acassis
Copy link
Copy Markdown
Contributor

acassis commented Apr 9, 2026

@acassis i already quoted this:

This are the only codespell errors , I think they shouldn't be corrected as these would either alter intended quoted text or modify established identifiers rather than fix genuine spellinging mistakes.

@PiyushPatle26 there are formatting errors as well:

error: Right brace must be followed by a blank line

I think you did a substantial change, you we touching files that weren't modified since 2018, but at least they are easy to fix, just read the error line and modify them.

Tip: enter inside apps/ and run the checkpatch.sh, start fixing from the last line to the top line, then you can run:

$ ../nuttx/tools/checkpatch.sh -f graphics/tiff/tiff_utils.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants