Hi @raphaelmeyer ,
First of all, thank you very much for your contribution on the ThreadX support in RTOS Views, it has been incredibly useful and greatly benefits all ThreadX users.
While testing ThreadX detection in RTOS Views, I have noticed that tryDetect() looks for the following 4 mandatory symbols (all 4 need to exist at the same time) for ThreadX detection to be valid.
_tx_thread_created_count
_tx_semaphore_created_count
_tx_mutex_created_count
_tx_byte_pool_created_count
Reference: https://github.com/mcu-debug/rtos-views/blob/61ecf956b574f06f41964d0b7f8a113ddd71ec2b/src/rtos/rtos-threadx.ts#L158C1-L184C19
This seems to work fine for ThreadX applications that use all the 4 ThreadX objects.
However, for minimal or size-optimized ThreadX applications that do not create 1 or more of these objects, ThreadX is not detected.
For example, if the application does not create a mutex by calling tx_mutex_create(), the linker typically omits the mutex module entirely, which causes the _tx_mutex_created_count to not be included in the image. In this case, ThreadX detection will fail for RTOS Views even though the application is running ThreadX.
My questions regarding this would be:
- Is there a specific technical reason or design intent behind requiring all 4 symbols to be present for a ThreadX detection to be valid?
- Would it be possible to relax the rules for ThreadX detection, such that only
_tx_thread_created_count is mandatory, and making other symbols for semaphore, mutex and byte pool symbols optional (opt for getVarIfEmpty set to true for example) so that minimal or size-optimized ThreadX applications can still be detected?
Please let me know your insights regarding this, and thank you once again for your contribution.
Best regards,
Kennedy
Hi @raphaelmeyer ,
First of all, thank you very much for your contribution on the ThreadX support in RTOS Views, it has been incredibly useful and greatly benefits all ThreadX users.
While testing ThreadX detection in RTOS Views, I have noticed that
tryDetect()looks for the following 4 mandatory symbols (all 4 need to exist at the same time) for ThreadX detection to be valid._tx_thread_created_count_tx_semaphore_created_count_tx_mutex_created_count_tx_byte_pool_created_countReference: https://github.com/mcu-debug/rtos-views/blob/61ecf956b574f06f41964d0b7f8a113ddd71ec2b/src/rtos/rtos-threadx.ts#L158C1-L184C19
This seems to work fine for ThreadX applications that use all the 4 ThreadX objects.
However, for minimal or size-optimized ThreadX applications that do not create 1 or more of these objects, ThreadX is not detected.
For example, if the application does not create a mutex by calling
tx_mutex_create(), the linker typically omits the mutex module entirely, which causes the_tx_mutex_created_countto not be included in the image. In this case, ThreadX detection will fail for RTOS Views even though the application is running ThreadX.My questions regarding this would be:
_tx_thread_created_countis mandatory, and making other symbols for semaphore, mutex and byte pool symbols optional (optforgetVarIfEmptyset totruefor example) so that minimal or size-optimized ThreadX applications can still be detected?Please let me know your insights regarding this, and thank you once again for your contribution.
Best regards,
Kennedy