Professional Documents
Culture Documents
Demystification - AURIX™ TC3xx Startup File Analysis-Knowledge
Demystification - AURIX™ TC3xx Startup File Analysis-Knowledge
agree 14
share
Infineon's AURIX™ series microcontrollers are widely welcomed by customers due to their
powerful real-time performance, functional safety and excellent design of information
security. Infineon has also been committed to building a strong ecosystem to help our
customers complete designs more conveniently and quickly. This article will further
Log in to view over 500 million
introduce you to more AURIX™ dry goods, as well as new developments in the complete professional and high-quality
ecosystem: content
Zhihu has high-quality questions,
■ AURIX™ TC3xx startup file analysis;
professional answers, in-depth articles
and exciting videos from more than 50
■ The AURIX™ ecosystem has been further improved: Recently, the domestic RT-Thread million creators.
operating system has joined the AURIX™ ecosystem and announced commercial support
for Infineon Technologies' automotive-grade 32-bit AURIX™ TriCore™ multi-core
Login/Register Now
microcontrollers.
https://zhuanlan.zhihu.com/p/410252630 1/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
TC3xx series MCU will start from the _START() function of the Ifx_Ssw_Tc0.c file after reset,
and will start to run from CPU0 when starting, until the _StartUpSoftware_Phase6()
function will start other cores in sequence according to user configuration.
The address of _START() is determined by RESET in the link file. Taking TASKING as an
example, in the Link file:
https://zhuanlan.zhihu.com/p/410252630 2/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
This address must also be consistent with the definition of the application start address in
BMHD.
void _START(void)
Ifx_Ssw_jumpToFunction(__StartUpSoftware); // 直接跳转到__StartUpSoftware()
_StartUpSoftware()
_StartUpSoftware() is mainly used to set the A1 register, set the PSW register, and
determine whether it is Application Reset, so as to perform different jumps.
In TriCore™, A0, A1, A8, and A9 are global address registers. The area pointed to by A1
here is used to store small RODATA. The so-called small data area can be directly
addressed. Log in to view over 500 million
professional and high-quality
The default value of PSW is set to 0x980, namely Supervise mode, Global Address Register content
Write Permission Enable, Call Depth Count Enable, User Stack. Zhihu has high-quality questions,
professional answers, in-depth articles
and exciting videos from more than 50
million creators.
https://zhuanlan.zhihu.com/p/410252630 3/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
if (Ifx_Ssw_isApplicationReset() != 1)
Ifx_Ssw_jumpToFunction(__StartUpSoftware_Phase2);
}
Log in to view over 500 million
professional and high-quality
else content
Zhihu has high-quality questions,
{
professional answers, in-depth articles
and exciting videos from more than 50
Ifx_Ssw_jumpToFunction(__StartUpSoftware_Phase3ApplicationResetPath);
million creators.
https://zhuanlan.zhihu.com/p/410252630 4/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
_StartUpSoftware_Phase2()
In this API, the initial configuration of EVRC, LBIST test, and MONBIST test will be
performed according to the user's configuration.
https://zhuanlan.zhihu.com/p/410252630 5/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
IFX_CFG_SSW_CALLOUT_PMS_INIT(); // 执行EVC初始化流程
IFX_CFG_SSW_CALLOUT_LBIST(); // 执行LBIST测试
IFX_CFG_SSW_CALLOUT_MONBIST(); // 执行MONBIST测试
Ifx_Ssw_jumpToFunction(__StartUpSoftware_Phase3PowerOnResetPath);
https://zhuanlan.zhihu.com/p/410252630 6/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
_StartUpSoftware_Phase3PowerOnResetPath()
In this API, the context will be initialized. The so-called context is the SP pointer and CSA.
In TriCore™, SP is the A10 register, where the top address of the stack will be assigned to
A10.
CSA is the area where the context is stored. In TriCore™, whenever a sub-function is called
or an interrupt is entered, some general-purpose registers will be automatically stored in
the CSA area (Push), and then these registers will be stored when the sub-function returns
or the interrupt returns. Resume (Pop).
_StartUpSoftware_Phase4
https://zhuanlan.zhihu.com/p/410252630 7/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
In this API, it will first feed the CPU0 watchdog and safety watchdog (note: CPU0
watchdog and safety watchdog are enabled after reset), and then complete the clock
initialization and MBIST test according to user configuration.
/* This is for ADAS chip, where clock is provided by MMIC chip. This has to be
*/
IFX_CFG_SSW_CALLOUT_MMIC_CHECK();
Ifx_Ssw_serviceCpuWatchdog(&MODULE_SCU.WDTCPU[0], cpuWdtPassword);
Ifx_Ssw_serviceSafetyWatchdog(safetyWdtPassword);
IFX_CFG_SSW_CALLOUT_MBIST();
https://zhuanlan.zhihu.com/p/410252630 8/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
Ifx_Ssw_jumpToFunction(__StartUpSoftware_Phase5);
_StartUpSoftware_Phase5
In this API, there is only one API configured by SMU, but this API is just an empty
function, so nothing is actually done here.
https://zhuanlan.zhihu.com/p/410252630 9/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
The BHALT bit of the SYSCON register is used to set whether the Core is started, the PC is
used to set the program pointer, and these two registers are set in Ifx_Ssw_startCore() to
start other cores.
#if (IFX_CFG_SSW_ENABLE_TRICORE1 != 0)
#if (IFX_CFG_SSW_ENABLE_TRICORE1 == 0)
#if (IFX_CFG_SSW_ENABLE_TRICORE2 != 0)
#endif
https://zhuanlan.zhihu.com/p/410252630 10/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
#endif/* #if (IFX_CFG_SSW_ENABLE_TRICORE1 == 0) */
Ifx_Ssw_jumpToFunction(__Core0_start);
/* Set the PC */
Ifx_CPU_SYSCON syscon;
syscon = cpu->SYSCON;
if (syscon.B.BHALT)
Taking TC38x as an example, if all 4 cores are started, CORE1 will be started in
_StartUpSoftware_Phase6(). At this time, _Core0_Start() and __Core1_Start() are running at
the same time. At the end of _Core1_Start(), Core2 will be started, and then jump to
https://zhuanlan.zhihu.com/p/410252630 11/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
_Core2_Start(). At the end of _Core2_Start(), Core3 will be started, and then jump to
_Core3_Start().
_Corex_start
CACHE configuration:
https://zhuanlan.zhihu.com/p/410252630 12/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
The BTV register is used to set the first address of the Trap vector table. In the project, the
first address of the Trap vector table is set in the link file. The following statement will
assign the address of the Trap vector table in the link file to BTV.
The BIV register is used to set the first address of the interrupt vector table. In the project,
the first address of the interrupt vector table is set in the link file. The following statement
will assign the address of the interrupt vector table of the link file to BIV. Note that in
TriCore™, by default, the interrupt vector is 32-byte aligned, and the position of the
interrupt vector is not fixed, but determined by the interrupt priority.
Configure ISTACK:
In TriCore™, the stack is divided into USTACK and ISTACK. Their use is determined by the
PSW.IS bit. The default configuration PSW.IS=0 means that when the function call in the
thread, the USTACK (A11) part will be used as the CPU Stack, and ISTACK (ISP) will be
used as the CPU stack in the interrupt function. USTACK and ISTACK size and position are
configured in the Link file. The following statement sets the ISP:
For CPU0, the USTACK stack top pointer has been assigned to A10 in
_StartUpSoftware_Phase3ApplicationResetPath(). For other CPUs, assign the top pointer of
USTACK to A10 of the respective CPUs in their respective _Corex_Start().
BSS: The BSS segment is used to store global variables without initialization values. In this
function, global variables without initialization values will be cleared.
https://zhuanlan.zhihu.com/p/410252630 13/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
Ifx_Ssw_C_Init();
For other _Corex_Start(), the process is basically the same as _Core0_Start(), and the
operation of assigning the USTACK stack top pointer to A10 and PSW initialization
operation are added.
The _Corex_Start() of each CPU will finally jump to the respective corex_main() to run.
AURIX™ has added a new partner - the software I have "RT-Thread Auto"
https://zhuanlan.zhihu.com/p/410252630 14/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
safety, high reliability, and rich network interfaces It is widely used in automotive
applications such as smart driving gateways, engine management systems, transmission
systems, chassis and braking systems, and airbags.
For AURIX™ multi-core microcontrollers, RT Thread can support up to 6 cores, and also
supports the lock-step core features:
• 6 TriCore™ cores running at 300 MHz (with 4 additional checker cores providing 4000
DMIPS)
• Floating-point and fixed-point support for all cores
• 16 MB Flash/ECC protected
• Up to 6.9 MB SRAM/ECC protected
Log in to view over 500 million
• Supports ISO 26262 ASIL-D
professional and high-quality
• Support TriCore series MCAL drivers, including CAN, CANFD, LIN, SPI, Watchdog, etc.
content
• RT-Thread version that supports multi-core features, while continuing the easy-to-use
Zhihu has high-quality questions,
API of RT-Thread
professional answers, in-depth articles
• Support GNU GCC tool chain (and HighTec integrated development environment),
and exciting videos from more than 50
TASKING tool chain (and ADS integrated development environment) million creators.
https://zhuanlan.zhihu.com/p/410252630 15/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
information security has been widely welcomed by customers. Infineon has also been
committed to building a strong ecosystem to help our customers complete the design
more conveniently and quickly. Ruiside Technology's operating system RT-Thread has a
great impact on AURIX ™ series single-chip microcomputer support and
commercialization, is a major breakthrough of domestic RTOS in the field of automotive
electronics."
Xiong Puxiang, CEO of Ruiside Technology: "As a leading core software supplier in China,
Ruiside Technology's commercial support for Infineon's multi-core represents that the
domestic operating system has entered a new field, RT-Thread It can meet the multi-core
high-reliability requirements of the automotive grade."
Ruiside Technology enjoys a high reputation in the domestic operating system field. It is
the actual owner and development direction controller of RT-Thread, and is responsible
for the core technology development, community operation and marketing of RT-Thread
operating system. The company has a series of independent intellectual property rights
technologies, including high-reliability RTOS, log-type high-reliability file system, low
power consumption technology, Persimmon GUI graphics library, intelligent audio, etc.
About Infineon
To learn more about Infineon's AURIX™ TC3xx , please visit Infineon's official website:
AURIX™ – TC3xx Artificial Intelligence - Infineon Technologies Log in to view over 500 million
professional and high-quality
If you want to find more applications, product information or want to contact us to content
purchase products, please click here to fill in your personal information and needs, and Zhihu has high-quality questions,
we will arrange special personnel to follow up. professional answers, in-depth articles
and exciting videos from more than 50
million creators.
Infineon customer demand information
registration form
www.wjx.cn/vj/YD0iMkw.aspx
https://zhuanlan.zhihu.com/p/410252630 16/17
12/31/22, 7:20 AM Demystification | AURIX™ TC3xx startup file analysis-Knowledge
release
recommended reading
https://zhuanlan.zhihu.com/p/410252630 17/17