Software Router für AX.25

Creating Flash Files for TNC3/4

The Problem The TNC3/TNC4 Operating System supports AM29F040 and AM29F010 flash EPROMs in 8 bit or 16 bit configurations. The TNC-OS resides in the lowest segments of the flash EPROM. The flash disk is stored in the upper segments. The flash disk image can be flashed with the command FLASH of the TNC-OS. To save RAM, TNC applications always run directly out of the Flash-EPROMs (they are not copied into RAM at program start). So their machine code must be relocated to the starting address of the program file in the flash disk. Because of the different segment sizes of the flash EPROMs, there are different relocation addresses for the programs in the flash.
A flash file (typically named "EPFLASH.ABS") containing the absolute addresses is ready made for one TNC configuration and does not work on another configuration. E.g., an EPFLASH.ABS file for TNC3 does not work on TNC31, even a EPFLASH.ABS for TNC3 with AM29F010 does not work on a TNC3 with AM29F040.

The Solution

There are several solutions to get a working TNC application for each of the mentioned configurations. In all cases a downloadable version of the application is needed. The downloadable application always contains a relocation table at the end of the executable file. This information is necessary to produce a file with absolute addresses for the flash disk. A application burned into the flash disk is relocated to an absolute address and does not contain this information any more. So copying an application out of the TNC and trying to flash it a second time will not work. Typically the program crashes with a bus error or an address error. So the first step will be to get the downloadable application files (*.APL) containing the relocation table.

Solution with flash -a

To get them into the TNC just start RS32.EXE and put the TNC in the operating system mode (prompt r:> appears) and type:

r:>flash -ea a:\*.apl

Now the files are relocated and burned into the flash disk. This can be repeated until there is no more free flash memory.

Producing Your own EPFLASH.ABS

Another technique is to produce your own EPFLASH.ABS. This is necessary if the file should be uploaded to a (X)NET using the update command. Here You will need the program WINEPF.EXE for Win32-Systems (NT, XP, 9x) or epfile for Linux.
Put all the files for the flashdisk in one directory and type

winepf -f <hex-address> -v *.*

The <hex-address> depends on the target system. The value can be taken from the following table:

Target System Bus Width Flash Type Address total flash memory
TNC31 8 bit AM29F010 208000 128KB
TNC31 8 bit AM29F040 210000 512KB
TNC3 16 bit AM29F010 208000 256KB
TNC3 16 bit AM29F040 220000 1MB
TNC4 16 bit AM29F040 820000 1MB

(The -v option simply displays some more information)

Some examples:

TNC3 with two AM29F010 Flash EPROMs
winepf -f 208000 -v *.apl *.net *.xts *.xtp

TNC31 with one AM29F040 Flash EPROM
winepf -f 210000 -v *.apl *.net *.xts *.xtp

TNC4 with two AM29F040 Flash EPROMs
winepf -f 820000 -v *.apl *.net *.xts *.xtp

WINEPF.EXE produces the file "EPFLASH.ABS" which can be uploaded to 3NET digipeaters using the update command.