I took the liberty to snip off the thread.

Hello Michael,

Michael Picco <mpi...@placerville.me> writes:

> Hello!
>
> I seem to have stumbled across an issue.
>
> First code I wrote was to blink the LED onboard.  This worked just fine.
> Then I went to add 'marker'.  Entered it line-by-line ... got the 'Ok' after
> each line.  After adding the last line (semicolon), the board froze up.  Did a
> warm boot and then executed 'words' to see what was there.  It came back with
> ?? -13 5.
>
> What came to mind is perhaps not enough memory is allocated prior to flashing
> and I'm overwriting something I shouldn't.
>
> Any ideas?

I THOUGHT marker.frt needed something else, but apparently not:

On a atmega644pa with a brand new installed amforth 6.9:

> > ver
> amforth 6.9 ATmega644P ok
> > words
> int-trap int@ int! -int +int #int irq[]# >body s>d bounds
> init-ram ee>ram #tib tib source-tib ... ok
> >

Inspecting avr8/lib/forth2012/core-ext/marker.frt
There are no '#include', no '#requires' or other unobvious things.

I loaded just marker.frt (ignore the tools, just look at the
echo of amforth-upload.py)

> $ make marker CONSOLE=/dev/ttyUSB2 
> MARKER_LIST=lib-avr8/forth2012/core-ext/marker.frt
> cat lib-avr8/forth2012/core-ext/marker.frt | unfold_fs | trim_fs > zz.tmp.fs
> amforth-upload.py  -t /dev/ttyUSB2 zz.tmp.fs
> : marker
>  ok    get-current @e dp
>  ok    create
>  ok    (marker) 0 do i @e , 2 +loop
>  ok    , ,
>  ok  does>
>  ok    (marker) 0 do dup @i i !e 1+ 2 +loop
>  ok    dup @i to dp
>  ok    1+  @i get-current !e
>  ok;
>  ok
> time:  2.2858850956  seconds
> rm -f zz.tmp.fs
Works for me(tm).

Back to the serial console:
> > words
> marker int-trap int@ int! -int +int #int irq[]# >body s>d bounds
> init-ram ee>ram #tib tib source-tib ...
> ... applturnkey postpone (marker) end-code code ... ok
> >

Note that ' (marker) ' is deeper down the wordlist.

So? 
> ?? -13 5
says: there was an error (-13) before column 5 in the input. Example:
> > 1 2 + bla
>  ?? -13 9 
> >

HOWEVER, the controller should not freeze. Sometimes it looks
like it's frozen, because the cmd loop is still in compiling
mode after ':'. So entering ';' sometimes makes the prompt
appear again.


Cheers,
Erich

>snip<-----------


-- 
May the Forth be with you ...


_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to