Re: [Mspgcc-users] Writing an ISR in pure assembly

2013-12-11 Thread Peter Bigot
See https://github.com/pabigot/freertos-mspgcc for FreeRTOS using MSPGCC as of mid 2012. The use of naked is in Source/portable/GCC/MSP430, but does not apply to the timer ISR itself. It was not necessary to use external assembly sources. http://pabigot.github.io/bsp430/freertos_8h.html may

Re: [Mspgcc-users] Writing an ISR in pure assembly

2013-12-11 Thread Wayne Uroda
Even though I think it is sorted now, I still wonder (for my own knowledge and completeness) if there is a way to either override just one of the vector positions (or is there a magic name that given to the function accomplishes the same thing) or is there a way to override all of the vector

Re: [Mspgcc-users] Writing an ISR in pure assembly

2013-12-11 Thread Peter Bigot
Yes, the interrupt attribute causes the function to be named __isr_X where X is the word offset of the interrupt from the vector table start (viz., the value of the attribute's parameter divided by two). Those symbols are used to initialize the vector table in crt0ivtbl.o. Thus, if you're using

[Mspgcc-users] Writing an ISR in pure assembly

2013-12-10 Thread Wayne Uroda
Hello, I am trying to port FreeRTOS to the MSP430F5519. In order to write the context switching part, I need to write a timer interrupt service routine in pure assembly (the compiler right now is doing some extra push before I can do anything in the ISR, even with nothing in the body...) How

Re: [Mspgcc-users] Writing an ISR in pure assembly

2013-12-10 Thread Hynek Sladky
Hi Wayne, have You tried __attribute__ ((naked)) ? This makes function without any push/pop... just return. Inside body use asm ( ... ); Hynek Dne 11.12.2013 4:48, Wayne Uroda napsal(a): Hello, I am trying to port FreeRTOS to the MSP430F5519. In order to write the context switching part,

Re: [Mspgcc-users] Writing an ISR in pure assembly

2013-12-10 Thread Wayne Uroda
Yes I've tried it, however on an interrupt function it seems to only do half the job! Found something that works, putting a single branch in the ISR to a naked function. At least it seems to work for now, who knows when the compiler will decide to insert a push before my branch and break it