From: <ha...@hu...> - 2007-04-29 14:49:54
|
Hi Matthias, 2007/4/29, Matthias Trute <mt...@we...>: > > I am asking because my code crashes - If I leave the stack as it was > > before entering the interrupt handler, I see periodic reboots (once a > > second) when I enable the interrupt handler. > > without your code it is difficult to analyze. I take this as encouragment: : start-display ( -- ) init-display \ sets up port directions, globals 0 display-number \ display a number ['] refresh-display 11 int! \ set up interrupt handler (we're in decimal) \ Timer clock => sysclk / 256 4 TCCR0 c! \ Timer0 einschalten 1 TIMSK c! ; > > I am asking because I want to give amforth on a flashless AVR a try. > > What's a flashless AVR??? Sounds like sodium free salt ;=) It is one that uses the AVR_Core of OpenCores. I am working on a FPGA based CPU, and I need a simple controller environment in order to boot the real CPU, inspect memory and the like. I was using an 6809 until now, but I have not been able to find a Forth interpreter for that, so I had to use GCC. It worked, but having to recompile and download the debug monitor was kind of tedious. Having an interactive environment would be much preferable. BTW: For that project, I will also reanimate my "compile from ROM" idea from months ago. I got that mechanism working fine, but one thing that is kind of burdensome is the fact that, after compiling amforth I have to upload my compile-from-rom module before I can actually compile. Do you have a tool that aids in translating Forth to Assembler, or to disassemble or some such? It would not be too hard to do it by hand, but it would still require some experience which I do not have. Cheers, Hans |