[fpc-devel] ARM patch to switch to controller records rather than arrays

John Clymer john at johnclymer.net
Sun Aug 21 01:35:44 CEST 2011

DIFF attached for comment and review.  Provides the following features / 

1) Switched operation of cpuinfo.pas - there is still a SET containing  the ct_ 
constants, but that now indexes an array of structures rather  than a collection 
of arrays.  The array contains the info from the old  arrays, PLUS FLASH, SRAM 
and EPROM memory definitions i.e. BASE and SIZE  for each.
NOTE:  Switched for both ARM and AVR.  AVR changes will compile the  cross 
compiler, but choke while building the RTL  (complaining about a  function being 
too complex). However, the SVN and daily build exhibit  the same behaviour - so 
I do not believe I have broken the AVR any  further than it was broken.

2) Added LM3FURY controller unit file - this will be built up into a  base unit 
file for all the Fury class Stellaris controllers.

3) I intend to leave the "Stellaris" controller class with the intention  that 
those that don't want a full set of system defines can use this  class and will 
receive nothing more than the bare minimum to boot a chip  into PASCALMAIN.  The 
Flash and SRAM sizes will be set very large - so  caveat emptor to the user if, 
as they will need to ensure the programs  do not require more resources than 
their chip require.

4) t_embed.pas was changed.  The case() statement is still in there, but  all 
the cases fall down to the same code - which uses the cpuinfo.pas  memory 
definitions to create the linker file.

5) put a test in t_embed.pas - if we are only compiling to assembly,  then we 
skip the Internal Error on not having a link definition.

6) option.pas, globals.pas, ncgutil.pas and pmodules.pas were modified to 
accommodate the addition of the structure.

7) IF controllerunitstr is empty - then no added file is included in the  build 
(again, to support a "base" controller type - with no defines  what so ever - 
power user option)

NOTE:  The Makefile changes were picked up by svn diff - not sure why  they 
changed so much, my incantation of fpcmake must be different than  the original 
sources code

NOTE:  The AVR link script generation has not been changed to  accommodate the 
additional information - the original link script did  not set memory sizes to 
match the processor.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110820/c420bfc0/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jec_diff.txt
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110820/c420bfc0/attachment.txt>

More information about the fpc-devel mailing list