Release notes for SAM7 FORTH VER 1.8x


Release notes for SAM7 FORTH VER 1.8x

Embed EMFORTH today and increase the world wide user base by up to 33 percent.

The zip file is in this gallery.

EX256 build.

This release is aimed at SAM7-EX256 users who want to use their colour Nokia colour LCD displays in forth. My displays have epson controllers. These displays usually have green connectors. If you have a philips controller my code definitely will not work. Philips based display usually have brown connectors.

Generic build.

There is also a generic build GEN182.bin which has no LCD or LED support and runs on the ex256, MT256 and H256 boards. Using the source provided and emserver it is possible to rebuild forth for all boards. There is a minor glitch for H256.
I doubt anyone will do a h256 build but if you do add the line "0 CONSTANT INITPER" to the GENERIC.DEF file.

There are also variations between batches of epson based displays. Some support 8 bit mode (mine don't) some have a two bytes per pixel mode (mine don't). In particular single pixel writes (as used by the line drawing code) may not work properly on some displays.


For the ex256 if you burn the EX182.bin binary into flash using samba and set the right fuses and jumpers to execute the program in flash it should boot up on reset. It should light the LCD backlight and drawn the splash screen onto the display.
After that the backlight will blink as the board waits for a serial connection.

You can connect in two ways.

Dumb mode.

The simplest way to use EMFORTH is using a serial terminal such as hyperterminal. EMFORTH will send alternating plain text and emserver protocol packets to the serial line. Just hitting a terminal key will put forth into terminal mode.
The access the PC disk files you must use emserver but terminal mode is useful for simple programs and testing.
You can't rebuild forth in this mode but you can drag and drop source into hyper terminal or dump a text file.

There is no handshaking or buffering so to compile using a terminal you must insert a time delay between lines.
Terminal settings are 115Kbaud 8 data 1 stop no parity or handshake.

Emserver mode.

If emforth can successfully ping the serial server it will enter emserver client mode. The server is a very old program and is fairly crude. It needs rewriting but this isn't going to happen any time soon.

The port to sharpdevelop has been shelved because if appears mono-develop is being ported to windows and this should provide a multi-platform IDE at last.

The server is a console (dos) program which requires real serial ports (not USB adapters).

The reason to use the server is to be able to compile files from disk with nested include files.

If everything is set up properly rebuilding forth becomes trivial but process can easily be broken as well.

The working directory for emserver has to point to the source directory (called system in this case). I do this by making a emserver shortcut and editing the properties.

The root source file for doing a rebuild is called arm.fth. At the top of the file you have to set the PCB type and whether you want nokia support. Just look at the file and you should be able to figure it out.

If you boot one of the builds I supplied you can do a rebuild by simply typing "SOURCE ARM.FTH" (without the quotes).
It should build, relocate and build the extras automatically.
A few hints are also printed.

The new build runs in ram. You can copy it to FLASH so it runs next time the board is booted but even then the forth will be copied to ram and run in ram.

You can create a version which executes mostly in FLASH by compiling the file "toflash.fth" ie "SOURCE TOFLASH.FTH".
You will again need to use MIRROR1 to commit this to flash. The kernel was already moved to the second 64K block of flash but MIRROR1 copies stuff which has to be setup at the bottom of memory.

There is one major "gotcha" with all this.

This is that if you compile a "ram" version of forth with nokia support there isn't enough room to build the new kernel in ram. There are at least two easy ways around this. The first is to relocate it to run in flash to free up ram. The second and easiest is the type "EMPTYLCD" to free up the ram used for the LCD driver.

Note1 - display brightness/contrast.

This code works with both my original SAM7-ex256 and replacement (sparkfun) display. However the contrast settings are quite different and the old display is too light and washed out using this build. To make it easy to fix without rebuiding I've put the main voltage control parameter in a variable which can be changed from the interpreter command line. The variable is LCDV1 and set to hex 28 in the zipped binary.
For older displays try setting it to 1F ie type "HEX 1F LCDV1 !"
Test it by typing SPLASH - if it looks ok you can copy the ram image back to flash by typing MIRROR1.


Created by eddie. Last Modification: Saturday 23 of May, 2009 16:12:54 AEST by eddie.

Main Index

Switch Theme


eddie, 11:29 AEST, Sat 22 of Jun, 2024: Offline wiki repair is mostly done. It is running on tiki-27-alpha
eddie, 18:14 AEST, Sun 12 of May, 2024: Phase one of wiki repair is to upgrade to V22 (the last version with image galleries). All 150 images in the wiki-up directory are broken and need manual wiki page repairs.
admin2, 19:45 AEST, Sun 28 of Apr, 2024: Tested tiki 26.2 on a raspberry pi. Tiki 26 does not support image galleries so I have to try again after migrating images to file galleries.
eddie, 13:04 AEST, Thu 10 of Aug, 2023: Offline tiki 26 upgrade went badly. Waiting for 26.1. Will limp on.
System Administrator, 18:45 AEST, Wed 26 of Jul, 2023: Recovered from lockout but unable to upgrade to V24

Last-Visited Pages

Online Users

7 online users