Skip to content

Minor improvements for ThreadX detection#93

Merged
haneefdm merged 1 commit intomcu-debug:mainfrom
kennedyho-renesas:improvement/threadx-detection
Mar 9, 2026
Merged

Minor improvements for ThreadX detection#93
haneefdm merged 1 commit intomcu-debug:mainfrom
kennedyho-renesas:improvement/threadx-detection

Conversation

@kennedyho-renesas
Copy link
Copy Markdown
Contributor

@kennedyho-renesas kennedyho-renesas commented Mar 3, 2026

This PR makes a minor change to how ThreadX is being detected.

The following table shows the before and after of the change.

Detect symbol Before After
_tx_thread_created_count mandatory mandatory
_tx_semaphore_created_count mandatory optional
_tx_mutex_created_count mandatory optional
_tx_byte_pool_created_count mandatory optional

Before the change, if a FW or application does not create any one of the objects (mutex, semaphore, byte pool), ThreadX will not be detected.
After the change, ThreadX can be detected, and for the tab where the object is not being created, it is shown as an empty tab as follows:
image

This is more of an initial improvement and can be improved further in the near future to include text indication or help, so that users know why the tab is empty.

@kennedyho-renesas
Copy link
Copy Markdown
Contributor Author

kennedyho-renesas commented Mar 9, 2026

I have updated the PR to include the following:

  • Help text in empty tabs to indicate objects unavailable (not compiled or linked) or not created (0 found).
  • Added number of objects indicator in each tab's title, replicating what is done in FreeRTOS.

See the following screenshots for the changes mentioned:

  1. When a _tx_*_created_count symbol is missing, object not compiled/linked
image
  1. When the object is available, but the object length is 0, none created by the user yet
image
  1. For threads, the help message is slightly different to match what is done in FreeRTOS (similar). When debug session just started, RTOS is likely to be initialized yet, hence this is emphasized in the Threads tab.
image
  1. Created dummy threads to check if the number of objects (length) indicator on the tab's title is accurate
image

@kennedyho-renesas kennedyho-renesas marked this pull request as ready for review March 9, 2026 08:05
- Make _tx_semaphore_created_count, _tx_mutex_created_count and _tx_byte_pool_created_count optional in tryDetect() so that minimal ThreadX applications without all the objects can be detected.
- Added number of objects indicator to tab title, similar to FreeRTOS.
- Added help/guide text in empty tabs when objects are not found or symbols missing.
@kennedyho-renesas kennedyho-renesas force-pushed the improvement/threadx-detection branch from 7016e1b to 38ceac6 Compare March 9, 2026 10:22
@haneefdm haneefdm merged commit 27ed2ab into mcu-debug:main Mar 9, 2026
3 checks passed
@haneefdm
Copy link
Copy Markdown
Contributor

haneefdm commented Mar 9, 2026

Thanks @kennedyho-renesas

@kennedyho-renesas kennedyho-renesas changed the title Minor improvement for ThreadX detection Minor improvements for ThreadX detection Mar 10, 2026
@raphaelmeyer
Copy link
Copy Markdown
Contributor

Thanks @kennedyho-renesas for this really nice improvement!

@kennedyho-renesas kennedyho-renesas deleted the improvement/threadx-detection branch March 10, 2026 07:27
@kennedyho-renesas
Copy link
Copy Markdown
Contributor Author

@raphaelmeyer thank you for letting me contribute!
Just wanted to say sorry for the messy formatting. I've just learnt about the Prettier extension from your latest commit. I will be installing and using it going forward :)
Cheers!

@raphaelmeyer
Copy link
Copy Markdown
Contributor

Just wanted to say sorry for the messy formatting.

No need to worry. The project is anyway not set up to enforce it.

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.

3 participants