That's the wonderful library, and it helps me a lot in my work. I'm really interested in how the function user_code_insert_to_systick_handler()
gets injected into the user-defined SysTick_Handler()
without modifying user code.
The systick_wrapper_ual.s defines a proc $Sub$$SysTick_Handler
which calls user_code_insert_to_systick_handler()
then $Super$$SysTick_Handler
(which refers to user-define SysTick_Handler()
). After I looked at the mapping file I found $Sub$$SysTick_Handler
is inserted into the vector table instead of the user-defined SysTick_Handler()
.
This symbols containing $ and | look like black magic to me, and I couldn't find any description of it in the "Armasm User Guide." It would be helpful if could direct me to the documentation that describes this underlying machinism.