From: pito <pi...@vo...> - 2011-03-21 08:41:34
|
from my previous post... ....By chance I found the crash is caused by the debugger - when the asm source wants to continue into a "debugger" (for the code outside the "amforth.asm") the debuger is called, but not set properly (my understanding) and crashes. Now, how it works: 1. compile amforth in AVR Studio as usuall 2. then close all projects 3. open file - e.g. amforth42_1284p.hex (MUST BE .HEX) 4. Studio offers a new project name e.g. amforth42_1284p_hex.aps - do save 5. select device and debug platform (simulator2 and 1284p) 6. finish 7. debuger opens and you will see the flash disassembled 8. then go Debug -> Up/download memory, choose EEPROM and load eeprom from file e.g. amforth42_1284p.eep, open memory watch window and select eeprom - you will see the eeprom content 9. TERMINAL - I did not find terminal in AVR Studio, so I downloaded HAPSIM for AVR Studio: download, run hapsim.exe and do file -> New Control -> Terminal, it will connect to AVR studio, you may set settings 10. Place breakpoints where you want (here you see entire flash disassembling only, so help yourself and open .lst file and navigate accordingly) when not keen on stepping via all code there 11. when you Run the debuger you will see after few seconds amforth's hello and promt in the Terminal, you may work as usual (mind the respones are several seconds) and you may step via the flash. ...... ----- PŮVODNÍ ZPRÁVA ----- Od: "D Nyberg" <dny...@at...> Komu: amf...@li... Předmět: [Amforth-devel] Difficulty with Hello World exercise Datum: 20.3.2011 - 23:30:35 > I'm having some difficulty getting started with > amforth on my target > system; I'm shaking down the entire tool chain at > once. (I'm a bit rusty > with forth generally, but used it intensively back > in the F79 days, so > I'm remembering more every day) But my target > hardware etc is all new at > this point, and I'm a bit stuck. > > My workbench pc runs XP, and I've installed the > latest AVR Studio 4 with > all 3 service packs. Attached to it is a dragon, > and my newly assembled > dragon rider kit. The dragon rider seems to have > survived smoke test, > and as far as I can tell is working correctly. > Installed in the dragon > rider is a 324P. Dragon rider also has the serial > option instralled, and > that's connected by straight-through cable to that > pc's serial port > running teraterm. > > I unpacked the amforth zip distribution and > created a project per Karl > Lunt's getting started guide. I changed only the > clock speed declaration > to match the 18.something mHz crystal supplied > with the dragon rider, > and I also set both serial directions to polled, > to simplify things for > now. I set include paths with the -I options in > Studo 4 and built the > project. All seems to have worked, and hex files > were created. > > Studio downloads and verifies the code, both flash > and eeprom regions. > Letting it run generates no OK prompt, so I've > single stepped the > project from startup, by hitting F11 a step at a > time. Control moves > through the usual init pointers type stuff, then > jumps to the inner > interpreter at DO_EXECUTE. When we get to the > ijmp instruction, the Z > register contains 0x3860, which according to the > map file is > PFA_DOLITERAL. This seems reasonable to me. But > when the ijmp > instruction executes, studio4 crashes. It does > this every time. > > I duplicated these steps on my desktop machine > (running windows 2000) > and targeted for the simulator. Everything works > the same; execution of > that ijmp instruction again has 0x3860 in Z, and > also crashes studio4. > > Surely something that simple, in a tool chain > that's been released as > long as studio4 has been out, can't be a simple > bug in avr studio > regarding the ijmp instruction. But I'm scratching > my head over this, > and have not, as a result, made much progress at > getting amforth to run > here. > > Any suggestions,please? > > > ------------------------------------------------------------------------------ > > Colocation vs. Managed Hosting > A question and answer guide to determining the > best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |