Two Project files are required to develop an E5-based product:
The Triscend FastChip Project, which describes the Hardware Configuration within the E5 device;
The Keil µVision Project, which creates the Application Firmware to run in the configured E5 device.
Depending on the scale of the development, local practices, etc, etc, these two Project files could be managed by
separate teams; eg, the Hardware Team maintains the FastChip Project while the Software Team maintains the µVision Project;
separate individuals within one team; eg, the Hardware Engineer maintains the FastChip Project while the Software Engineer maintains the µVision Project;
one person handling both hardware and firmware development.
These notes are written from the perspective of a Firmware developer.
Hardware Configuration refers to the configuration of the E5's Configurable System Logic (CSL);
Application Firmware refers to the target software to run on the E5's 8032 processor core;
Software refers to software - such as FastChip or µVision - run on a host platform for developing the application.
FastChip insists that its Project files are held in a folder with the same name as the Project; µVision has no such restriction. Therefore we will consider creating the FastChip Project first, as this will ensure that the required directory structure is established from the outset - thus avoiding later problems!
The µVision Project will also need to include the source file(s) generated by FastChip - another reason for creating the FastChip Project first.
To ensure that all the tools have been correctly configured, the download works, and the target hardware is functioning, it's good to start with a very simple FastChip Project which just connects the 8032 UART's output to an output port pin, and enable it for RS232-compatible output.
If the Project name exceeds 8 characters, FastChip warns that some third-party tools do not support long file names, and truncates the names for the generated source files. There doesn't seem to be any way to override this truncation for tools which do support long file names - such as Keil µVision!
Create and Bind the Project, and Generate the C51 and/or A51 source & header files, as required.
There is no need to place the µVision Project in any particular position within the directory structure relative to the FastChip Project - it doesn't actually need to be on the same drive or even the same PC! However, it is usually advantageous to keep the Projects together; eg, to facilitate backups, or moving the entire development en bloc to another PC. Therefore we will create a 'Keil' subfolder in the FastChip Project folder.
Create the µVision Project: Project | New Project&ldots;
Select the required E5 device: Project | Select Device for Target&ldots;
In the 'C51' options for the Target, specify the 'Include Path' to find the TE5_CSOC.h standard include file in the Triscend installation; eg, C:\Program Files\Triscend\FC230\Include
In the 'Output' options, ensure that 'Browse Information' and 'Create Hex File' are both checked
In the 'Debug' options for the Target, ensure that the correct Triscend driver is specified for target debugging.
Add the FastChip-generated source file to the Project
Note: For polled (non-interrupt-driven) serial comms, the UART interrupt (ES) does not need to be enabled but the TI flag must be set by the Application Firmware to trigger transmission of the very first character (EA and EX1 do not need to be enabled).
At this point, it is wise to add a simple "hello world" main() function, just to ensure that the whole system is alive and well!
Build the µVision Project
Ensure that the Wiggler download cable is connected, and the target is powered-up.
Start the Triscend Multi-JTAG Server (TMJS) - one of the three desktop icons created by the FastChip installation.
Return to FastChip, and press the 'DeviceLink' button on the toolbar (or choose it from the 'Tools' menu).
When the DeviceLink window opens, press the 'Configuration' button.
Make the appropriate selections for your Target hardware on the 'Target Environment' tab, and verify that the µVision-generated Hex file name is correctly entered in the 'Microprocessor Code' section on the 'Input Files' tab (note that FastChip does not impose the 8-character limit here!). Click 'OK' to start the Configuration process.
Press the 'Download' button on the toolbar, and then 'OK' to start the download