Technical information

CSI to SPI Peripheral Communication in V850ES Microcontrollers
2.7.5 Generating Code With Applilet
Once the various dialog boxes are set up, select the “Generate code” option. Applilet will show the
peripherals and functions to be generated, and allows you to select a directory to store the source
code.
When the “Generate” button is pressed, Applilet creates the code in several C-language source files
(extension .c), C header files (extension .h), and assembly language source and header files
(extensions .s and .inc), and shows the list of files created in a dialog box.
To support the initial startup code, Applilet generates assembly source file crte.s. For clock
initialization, Applilet generates system.inc and system.s. The SystemInit() function is generated in
systeminit.c.
To support the CSI00 peripheral, Applilet generates serial.h, serial.c, and serial_user.c. See details
on these files below.
To support the Timer00 peripheral, Applilet generates timer.h, timer.c and timer_user.c.
To support I/O port initialization, Applilet generates port.h and port.c.
Several other files are generated, including a main.c file with a blank main function. Applilet also
generates a link directive file, 850.dir, to control the linking process.
2.7.6 Applilet-Generated Files
For the demonstration program, Applilet generated several source files. The files and their
functions are shown below.
Table 6. Applilet-Generated Source File
File Function
Macrodriver.h General header file for Applilet-generated programs
Crte.s Reset vector, program startup code
System.inc Assembly-language header for system.s
System.s Assembly source for Clock_Init() routine
System_user.s Empty file (would contain code for System interrupt if used)
Systeminit.c SystemInit() routine for peripheral initialization
Main.c The main program routine
Inttab.s Interrupt vectors with RETI for unused interrupts
Port.h Header file defining initial port states
Port.c Port_Init() routine
Serial.h Header file for serial.c
Serial.c CSI00 functions generated by Applilet
Serial_user.c Callback functions for UART1 and CSI00, for user code
34