I've been playing with, and building small test equipment based on Pic18F|4,2|6K22 chips running FlashForth 3.8 and 5.0 for some time now. A while back I settled in on a HEX file (Ver.FlashForth PIC18F46K22 07.06.2015) with the math extensions, assembler, vt100, and a few other things that I routinely call on included and protected from the "empty" word. This was built in MPLab-IDE 8.92 and hand edited with my trusty PICKit-3 and has served well for years.
I find myself needing to do a bit of tweaking to the ff-pic18.asm file (I need a 32-bit systick counter and access to it at the timer-interrupt level for some RT things). This probably wouldn't be a problem if I had migrated to MPLabX back when it started getting serious, but my day-job has become ARM-core intensive and I have 4 other IDE-s for various chip makers to try to keep straight...
I dug out my old MPLab and tried assembling a relatively recent release of the source (FlashForth 5 PIC18F46K22 20.03.2018). After a little futzing I got it to assemble and load. Unfortunately it just sat there restarting every 2 seconds after the TURNKEY_DELAY.
I installed MPLabX v4.15 and got a coworker who gets to program DisPIC33-s to show me how to get it to deal with a project and compiled the FF_UART.X. This compiled up fine after setting things the way I use them in the config files. Loaded, it even came to the familiar "ok<#,ram>" prompt and waited for input. Unfortunately, no matter what is input, upon pressing "enter" FlashForth does a cold restart.
I tried again after installing MPLabX v5.05 with the same results. Is there a specific version I need to use? (I remember having to find AS 4.0 to assemble FF for Arduino.) Could I be setting something wrong in a config? I'm running it at 64Mhz from the internal osc with PLL soft-control and that seems ok to USART1. I upped the Rx buffer from 32 to 64 bytes and that didn't seem to matter. I've changed the MS_TMR from 1 to 3 and back. I've ENABLEed and DISABLEed the CTRL_O_WARM_RESET, IDLE_MODE, and CPU_LOAD. Size of stacks, etc. are unchanged, UADDSIZE is still 0, and XSTORE is DISABLEed.
If I had to guess, I'ld say the inner interpreter is blowing up because it accepts RETURNS but nothing else. I haven't gotten really serious about Forth internals since re-writing FIG-Forth 6502 to run in the Apple][ language card back in the early 80-s so I'm a bit rusty at trouble-shooting this. I feel I have to get through this because I'm going to need to migrate to the K42-s or something newer as the K22-s get phased out.
Any thoughts will be appreciated.
craig bair
|