PPU
examples
This guide contains instructions for successful compilations of the following projects using HighTec LLVM toolchain version 8.0.0:
-
iLLD_TC49xA_ADS_PPU-IPC
-
iLLD_TC49xA_ADS_PPU-IRQ
-
iLLD_TC49xA_ADS_PPU-SIMD
-
iLLD_TC49xA_ADS_PPU-STU
It assumes that one of the projects has been imported into the current workspace.
The following changes are required before the first project build attempt:
-
Wait until the indexer finishes.
-
Right-click on the project, then
. -
Right-click on the project and click on Refresh.
-
Wait until the indexer finishes.
-
Add the
Lcf_Hightec_Tricore_Ppu.lsl
linker script specifically adapted for thePPU
use case.
PPU MetaWare
build configuration
The following changes are required to build the PPU
project for the existing PPU
Debug (Ext. MetaWare
) build configuration:
-
Right-click on the project, then
. -
Right-click on the project, then
. UpdateMetaWare
Installation Path to, i.e., "C:\HighTec\toolchains\mwaurix\v0.2.0" and click on Apply and close. -
Click on the project, then
. Disable parallel build by deselecting the "enable parallel build" checkbox, then click on Apply and close. Optionally, configure the option "use optimal jobs" to "use parallel jobs" and set the value to be lower or equal to the physical cores of the used laptop. This is not a fail-proof option, and one might encounter a compiler crash during the build. -
One by one, right-click on the following directories/files, then
and click OK (some may already have been disabled).
/Libraries/iLLD/TC49A/CpuGeneric/Asclin
/Libraries/iLLD/TC49A/Csrm
/Libraries/iLLD/TC49A/Scr
/Libraries/Infra/Platform/Tricore
/Libraries/Infra/Ssw/TC49A/Csrm
/Libraries/Infra/Ssw/TC49A/Tricore
AllowAccess.c
,PpuInterface.c
Cpu0_Main.c
,Cpu1_Main.c
,Cpu2_Main.c
,Cpu3_Main.c
,Cpu4_Main.c
,Cpu5_Main.c
-
Build the
PPU
project.
TriCore™ external LLVM build configuration
The following changes are required to build the Tricore project part:
-
Right-click on the project, then
-
Give any name
-
Select the option Import predefined, then
and click OK.
-
-
Set the newly created configuration to active by clicking on Set Active.
-
Wait until the indexer finishes.
-
Edit the build settings: right-click on the project
-
Click on Settings and Update Path to the
LLVM
bin directory even though it is not used later on, i.e., "C:\HighTec\toolchains\tricore\v8.0.0\bin" and click on Apply. -
Under the options for LLVM C Compiler, click on "Miscellaneous" and add
-merrata=cpu141
, click on Apply. -
Click on LLVM Linker, extend the command string with
-merrata=cpu141
toclang -merrata=cpu141
and click on Apply. -
Click on
. Then click on Ok and Apply. -
Click on
and change Linker Script name to../Lcf_Hightec_Tricore_Ppu.lsl
and click on Apply and close.
-
-
Right-click on the project, then
and click on Apply and close. -
Right-click on the project, then
and click on Apply and close.
/Libraries/iLLD/TC49A/ArcEV
/Libraries/iLLD/TC49A/Csrm
/Libraries/iLLD/TC49A/Scr
/Libraries/Infra/Platform/ArcEV
/Libraries/Infra/Ssw/TC49A/Csrm
/PPU
-
Right-click on the project, then
, and ensure that the include paths do not contain any of the following directories and their subdirectories, click on Apply and close.
/Libraries/iLLD/TC49A/ArcEV
/Libraries/iLLD/TC49A/Csrm
/Libraries/iLLD/TC49A/Scr
/Libraries/Infra/Platform/ArcEV
/Libraries/Infra/Ssw/TC49A/Csrm
/PPU
-
One by one, Right-click on the following directories, then
and click OK (some may already have been disabled).
/Libraries/iLLD/TC49A/ArcEV
/Libraries/iLLD/TC49A/Csrm
/Libraries/iLLD/TC49A/Scr
/Libraries/Infra/Platform/ArcEV
/Libraries/Infra/Ssw/TC49A/Csrm
/PPU
-
Change the definition of
uncached data/bss
sections in Cpu0_Main.c due to the warning: unknown pragma ignored [-Wunknown-pragmas
]-
Change
uncached.lmubss
section definition (applies toiLLD_TC49xA_ADS_PPU-IPC
,iLLD_TC49xA_ADS_PPU-IRQ
, andiLLD_TC49xA_ADS_PPU-STU
)
From:#pragma section all "uncached.lmubss" /* Declaration of global uninitialized variables */ #pragma section all
To:
#if defined(__HIGHTEC__) && defined(__clang__) #pragma clang section bss=".uncached.lmubss" #else #pragma section all "uncached.lmubss" #endif /* Declaration of global uninitialized variables */ #if defined(__HIGHTEC__) && defined(__clang__) #pragma clang section bss="" #else #pragma section all "uncached.lmubss" #endif
-
Change
uncached.lmudata
section definition (applies to iLLD_TC49xA_ADS_PPU-STU):
From:#pragma section all "uncached.lmudata" /* Definition of global initialized variables */ #pragma section all "uncached.lmudata"
To:
#if defined(__HIGHTEC__) && defined(__clang__) #pragma clang section data=".uncached.lmudata" #else #pragma section all "uncached.lmudata" #endif /* Definition of global initialized variables */ #if defined(__HIGHTEC__) && defined(__clang__) #pragma clang section data="" #else #pragma section all "uncached.lmudata" #endif
-
Change the following code in
AllowAccess.c
due to the warning: non-portable path to file; specified path differs in case from file name on disk [-Wnonportable-include-path
]:
From:#include "IfxCpu_Cfg.h" #include "IfxGtm_Cfg.h" #include "IfxEgtm_Cfg.h" #include "IfxQspi_Cfg.h" #include "IfxCan_Cfg.h" #include "IfxAsclin_Cfg.h" #include "IfxSent_Cfg.h" #include "IfxGpt12_Cfg.h" #include "IfxI2c_Cfg.h" #include "IfxGeth_Cfg.h"
To:
#include "IfxCpu_cfg.h" #include "IfxGtm_cfg.h" #include "IfxEgtm_cfg.h" #include "IfxQspi_cfg.h" #include "IfxCan_cfg.h" #include "IfxAsclin_cfg.h" #include "IfxSent_cfg.h" #include "IfxGpt12_cfg.h" #include "IfxI2c_cfg.h" #include "IfxGeth_cfg.h"
-
-
Build TriCore™ project.