[PicForth] Problem with libstrings.fs and the bootloader
Alex Holden
alex at linuxhacker.org
Fri Nov 12 21:01:29 CET 2004
Alex Holden wrote:
> Using the bootloader, I get a huge amount of garbage printed out instead
> of the expected "Hello World\r\n".
OK, after disassembling a hex file read from a chip that was programmed
using the bootloader and comparing it to what was expected, I've figured
out what the problem is.
If a program doesn't include picisr.fs, picforth starts compiling words
at location 3 in the program memory. pfd.py relocates the first four
instructions to somewhere else in program memory. In my case the first
word that was compiled was flash-read, which is called by str-char. The
upshot being that first instruction of flash-read got replaced by pfd.py
with a nop.
A workaround is to include picisr.fs even if you don't need it, because
it causes words to be compiled starting at location 4 instead of
location 3. Any ideas on a better way to fix this?
--
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer
More information about the PicForth
mailing list