External GCC for TriCore™ applications

Documentation

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

Choose Help  Help Contents, and navigate to AURIX Development Studio User Guide  Tasks  External Toolchains  Configuring 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 File  Import  Infineon 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 Configuration  Manage.

manage config1
Fig. 3. Setting the manage build configuration

The Manage Configurations tab will be opened.

manage config
Fig. 4. manage configuration tab

Select New and give a name to the new configuration. Then select Import predefined, choose TriCore Application  External GCC  Debug and click OK.

new config
Fig. 5. new configuration

Activate build configuration

To select a new active configuration, right-click on the project and select Build Configuration  Set Active  HighTec (name of the new configuration created).

build config
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 Properties  C/C++ Build  Settings. 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 Properties  Aurix Development Studio  Build 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 Properties  C/C++ Build  Settings, 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
notmissing LS tc3
Fig. 11. Linker script

Alternatively, you can find the linker script here: HighTec Linker Scripts.

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