What defaults are built in to the compiler?


The default SCM space for generated code starts at 0x200. This allows etpu functions 0-7 to be defined in the entry tables.

To allow more entries, this base rom space must be moved. This is done with

#pragma memory ROM [size] @ base_address;

For example:

#pragma memory ROM [0x8000-0x400] @ 0x400;

will allow for space for 16 entries in the eTPU function entry tables.

The default SPRAM space runs from 0x0000 to 0x0400. Allocations for global variables start at 0 and ascend. Locals and parameters not allocated from registers begin at the upper bound of SPRAM and descend.

You can change this setting with the #pragma memory RAM directive.