English
Language : 

CC78K4 Datasheet, PDF (433/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(36) Firmware ROM function
Firmware ROM Function
_ _flash
Caution Do not use this flash function for devices that have no flash area self-rewrite function.
Operation is not guaranteed if it is used.
This function enables the flash memory rewrite function of devices.
FUNCTIONS
• This calls a firmware ROM function that self-writes to the flash memory via the interface library positioned
between the firmware ROM function and the C language function.
• In the interface library call interface, the first argument is passed via the register and the second and
subsequent arguments are transferred to the stack. The first argument’s register is as follows.
1, 2-byte integer
3-byte integer
4-byte integer
AX
WHL
AX (lower integer), RP2 (higher integer)
• The size of the pointer passed to the stack after the second argument is three bytes.
EFFECT
• Operations related to the firmware ROM function can be described at the C source level.
USAGE
• _ _flash attributes are added to the top during an interface library prototype declaration.
RESTRICTIONS
• Function calls by a function pointer are not supported.
• When the old specification function interface specification option (-ZO) is specified, it results in an error.
• When a function with _ _flash is defined, it results in an error.
COMPATIBILITY
From another C compiler to this C compiler
• Modification is not required if the reserved word _ _flash is not used.
• When changing the firmware ROM function, modify the program according to the method above.
From this C compiler to another C compiler
• Possible using #define (refer to 11.6 Modifications of C Source).
• In a CPU with a firmware ROM function or substitute function, it is necessary for the user to create an
exclusive library to access that area.
User’s Manual U15556EJ1V0UM
433