06.02.2013 Views

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• • • • • • • •<br />

<strong>Utilities</strong> 10−33<br />

10.6.6 RESERVED MEMORY AREAS<br />

c166 and a166 reserve memory blocks because these areas also need<br />

space during the final rebuild. Therefore gso166 cannot use these memory<br />

areas for automatic allocation. The following memory areas are reserved:<br />

Areas Reserved by c166<br />

• String constants.<br />

• ROM copy of initialized data.<br />

• User stack areas.<br />

• Switch tables.<br />

• Initialization sections. (<strong>C166</strong>_INIT and <strong>C166</strong>_BSS)<br />

• Static objects with function scope.<br />

• Struct/union return values.<br />

Areas Reserved by a166<br />

• Depending on SSKDEF, a166 will reserve an area in IRAM for the<br />

system stack.<br />

• a166 cannot determine individual object sizes. However, it will reserve<br />

the total space needed for all objects in a source (.src) file.<br />

Other memory areas that are not known to gso166 and other tools you<br />

must reserve manually. You can do this for example by using a<br />

pre−allocation file or the −m command line option. If you omit this,<br />

problems can occur when the application is located.<br />

An example of memory that needs to be reserved manually is the space<br />

needed for register banks.<br />

Example:<br />

If one register bank is needed, make a pre−allocation file with the<br />

following contents::<br />

$RESERVE(IRAM,32)<br />

STARTSIF<br />

ENDSIF<br />

Specify this file to gso166 with the −afile option.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!