PF11 is an ANS Forth implementation for the 68HC11 microcontroller. PF11 program can reside in 32K of RAM, or be programmed into ROM/EPROM. Intended to either replace or coexist with the BUFFALO monitor, Forth allows both interactive use and off-line program development.
Here are some key features of "PF11":
· PF11 enables quick prototyping and interactive control of the 68HC11
· PF11 is 99% compliant with the ANS Forth specification, implementing nearly all of the words in the core, extended core, double-number, exception, programming tools, and string word sets.
· PF11 fits into less than 28K of RAM, if desired, allowing for experimentation (but not much development) in a 68HC11 system with only 32K of RAM
· PF11 can be programmed into ROM, which allows for more interesting programs when combined with 32K of RAM
· PF11 can co-exist with BUFFALO in 32K of ROM, allowing experimentation on existing BUFFALO-based hardware without giving up existing infrastructure
· PF11 is free, licensed under the terms of the GNU General Public License.
If you will not be recompiling PF11 from source, then you don't need anything. You can just download the provided S-record files (pf11ram.s19, pf11rom.s19, or pf11buffalo.s19) to your target system and start using PF11 right away. The provided S-record files have the following attributes:
· pf11ram.s19 was compiled to reside between 0x1040 and 0x7FFF in external RAM. The start address for the program is 0x1040. This is a good file to download when you just want to try things out and not have to program ROM/EPROM. It is assumed that you have 32K of RAM up to 0x7FFF and that your special function registers are located at the default address of 0x1000. Also, it is assumed that the interrupt vectors starting at 0xFFD6 are either in RAM/NVRAM or are vector addresses that point to a JMP instruction in RAM (as BUFFALO does).
· pf11rom.s19 was compiled to reside between 0x8000 to 0xB5F7 and 0xB800 to 0xFFFF in external ROM (i.e., there is a "hole" for the 68HC11 on-chip EEPROM). The start address is 0x8000, and this is programmed into the reset vector at 0xFFFE. Note that this program assumes you are burning a ROM or programming an EPROM starting at 0x8000, and that you have 32K of RAM from 0x0000 to 0x7FFF.
· pf11buffalo.s19 is just like pf11rom.s19 but additionally contains BUFFALO version 3.4 programmed from 0xE000 through 0xFFFF, and the reset vector is set to point to BUFFALO. PF11 can be started from within BUFFALO by typing 'go 8000'. As above, it is expected that you have 32K of ROM/EPROM/EEPROM from 0x8000 to 0xFFFF and 32K of RAM from 0x0000 to 0x7FFF.
If you want anything else other than what is described above, you will have to recompile PF11 from source.
The PF11 distribution also comes with pf11.elf, a file that can be loaded into the GDB 68HC11 simulator where you can try PF11 without any 68HC11 hardware. Simply type (assuming you've installed the GNU Development Chain for the 68HC11):
(gdb) target sim
(gdb) load pf11.elf
(gdb) sim cpu-config 0x0C
Note that some GDB simulator versions have bugs that prevent proper operation of PF11. If the simulator doesn't work, you can try a different version or just stick to actual hardware. Undefining PF11_INTERRUPT_SIO in the top-level config.h file prior to recompiling the source may improve things.
One final note: PF11 can be configured to reset the computer-operating-properly (COP) watchdog of the 68HC11 (if USE_COP is defined in config.h). Note, however, that this feature has not been tested. The COP watchdog can be disabled by setting the NOCOP bit (bit 2) of the CONFIG register (location 0x103F). Remember that the CONFIG register must be programmed as an EEPROM cell and does not reflect its new value until after reset.