I was able to convert the tx_initialize_low_level.S threadx startup file from Assembly to C for my personal project Link here.
After going through the entire process I have a few questions to ask
- The C version of the code is around 32 bytes smaller than the Assembly version of the same (when compiling with Os). Is there any reason/caveats for using Assembly over C or vice versa?
- This is assuming that my above conversion is fine in the long run. Currently, I have only tested threadx tasks and that seems to work fine. Would it be possible to review this file and provide any comments here if there are some considerations to be made?
- I noticed that there are certain handler functions that are being declared but I cannot find their usage anywhere. Why have they been defined?
__tx_IntHandler
__tx_SysTickHandler however SysTick_Handler (which runs the same chunk of code) is used since it overrides the weak linkage of the startup function.
__tx_BadHandler
__tx_HardfaultHandler
__tx_SVCallHandler
__tx_NMIHandler
__tx_DBGHandler
Currently, I haven't tried to make too many changes to the C version of the tx_initialize_low_level and have translated it from assembly to C as closely as possible.
Any pointers or clarification to the above questions would be great!
I was able to convert the
tx_initialize_low_level.Sthreadx startup file from Assembly to C for my personal project Link here.After going through the entire process I have a few questions to ask
__tx_IntHandler__tx_SysTickHandlerhoweverSysTick_Handler(which runs the same chunk of code) is used since it overrides the weak linkage of the startup function.__tx_BadHandler__tx_HardfaultHandler__tx_SVCallHandler__tx_NMIHandler__tx_DBGHandlerCurrently, I haven't tried to make too many changes to the C version of the
tx_initialize_low_leveland have translated it from assembly to C as closely as possible.Any pointers or clarification to the above questions would be great!