Version

This page documents changes and update to the Swordfish compiler

Device BETA

You can download device files for the new K series microcontroller from here

Please note that these files are BETA and have not as yet been tested on actual silicon. Just unzip the files and place in your compiler includes folder. For example

 c:\program files\mecanique\swordfish\includes    <- full version
 c:\program files\mecanique\swordfishSE\includes  <- special edition version

If you have access to these new devices, please post your findings or observations on the Swordfish forum. You might also want to take a look at the k series migration document which can be found here.

1st October 2008 - 2.1.0.1

  • FIX - Problem with 16 bit signed multiply. This should now work OK.

18th June 2008 - 2.1.0.0

  • NEW - ICD and simulation support through COFF file generation. See here for more information on using ICD in MPLAB.
  • NEW - Optimised bit assignments when passed by reference
  • NEW - Added support for ORG_RESET and ORG_PROGRAM
  • NEW - Added VECTOR_ISR_LO and VECTOR_ISR_HI to enable remapping of interrupt vectors
  • NEW - Intermediate Debug File (IDF). Generates *.idf (intermediate debug file).
  • NEW - Changed select...case to support 'expression' rather than just 'constant expression'
  • NEW - If config wdt = off, clearWDT code for system calls (Delayms etc) is linked in if #option WDT = true
  • NEW - You can now associate a *.sfp file with the IDE, which will open the *.bas file named in the project file. Alternatively, you can drag and drop into the IDE
  • FIX - Problem assigning a constant to a float array. This should now work OK.
  • FIX - Passing structure elements that had been passed by reference not working correctly. This should now work OK.
  • FIX - Problems with constant string arrays if the length of each string, including null terminator, is an odd number AND the program accesses one of the string elements using a constant index, for example, Val = ConString(1). This should now work OK...
  • FIX - Problem with "M-1" error not found. This should now work OK.
  • FIX - Problem when passing certain types of boolean expressions by value to a sub or function. For example, Items(Index).Enabled. This should now work OK.
  • FIX - SAVE...RESTORE system allocation problem. This should now work OK.
  • FIX - Problem with bound() generating wrong code for constant arrays. This should now work OK.
  • FIX - Changes made in optimising explorer broke node sorting when expanding. This should now work OK.
  • FIX - Move#II_2424 error. This should now work OK.
  • FIX - Corrected compile exception for expression such as AddressOf(a + 1)
  • FIX - Code generation error for booleans where variable is on both left and right hand side. For example, a = a or b. This should now work OK.
  • FIX - Problem with @ when passing by reference. This should now work OK
  • FIX - Strings getting optimised away for expressions such as txt(0) = txt(1). This should now work OK.
  • FIX - Problem with expressions such as "A" = Str when used in boolean expressions such as "IF "A" = Str OR..." This should now work OK.
  • FIX - Problem with bit expressions when passed by reference. This should now work OK.

Device Support

  • FIX - Access RAM incorrectly set at $80 for 18F4450 and 18F2450. This now corrected

Modules

You should view the module source for information regarding changes and fixes.

  • Updated USBSystem.bas and USBDefs.bas to synchronise with Microchip firmware version 1.3. 18F2450 and 18F4450 USB now working correctly.
  • Updated Convert.bas to workaround ISIS bug
  • Updated USART and USART2 modules to account for Microchip silicon error
  • Updated SUART module
  • Updated Graphics.bas
  • Updated FixedFont.bas

2nd October 2007 - 2.0.2.0

