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.
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.
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.
The Manage Configurations tab will be opened.
Select New and give a name to the new configuration. Then select Import predefined, choose TriCore Application → External GCC → Debug and click OK.
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).
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.
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.
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.
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.
After the linker script is in place, the project is ready to be built.