Skip to content

Releases: fourstix/ELFC

Release 3.5.7

23 Apr 20:13

Choose a tag to compare

Release 3.5.7 fixes issues when code is compiled with smaller memory option. The option -E was renamed to -M for clarity.

Fixes

  • The %s print format works correctly with the `-M' compiler option
  • Several issues with the time library when used with the `-M' compiler option were fixed

Changes

  • The compiler name Macro was changed from __SUBC__ to __ELFC__

Compiler Option Changes

  • The -M option will cause ElfC to use smaller versions of the stdlib and stdio libraries, named elflib and elfio. The Macro __ELFIO__ will be defined when the -M option is used

Release 3.5.6

14 Apr 18:00

Choose a tag to compare

Release 3.5.6 adds support for passing structures and unions by value to a function and adds support for several POSIX functions to the string library. Two new compiler options -E and -d tree were added.

In addition to these features, several issues found during self-compiling ElfC were fixed in this release.

New Features

  • Structures and unions may be passed by value as an argument to the function.
  • A struct/union argument may be used as the return value of a function.
  • Several additional functions were added to the string library.
  • Some parameters for name length and number of arguments were increased to meet additional ANSI C89/C90 minimum translation limits.
  • An additional debug option -d tree was added to the compiler to support debugging AST trees and optimizations.
  • A walkthrough of ElfC compilation process and its output files is documented on the ELFC Internal Information page.
  • Details about the ElfC stack frame layout was documented with examples on the ELFC Internal Information page.
  • The functions in the Math32 library were converted to pass 32-bit numbers by value.
  • Smaller versions of stdlib and stdio libraries, named elflib and elfio, are available through the -E compiler option.
  • The elfstd library provides the same functions as stdlib, but uses the Elf BIOS, when possible, rather than C library code.
  • The elfio libraries provides fewer print formatting and scanning options, but are otherwise compatible with stdio and stdlib. (See the ELFC Detailed Information page for details.)
  • The ctype library was re-written to provide the same functions with smaller library code.
  • Upgraded Asm/02 to the latest version.
  • ElfC can now self-compile, but the object code files created are too large for the linker Link/02 to link and resolve.

Issues Fixed

  • MIN and MAX macros should be capitalized.
  • Array of structures falsely considered as constant.
  • Enum value failed in first case of switch statement.
  • Zero was not treated as NULL when assigned to pointer.
  • Macro preprocessor did not properly handle parenthesis inside strings and character literals.
  • Updated modpath logic to compile with ElfC.
  • Scanner did not terminate correctly after syntax error.
  • Structure pointer was not correctly de-referenced when used as argument to function.
  • ElfC could emit strings too long for Asm/02 assembler.
  • Character types cast to to int or unsigned int, now yield the expected values.
  • Fixed a bug where unsigned operations were not always propagated in arithmetic and logic expressions.
  • Fixed a bug in the elfstd library version of itoa.

Compiler Option Changes

  • The -d tree option will cause ElfC to output information about the AST tree as it compiles.
  • The -E option will cause ElfC to use smaller versions of the stdlib and stdio libraries, named elflib and elfio.

Release 3.5.0

26 Mar 19:43

Choose a tag to compare

Release 3.5 adds support for passing structures and unions by value to a function and adds support for several POSIX functions to the string library.

Structures and unions may be passed by value as an argument to the function.
A struct/union argument may be used as the return value of a function.
Several additional POSIX functions were added to the string library.
Some parameters for name length and number of arguments were increased to meet additional ANSI C89/C90 minimum translation limits.
An additional debug option was added to the compiler to support debugging the AST trees and optimizations.
A walkthrough of ElfC compilation process and its output files is documented .
Details about the ElfC stack frame layout was documented with examples.
The functions in the Math32 library were converted to pass 32-bit numbers by value.

Release 3.4.1

10 Mar 15:02

Choose a tag to compare

Release 3.4 adds support for initializations and 32-bit integer math, as well as support for file sizes larger than 32K and various bug fixes.

