From Swordfish Wiki

SwordfishUser: SystemConvert

NOTICE (Nov 2020) This utility is currently obsolete and is under construction. It should NOT be used to generate files for SF V2.2.3.6 or later

Swordfish uses two files when compiling. An asm *.inc file (for example, P18F4520.INC) and a *.bas file (for example, an 18F4520.bas). These files need to be located in the Swordfish 'includes' folder.

NOTE: To add new devices, you can use the SystemConvert utility provided in the Tools folder of the current compiler (v2.2.3.2).

You must have the latest version of MPLABX installed. The software uses various files supplied by the Microchip assembler to try and construct the files required by the compiler. Just unzip the software and place in a folder that can be written to. The software will create two new folders called 'NewInclude' and 'NewIncludeBASIC', so it is essential you have write permissions!

Device Creation Software

Make sure the software is pointing to the MPASMX installation folder. If it is not, use the 'Change Folder' button to point to the location of the assembler. For MPLABX this is typically "C:\Program Files\Microchip\MPLABX\mpasmx". Next, press the 'Get Candidates' button. This will build a list of all files that the software thinks it can generate Swordfish device files for. Finally, press the 'Convert Files' button to start the build process.

V1.44 Options:

Selecting this option will create device files for both the 18F and 18LF families.
Selecting this will generate additional 'P18Fxxxx.bas' files that contain register bit definitions
in the form of 'public const bitname = bitno'. These files will be located in the NewIncludeBASIC folder.
Selecting this option will create device files for the 18xv core devices (Currently unsupported).
By default the program generates a log file in the NewIncludeBASIC folder that contains a listing of all the supported devices and other info. The default log file format ('_devices.txt') is a plain text file. Selecting this option will generate an additional XML formatted file ('_devices.xml') that is in a form compatible with MPLABX plugins.

The 'Copy Device List' button will take the contents of the device list window and copy it to the Windows clipboard in the form of 'device = xxxx' statements.

If all goes well, after pressing 'Convert Files' will see the two 'NewInclude' folders containing *.bas files and *.inc files. These folders will be created in the same path the program was run from. The contents of both these folders must be copied into the Swordfish 'includes' folder. For example,

  c:\program files\mecanique\swordfish\includes\18F4520.bas
  c:\program files\mecanique\swordfish\includes\P18F4520.inc

Please note that for Vista and Windows 7 users, the paths to the include files will be a little different. For example,

  c:\users\all users\mecanique\swordfish\includes\18F4520.bas
  c:\users\all users\mecanique\swordfish\includes\P18F4520.inc

You will probably also need to copy the latest version of mpasmx.exe into the Swordfish 'bin' folder, in order to assemble the new parts you have created files for. To do this, navigate to the Microchip folder specified above and copy the three files

  mpasmx.exe
  8bit_device.dll
  8bit_device.info

from the 'MPLABX/mpasmx' directory to your Swordfish\Bin directory.

Note: The last version of MPLAB released was v8.92 (which includes MPASM v5.49) and is available from the Microchip development tools archive page at http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_92.zip The download above contains files already converted for this version.

Support for the newer devices (K40, Q10, K42, etc) requires the device files from MPASMX v5.68 (MPLABX 3.35) or later. The zip file below contains the core 18F device files already converted from mpasmx 5.77 (MPLABX 4.20) It does not include the LF devices or the register bit files.

A WORD OF WARNING

  • Don't just copy all of the files to the include folder. Some of the files supplied by Swordfish have been hand edited. You don't want to break these.
  • Take a look at the files generated. Remember, they may need tweaking - refer to the datasheet. Also note that Microchip, on occasions, have the wrong information supplied in their own files!
Retrieved from https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.SystemConvert
Page last modified on November 24, 2020, at 10:36 AM