Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Assign asm code to ISR vector in C

$
0
0

I have a small co-operative kernel written in asm for MSP430. (I did look at SYS/BIOS but it is too big and complicated by a factor of 10, and I am also not fond of wizard-generated code.) There is a scheduler tick ISR that is used for handling sleep and semaphore/barrier-take timeouts, also written in asm. I could just allocate a fixed timer resource to the OS, and bind the ISR to that interrupt vector in the standard way. If possible though, I would rather let the project BSP define a timer to use, and invoke the scheduler tick ISR for the interrupt generated by that specific timer resource. This would be more flexible and also makes it easier to set up the resource.

I was looking for something like this (pseudo-code)

    extern void os_tick_isr(void)

    vector(INT_VEC_T0) os_tick_isr;

Is there a way to cause the address of an asm block to be loaded into the appropriate interrupt vector segment, directly from C? I would strongly prefer not to have to go to the linker files.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>