[CMake] [Dev] CMake 2.5 tool chain support example

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jun 12 16:46:51 EDT 2007


On Tuesday 12 June 2007 16:21, Trevor Kellaway wrote:
> Alex,
>
> > I had another look at Freescale-chc12.cmake.
> >
> > I guess you have different projects using this controller ?
>
> Yes, each system will generally have its own custom link.prm.
>
> > In the file you have the cache variables HC12_LINK_PRM_FILE,
> > HC12_MEMORY_MODEL_LETTER and HC12_CORE. I guess they don't
> > depend on preferences of the users but on how the actual
> > hardware for this project looks like. Does this mean in order
> > to build these projects correctly the user/developer has to
> > adjust these variables manually to the correct values for the
> > target hardware ?
>
> The intention was to provide a default case, which will work for small
> programs, but in most cases this will be overridden.
> The layout is generally dependent on the software, data and functions
> can be placed in custom segments, which are then located based on
> link.prm.
>
> The HC12 has fixed on-chip resources, FLASH (typically 64KB to 512KB)
> and RAM (8KB to 32KB, yes KB not MB!), so in this case the hardware is
> fixed. It can has an optional external address bus, where you can

Not too long ago I also did some programming e.g. on a PIC16, which had 2k  
word program memory (2 k word != 2048 byte, since one word is 14 bit) and 256 
byte (not KB ! ;-) of RAM. 

> connect additional FLASH / RAM or peripherals, in this case the memory
> map is dependent on the project's hardware.

So, HC12_CORE is a hardware feature.
HC12_LINK_PRM_FILE mainly too, since the layout has to match the available 
memory.
HC12_MEMORY_MODEL_LETTER can then be selected.

> You're right, it would make more sense for Freescale-chc12-hc12.cmake to
> be included first, so this could act as an override for defaults in
> Freescale-chc12.cmake.

Usually you first set the defaults and then you override them with more 
specific settings, but this doesn't work for your case. Hmm.
I switched the order of the two in cvs for now, let's see how it works out.
Please try current cvs.

Alex


More information about the CMake mailing list