Skip to content

Added DEBUG_PRINT()#13

Merged
bjackson312006 merged 3 commits into
mainfrom
logs
Jul 10, 2025
Merged

Added DEBUG_PRINT()#13
bjackson312006 merged 3 commits into
mainfrom
logs

Conversation

@bjackson312006

Copy link
Copy Markdown
Collaborator

Added DEBUG_PRINT(), which adds file/function name information to the start of debug printfs. Also, replaced all printfs in the application code with DEBUG_PRINT().

@bjackson312006
bjackson312006 requested a review from Copilot July 10, 2025 17:54
@bjackson312006 bjackson312006 self-assigned this Jul 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new DEBUG_PRINT() macro that automatically prefixes debug messages with file and function names, and replaces all existing printf calls in application code with DEBUG_PRINT().

  • Added debug macros (including __FILENAME__ and DEBUG_PRINT) in u_config.h
  • Updated printf usages across threads, state machine, queues, and Ethernet modules
  • Included u_config.h in u_ethernet.c to enable DEBUG_PRINT

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Core/Inc/u_config.h Added includes and debug-print macros
Core/Src/u_threads.c Switched printf to DEBUG_PRINT in thread functions
Core/Src/u_statemachine.c Switched printf to DEBUG_PRINT in state-machine
Core/Src/u_queues.c Switched printf to DEBUG_PRINT in queue functions
Core/Src/u_ethernet.c Included u_config.h and replaced printf in Ethernet

Comment thread Core/Src/u_statemachine.c Outdated
Comment thread Core/Src/u_ethernet.c Outdated
Comment thread Core/Src/u_ethernet.c Outdated
Comment thread Core/Inc/u_config.h
Comment thread Core/Inc/u_config.h Outdated
@bjackson312006
bjackson312006 merged commit e34dcf9 into main Jul 10, 2025
1 check passed
@bjackson312006
bjackson312006 deleted the logs branch July 10, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants