Renesas FSL-T06 User Manual page 29

Flash self-programming library
Table of Contents

Advertisement

Flash Self-Programming Library
5.3.1.3 FSL_CalcFctAddr
R01US0046ED Rev. 1.01
User Manual
Pre-conditions
Library must be initialized (call function FSL_Init).
Post-conditions
None
Example
/* Copy FSL to internal RAM address 0xffff7000 */
FSL_CopySections( 0xffff7000 );
Description
Function calculates the new address of a function copied from ROM to RAM. To
locate the new address of the function, the copied function must be located in on
of the FSL linker segments (see chapter 3.2 "FSL Linker sections").
Interface
fsl_u32 FSL_CalcFctAddr( void *pAddFct_ptr, fsl_u32 destAddr_u32 )
Arguments
Type
void
pAddFct_ptr
fsl_u32
destAdd_u32
Return types / values
Type
fsl_u32
Pre-conditions
Library must be initialized (call function FSL_Init) and copied (call function
FSL_CopySections).
Post-conditions
None
Example
/* Calculate new address of FSL_Write function */
/* FSL copied to RAM addess 0xffff7000 */
fsl_u32 (*fpFct)( void );
fpFct = (fsl_u32(*)())FSL_CalcFctAddr( ( void * )FSL_Write,
0xffff7000 );
Argument
Pointer to ROM address of copied
function
Destination address of Self-
Programming Library, e.g. value used
for FSL_CopySections.
Argument
New RAM address of function
User Interface (API)
Description
Description
29

Advertisement

Table of Contents
loading

Table of Contents