External GCC for TriCore™ applications

Documentation

The configuration of an external GCC toolchain is described in the documentation of the AURIX Development Studio.

Choose HelpHelp Contents, and navigate to AURIX Development Studio User GuideTasksExternal ToolchainsConfiguring and external GCC Toolchain.

help window
Fig. 1. Navigation inside Help Content window

Import existing Infineon example

To test if the HighTec compiler works correctly, let’s import one of the existing Infineon projects.

Select FileImportInfineon AURIX Development Studio Project and click Next.

import project tc3
Fig. 2. Import Infineon example

Then select an example of your choice (we will test the blinky example for Application Kit TC397).

Manage build configuration

To create a new HighTec GCC toolchain configuration, right-click on the project and select Build ConfigurationManage.

manage config1
Fig. 3. Setting the manage build configuration

The Manage Configurations tab will be opened.

manage configuration
Fig. 4. manage configuration tab

Select New and give a name to the new configuration. Then select Import predefined, choose TriCore ApplicationExternal GCCDebug and click OK.

new configuration
Fig. 5. new configuration

Activate build configuration

To select a new active configuration, right-click on the project and select Build ConfigurationSet ActiveHighTec (name of the new configuration created).

build configuration
Fig. 6. Setting the active build configuration

Compiler-specific options

Path to the compiler

The path and name prefix of the HighTec compiler must be updated for the active build configuration.

Right-click on the project and select PropertiesC/C++ BuildSettings. Change the Prefix and Path fields under the Tool Settings tab. The prefix is always "tricore-" for AURIX devices; the path might be different.

compiler path
Fig. 7. Setting the prefix and path to the HighTec GCC compiler

Now, the project will use the HighTec GCC compiler to build the application.

Include paths

Right-click on the project and select PropertiesAurix Development StudioBuild check the box to auto-discover compiler include paths.

settings build
Fig. 8. Include paths

GCC linker options

Right-click on the project and select PropertiesC/C++ BuildSettings, click on AURIX GCC Linker. Under Command line pattern, change:

From: ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} To: ${COMMAND} -nocrt0 ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}

Click on Apply and Close.

settings linker
Fig. 9. GCC linker options

Linker script

Before the imported Infineon example can be built with the HighTec compiler, the Lcf_Gnu_Tricore_Tc.lsl linker script file must be added to the newly imported Infineon project.

The linker will be generated by updating the iLLD.

update iLLD tc3
Fig. 10. Update iLLD
blinky LS tc3
Fig. 11. Linker script

After the linker script is in place, the project is ready to be built.