Specifications

www.ti.com
Using HalCoGen to Generate the Code
2.34 Call the Main Application
This is a normal function call when using C and C++. It could be a branch or branch-link to the name of
the routine that executes the application.
For example:
main();
exit();
3 Using HalCoGen to Generate the Code
Although it is not the intent of this document to serve as a guide to using HalCoGen, below are the
minimum steps necessary to generate the initialization code described in this document.
After opening HalCoGen, select File --> New --> Project
Select the device family (TMS570LS04x or RM42x) from the list on the left and the specific device from
the list on the right.
Enter the desired project name and storage location and select OK. The project is now created.
After creating the project, select the Driver Enable tab and uncheck the Mark/Un-mark all drivers check
box if it you do not want to generate all of the basic peripheral drivers. Specific drivers can be selected
at this time or none at all if you only want the initialization code.
Once the driver selections are made, select the SAFETY INIT tab to select which of the safety
initialization routines to be included. To follow all of the suggested initializations described in this
document, select all of the available self test code to be generated.
If drivers are to be included in the code generation, be sure to setup each of the available driver tabs
to insure the drivers are set up as needed by the specific application. Note that this should include the
necessary configuration of the IOMM module since, by default, all IOMM options are selected which
creates conflicts in the IOMM initialization. Conflicting information in the IOMM pin configuration, will
result in the default pin being active.
Once HalCoGen is configured for you application, save the project by selecting File--> Save Project
and, finally, generate the code by selecting File-->Generate Code or pressing F5. The code generated
will be seen in a panel to the right. Files may be opened, viewed and edited within HalCoGen but there
is no build capability within HalCoGen.
After the code is generated, a project can be created within your IDE to edit and build the code as
needed for your project.
4 References
TMS570LS0432/0332 16/32-Bit RISC Flash Microcontroller Data Sheet (SPNS186)
RM42L432 16/32-Bit RISC Flash Microcontroller Data Sheet (SPNS180)
TMS570LS04x/03x 16/32-Bit RISC Flash Microcontroller Technical Reference Manual (SPNU517)
RM42L432 16/32-Bit RISC Flash Microcontroller Technical Reference Manual (SPNU516)
HALCOGEN: HAL Code Generator Tool (http://www.ti.com/tool/halcogen)
15
SPNA163September 2012 Initialization of the TMS570LS043x, TMS570LS033x and RM42L432
Hercules ARM Cortex-R4 Microcontrollers
Submit Documentation Feedback
Copyright © 2012, Texas Instruments Incorporated