From: D N. <dny...@at...> - 2011-03-22 07:30:29
|
On 3/21/2011 2:19:15 AM, pito (pi...@vo...) wrote: > 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 platf Okay, so I've been working with a clean (unmodified) amforth build in the simulator, using this trick of loading the .hex file into a new project. Determining what's going on in a forth system is hard enough as is, when we have labels, but okay, I'll give it a go. When I tell it to run, it ends up in the weeds, executing illegal instruction ffff. As usual, it's hard to tell how it got there and as far as I know, there's no way to get studio4 to show a log or traceback. So I've been running it in autostep. Good news is it's not executing any illegal instructions, bad news is it's been running a long time, and I don't see any characters appearing at the simulated terminal (using hapsim). So my question is, does anyone know how many instructions or cycles it takes for a correctly operating amforth to send its first characters out the uart, so I can tell if it's taken too long,or just has not yet gotten that far? |