Skip to content

Fix issue where FreeRTOS viewer hints are not showing#95

Open
kennedyho-renesas wants to merge 1 commit intomcu-debug:mainfrom
kennedyho-renesas:bug/freertos-help
Open

Fix issue where FreeRTOS viewer hints are not showing#95
kennedyho-renesas wants to merge 1 commit intomcu-debug:mainfrom
kennedyho-renesas:bug/freertos-help

Conversation

@kennedyho-renesas
Copy link
Copy Markdown
Contributor

This PR aims to fix the issue where the hints in FreeRTOS view is not showing at all unless configUSE_TRACE_FACILITY (macro to enable Thread ID) is set to 1.
When configUSE_TRACE_FACILITY is set to 0, uxTCBNumber is not compiled or linked into the FW, causing thInfo['uxTCBNumber'] to be undefined.
See: https://github.com/mcu-debug/rtos-views/blob/main/src/rtos/rtos-freertos.ts#L252C17-L252C50

TypeError exception is thrown, jumping to the catch block and skipping everything else. htmlHelp remains empty which causes the hints to not be shown.
This simple change makes thInfo['uxTCBNumber'] optional so that exception will not be thrown.
Simple test result for this change is as follows, where the Thread ID hint is shown as well alongside other missing info:
image

- When configUSE_TRACE_FACILITY is 0, uxTCBNumber is not compiled causing it to be undefined.
- Make uxTCBNumber optional so it does not cause a TypeError exception, and helpHtml will not be empty.
@PhilippHaefele
Copy link
Copy Markdown
Collaborator

Hi @kennedyho-renesas

first of all thanks for contributing and directly helping us out here.

Can you please state the FreeRTOS version you used for testing?

Best regards
Philipp

@kennedyho-renesas
Copy link
Copy Markdown
Contributor Author

Hi @PhilippHaefele

Thank you for the response.
Sorry for the lack of information, the test was done with FreeRTOS v11.1.0 that is bundled with Renesas FSP v6.2.0.

Thanks, and regards,
Kennedy

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