Compiler and IDE

  • NEW - Optimised code for Input(), Output(), High(), Low() and Toggle() for ports passed by reference.
  • NEW - Allow register 'AsChar'.
  • NEW - Added union keyword
  • NEW - Added new pre-compiler function defined()
  • NEW - Allows '0' (nil) to be passed by reference.
  • NEW - Can now calculate constant string address, for example @"hello"
  • NEW - Can obtain address of structure variables when held in an array. For example, @Nodes(Index).Val
  • FIX - Problems with expressions such as MySub(Array(Index).Value - 10) not generating the correct code. This should now work OK.
  • FIX -Pre-processor generating error for include file when contained in a block that is disabled. This should now work OK.
  • FIX - Problem with expressions such as Value = NOT BitOf(PORT). This should now work OK
  • FIX - Problem assigning constant arrays with element 1, 2 or 4. This should now work OK.
  • FIX - Added check against errors to prevent exception being generated when trying to generate intermediate code **very rare situation** but noted on the forum
  • FIX - constant expressions such as QUOTE_CONST + "Hello" was removing the single quote - this should now work OK.
  • FIX - Problems with expression such as Val = NOT CValue where CValue declared as CValue as byte = 1. Negation was being performed on a single bit rather than 8. This should now work OK
  • FIX - Problems with expressions such as Str = CStr(Index) + " " where CSTR is a constant arrays of strings. This should now work OK.

14th August 2007 - 2.0.1.0

Compiler and IDE

  • NEW - Support for 32 bit code address (using @). Note that the compiler still uses 16 bits when passing by reference.
  • NEW - Users can now assign shortcuts to plugins. Right click on the toolbar area and select 'Customise Plugins...'
  • NEW - Support for _ProjectVersion, _ProjectVersionStr, _CompilerVersion and _CompilerVersionStr
  • NEW - Support for const dereferencing in declarations, for example, const Value = USART.br19200
  • NEW - Support for arrays of events
  • NEW - Support for array types. For example, TYPE TArray(10) = byte
  • NEW - Typed array parameters (byref pArray() as TArray) do not now use runtime passing of bounds and string bounds
  • NEW - Support for WITH statement
  • NEW - If 'an included' file is equal to the source program filename, then the compiler does not try and link it in and continues searching library folders
  • NEW - Added support for 'prototypes', allowing forward declarations.
  • NEW - Support for plugin get includes.
  • FIX - EEPROM errors not jumping to the correct module. This should now work OK.
  • FIX - Exception being generated when calculating address of sub. This should now work OK.
  • FIX - Error when passing an array element of TEvent to TEvent param. This should now work OK.
  • FIX - Duplicate 'end proc' label generation error. This should now work OK.
  • FIX - Inc and Dec not working correctly when value passed by reference. This should now work OK.
  • FIX - Problem with for loop corrupting stack. This should now work OK.
  • FIX - Array of event and word generating error for overloaded routines. This should now work OK.
  • FIX - Explorer window prevents a single prototype item being displayed as 'overloaded'. This should now work OK.
  • FIX - Problem passing event pointers to subs and functions. This should now work OK.
  • FIX - Expression such as 'const minimum = @SB_SV7' creating exception - this should now work OK.
  • FIX - Problem with expression such as Result = Str(0) + Str(1) generating an error - this should now work OK.
  • FIX - Type Value = string(n) where error was being generated for dimensioned strings. This should now work OK.
  • FIX - Calculation for bit array size was incorrect when passing byref. This should now work OK.
  • FIX - Previous for next loop was executing when 'count' was decremented elsewhere, giving a 'list out of bounds'. This should now work OK.

Additional Device Support

18F1230, 18F1330, 18F2423, 18F2458, 18F2523, 18F2553, 18F2685, 18F4423, 18F4458, 18F4523, 18F4553, 18F4682, 18F63J11, 18F63J90, 18F64J11, 18F64J90, 18F65J11, 18F65J50, 18F65J90, 18F66J11, 18F66J16, 18F66J50, 18F66J55, 18F66J60, 18F66J65, 18F67J11, 18F67J50, 18F67J60, 18F83J11, 18F83J90, 18F84J11, 18F84J90, 18F85J11, 18F85J50, 18F85J90, 18F86J11, 18F86J16, 18F86J50, 18F86J55, 18F86J60, 18F86J65, 18F87J11, 18F87J50, 18F87J60, 18F96J60, 18F96J65 and 18F97J60

Modules

You should view the module source for information regarding changes and fixes.

  • Changes to fonts and S1D15G00 driver to support new x font format.
  • Updated LCD.bas
  • Updated SPI.bas and SPI2.bas
  • Updated USART.bas and USART2.bas
  • Updated SUART.bas
  • Added Project.bas