Dynamic local initializations are now supported. Initializations such as 'int len = strlen(x);' are now supported.
Local array initializations are supported.
Character arrays may be initialized by a string or by a list of character constants.
Character pointers may be initialized by a string.
Initialization list for an array may define fewer elements than the array.
Static initializations are now padded with zeros.
The Math32 library, contributed by Tony Hefner, adds support for 32-bit integer arithmetic.
The lseek32 and fseek32 functions provide support for file sizes up to 2GB, by using the Math32 library. (Thanks to Tony Hefner)
The fsetpos and fgetpos functions now use the Math32 library to support file sizes up to 2GB. (Thanks to Tony Hefner)
The scanner no longer accepts integer literals that are greater than the largest possible 16-bit integer value of 65535.
ElfC supports the suffixes 'u' or 'U' to indicate an integer literal is an unsigned value.
The scanner will issue a warning if an integer literal is larger than the maximum signed value, unless the integer literal has the unsigned suffix.
Error number values were aligned with POSIX values.
A bug was fixed in the left-shift operation. (Thanks to Tony Hefner)
Assignments from a struct/union pointer to a struct/union variable now work correctly. The pointer to struct/union is now dereferenced correctly.
Breakpoints can now be configured for any ROM address.

This release includes fixes for the following issues:

Added support to assign from an struct ptr to structure. IE: struct a = *p_stc; and now works correctly.
Fixed a bug in the Left-Shift operation.
Fixed a bug where the scanner would accept an integer literal larger than the largest possible unsigned int value (65535).
Removed include statement for math32 library in stdlib.h header file. IE: struct int32 is now defined in stdlib in an ifndef block.
Updated ErrorNo values to correspond to POSIX values.

Release 3.3.6

15 Jan 20:01
fd61cc8

Choose a tag to compare

This release adds support for the new Link/02 option to update the build information every time that ELFC compiles a file. Asm/02 and Link/02 were updated to their latest available levels, and a bug that sometimes caused optimization logic to be skipped was also fixed.

Release 3.3.5

07 Jan 21:11

Choose a tag to compare

This release contains fixes for compiling multiple C code modules into a single program file.

Release 3.3.2

23 Dec 22:36

Choose a tag to compare

Release 3.3 adds support for parameterized macros. The ElfC preprocessor meets the requirements of the ANSI C89/C90 specification.

The preprocessor can now handle macros with parameters.
The preprocessor supports macros with empty parameter lists.
The preprocessor can accept multi-line macro commands.
The preprocessor supports the #(stringify) and ## (paste token) operators.
The scanner now supports line splicing where a backslash at end of line indicates line continuation.
The stdarg and assert libraries are replaced by the traditional C macros.
The abs, min and max functions in the stdlib library and the getchar, putchar, getc and putc in the stdio library are replaced by their traditional C macros.

Release 3.1.1

25 Nov 19:51

Choose a tag to compare

Release 3.11 contains minor changes to eliminate compiler warnings with GCC. The Linker was updated to version 1.4 as well.

This release contains all the Release 3.1 enhancements to ElfC:

  • Release 3.1 removes the restriction of only 2 levels of pointer indirection so that ElfC now supports up to 15 levels of indirection. ElfC now meets the ANSI specified minimum of 12 levels of indirection.
  • This release adds support for local labels and the goto keyword.
  • The const keyword is now supported, and declaring a variable as volatile will now prevent optimizations on that variable.
  • Functions may now return a structure or union, and structures and unions may now be assigned.
  • ElfC can now emit warning messages when compiling code.
  • The __FUNC__ preprocessor directive was added in this version.
  • Pointers may now be initialized with non-zero constant address values, like 0xFF00.
  • Static (and global) arrays may be initialized using an initializer list or a string. ElfC will emit an error message if the initializer list size does not match the size of the array.

Release 3.1

20 Nov 18:39
51d2557

Choose a tag to compare

Release 3.1 contains the following enhancements to ElfC

  • Release 3.1 removes the restriction of only 2 levels of pointer indirection so that ElfC now supports up to 15 levels of indirection. ElfC now meets the ANSI specified minimum of 12 levels of indirection.
  • This release adds support for local labels and the goto keyword.
  • The const keyword is now supported, and declaring a variable as volatile will now prevent optimizations on that variable.
  • Functions may now return a structure or union, and structures and unions may now be assigned.
  • ElfC can now emit warning messages when compiling code.
  • The __FUNC__ preprocessor directive was added in this version.
  • Pointers may now be initialized with non-zero constant address values, like 0xFF00.
  • Static (and global) arrays may be initialized using an initializer list or a string. ElfC will emit an error message if the initializer list size does not match the size of the array.

Release 3.0

08 Oct 19:32
2161a01

Choose a tag to compare

Release 3.0 adds support for the signed and unsigned keywords.

The generated code contains some performance improvements which double the performance of the code. In addition the assembly code include files were cleaned up and unused definitions were removed.

This version now supports builds under Windows and Linux. Builds for Windows, Linux-64 and Linux Arm64 are attached to this release.