From Swordfish Wiki

SwordfishUser: ConfigGenerator

The ConfigGen utility can be used as an aid in setting the device configuration register settings.

The utility is installed as an IDE plugin (IDE menu 'Plugin | ConfigGenerator'), but can also be run as a standalone program outside the IDE (Swordfish Plugin\ConfigGen\ConfigGen.exe).

Config Generator Software

The software uses the MPASMX '8bit_device.info' file as the source of its information.

The first time you run the program make sure the MPASMX folder setting is pointing to the Swordfish\Bin folder. This should default to the Swordfish installation directory found in the system registry, ie 'Swordfish\bin'. If it is not, use the Change Folder... button to point to the location of the Swordfish copy of the MPASMX '8bit_device.info' file. Click the Load File button. This will open the .info file and build a list of all PIC18 devices contained in it.

Select your desired device from the Device dropdown list and it should display all of the config entries and their default settings.

Clicking the Setting column for a config entry will show a drop-down list with all of the valid selections for that function.

When all config settings have been made, click the Generate button and the program will generate source code with all of your selections (unchecking the Comments box will remove the descriptions and just leave the settings, if desired).

Selecting Copy to Clipboard will dump the output window contents into the Windows clipboard, which you can then paste into your main program file using a text editor or the Swordfish IDE using 'Edit | Paste' (or Ctrl-V).

You should place the config section at the beginning of your main program before any 'include' statements. That way, the defaults set in the config section can be overridden by any modules included after it... config entries are processed such that the last config setting seen is the one used. Note that this may also override any defaults setup in the device .bas file, so you should check the resulting .asm file output after you compile to ensure your settings are correct (the CONFIG section is at the very end). This will also allow you to see if any settings were overridden by other include files, such as intosc.bas.

The Set Defaults button will change all the settings back to the defaults provided in the .info file, with the exception of 'XINST', 'WDT/WDTE/WDTEN', 'DEBUG', 'JTAGEN', 'MVECEN', and 'IOL1WAY/PPS1WAY' (if present for the selected device). The program always sets these off by default, unless the Use .info Defaults checkbox is enabled in which case it will use the default settings found in the file.

Retrieved from https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.ConfigGenerator
Page last modified on March 25, 2023, at 02:28 PM