User’s Manual
47
5.1.1 Compile Options
Dynamic C offers three compile options:
Compile to attached target (default, used when a PowerCore module is connected to a
PC running Dynamic C via the programming cable)
Compile defined target configuration to .bin file (see the additional information below)
Compile to .bin file using attached target
Since the PowerCore FLEX modules permit many different configurations, a special
project file for targetless compile should be set up with the configuration specific to your
PowerCore FLEX board if you plan to compile a defined target configuration to a.bin file.
Follow the instructions included with the PowerCoreFLEX_BOARD_OPTIONS.c sample
program in the SAMPLES\PowerCoreFLEX folder to determine and set up the targetless
compile options for your PowerCore module.
5.1.2 Using Dynamic C with Interrupts
You must disable all interrupts you have turned on before you exit Dynamic C to avoid
getting target communication error messages. Use the exit() function call to do so as in
some of the sample programs such as ADC_RD_EXTERNAL.C. The exit(exitcode)
function call returns the exitcode parameter to Dynamic C and stops the program. 0 is
used for this parameter to indicate that the function executed successfully; other values
correspond to run-time errors.
5.1.3 User Block
Certain function calls involve reading and storing calibration constants from/to the simulated
EEPROM in flash memory located at the top 2K of the reserved user block memory area
(3800–39FF). This leaves the address range 0–37FF in the user block available for your
application.
These address ranges may change in the future in response to the volatility in the flash
memory market, in particular sector size. The sample program USERBLOCK_INFO.C in
the Dynamic C SAMPLES\USERBLOCK folder can be used to determine the version of the
ID block, the size of the ID and user blocks, whether or not the ID/user blocks are mir-
rored, the total amount of flash memory used by the ID and user blocks, and the area of the
user block available for your application.
The USERBLOCK_CLEAR.C sample program shows you how to clear and write the con-
tents of the user block that you are using in your application (the calibration constants in
the reserved area and the ID block are protected).