Re: [Flashforth-devel] FlashForth Operator Interrupts
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2018-10-03 12:33:56
|
Hi, It seems that later versions of the XC16 compiler has introduced a bug. When I use XC16 v1.35 the interrupt vectors are only filled into the IVT, not into the AIVT. Using XC16 1.21, then both tables are filled correctly. According to the documentation the XC16 compiler should initialize both interrupt vector tables automatically. "Assembly language programmers can install interrupt handlers simply by following the standard naming conventions. Interrupt handlers declared with the standard names and defined as globals are automatically installed into the vector tables." Lyckily FlashForth has the int/ word that copies the IVT to the AIVT that can fix the situation. BR Mikael On 2018-10-02 08:50, Michael Garthe wrote: > Thanks for the Info, Ill have a dig. The compiler I am currently > using is XC16 1.35, I'll checkout 1.21 and step through both to see > where differences arise. I'll keep you posted > > Thanks, > > Michael > ------------------------- > > FROM: Mikael Nordman <mik...@fl...> > SENT: 02 October 2018 15:44 > TO: Michael Garthe > SUBJECT: Re: FlashForth Operator Interrupts > > There could also be some compiler settings that affects this > behaviour. > Or the compiler versions can behave differently. > I am using XC16 1.21. > > BR Mikael > > On 2018-10-02 07:24, Michael Garthe wrote: >> Hello Mikael, >> >> Thank you for your prompt reply, I had a look at the program memory > in >> the simulator and I tried both FF5.0 downloaded from sourceForge and >> the latest code in the GitHub repo >> https://github.com/oh2aun/flashforth. I tried all the PIC24 configs >> and none of them had the Timer 1 or UartRx interrupt stored in aivt > by >> default, however when looking through the source code again I > realised >> the int/ restores vectors to the aivt (with PAIVT defined) and > through >> calling int/ with T1 and UxRX interrupt numbers they were loaded >> successfully in the aivt. I know its not an ideal solution and I may >> look into a more permanent solution when time permits, I'll let you >> know if I figure it out. >> >> Cheers again for the reply, >> >> Michael >> >> [1] >> GitHub - oh2aun/flashforth: FlashForth development [1] >> FlashForth. FlashForth is a standalone Forth system for the > Microchip >> PIC 18, 24, 30, 33 and the Atmel Atmega series of microcontrollers. > A >> Forth system with interpreter, compiler, assembler and multitasker > is >> provided. >> github.com >> >> ------------------------- >> >> FROM: Mikael Nordman <mik...@fl...> >> SENT: 02 October 2018 01:03 >> TO: Michael Garthe >> SUBJECT: Re: FlashForth Operator Interrupts >> >> Hello Michael. >> >> The interrupts used by FlashForth (T1, U1RX, U1TX, etc.)are stored >> automatically both in the IVT and AIVT locations. >> >> If you run FF in the MLABX IDE simulator, you can see in the program >> memory view what is stored initially in the the tables. >> >> If that does not work for you, maybe you have modified something ? >> Maybe you have overwitten them in the AIVT by mistake ? >> Or maybe a bug has creeped into FF. >> >> BR Mikael >> >> On 2018-10-01 09:47, Michael Garthe wrote: >>> Hello Mikael, >>> >>> My name is Michael and I am using FlashForth for my final year >>> engineering project, I tried signing up to the mailing list and >>> posting my question there however I don't believe it ended up > making >>> it to the message board. I am doing some research into flash forth >>> under supervision of Peter Jacobs, my research is based around the >>> multi-tasking elements of the OS. One problem I have encountered >>> during my use of flashforth with the PIC24FV32K family of chips is >>> that the operator interrupts U1TX and U1RX are stored in the > primary >>> interrupt table whereas user interrupts are stored in the >> alternative >>> interrupt table, my problem arises when I try to mix the operator >> and >>> user interrupts, due to the interrupts being stored in different >>> tables I can't use both at once. I was wondering if there's a >>> parameter that needs setting before programming FlashForth on the >>> chips to place the operator interrupts into the AIVT instead of the >>> primary table, failing this I was wondering if there was an easy > way >>> to move an interrupt from one table to another or if there's an >> easy >>> way to write the operator interrupts as user interrupts, I have >> looked >>> at the source code to try and do this however I have found it quite >>> difficult, any advice or information you could give me on this > would >>> be greatly appreciated. >>> >>> Kind Reagrds, >>> >>> Michael Garthe :) >> >> -- >> -- >> Mikael >> >> >> Links: >> ------ >> [1] https://github.com/oh2aun/flashforth > > -- > -- > Mikael -- -- Mikael |