Compiling FlashForth 3.8 ------------------------ FlashForth 3.8 (FF) can be compiled with the USB library and without. FF may also be compiled for installation via a device programmer (PicKit2) or a bootloader. The bootloadable FF has been tested with the PICDEM FS USB Demo tool bootloader available from MicroChip. The common configuration parameters are in p18f-main.cfg. The configuration bits and the USB definitions are in the device specific configuration files. UART mode --------- For operation with the UART as the OPERATOR interface, define a MPLAB project which compiles ff18_usb.asm. Undefine USB_CDC in the configuration file. If you use a device programmer, use the FF_0000.lkr file and define CONFIG_RESET 0x0000 in p18f-main.cfg. If you use a bootloader, use the FF_0800.lkr file and define CONFIG_RESET 0x0800 in p18f-main.cfg. USB mode -------- For operation with the USB CDC serial emulation as the OPERATOR interface, define a MPLAB project which compiles ff18_usb.asm and P18F_USB_REG.asm and links FF_USB_xxxx.lib Define USB_CDC in the configuration file. p18f14k50.cfg, p18f2455-2550-4455-4550.cfg, p18f2458-2553-4458-4553.cfg. If you use a device programmer, use the FF_USB_0000.lkr file and define CONFIG_RESET 0x0000 in p18f-main.cfg. If you use a bootloader, use the FF_USB_0800.lkr file and define CONFIG_RESET 0x0800 in p18f-main.cfg. PIC18F14K50 has its own linker file for the USB mode. The result of the compilation is a HEX file which can then be moved to the target processor, either via a device programmer or a bootloader. NOTE : The USB VID and PID and the INF file provided with FlashForth are purely for test purposes and for personal use. Compilation with GPUTILS ------------------------ For the UART version: gpasm -c -p p18f2455 ff18_usb.asm gplink -s FF_0000.lkr -m -o ff18_usb ff18_usb.o For the USB version: gpasm -c p18f2455 ff18_usb.asm gpasm -c p18f2455 P18F_USB_REG.asm The link step does not work. FF_USB_xxxx.lib generated by mplib is not understood by gplink. gplink -s FF_USB_0000.lkr -m -o ff18_usb ff18_usb.o P18F_USB_REG.o FF_USB_xxxx.lib