Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
panda
Level 1
Level 1
5 sign-ins 5 replies posted Welcome!
Hi everyone

I try to make a bootloader for my TC387 Board. I can flash an example .hex file into a specific PFLASH memory range through can communication. After this is happen i reset and disable all interrupts and system sets.
But now i need to reallocate my vector table at master core so that, after the a .hex file is flashed the program must start from the application program section. I don t know how to do this in aurix tricore.



Can someone help me further, who has an idea for this topic?

my .hex file is flashed into 0xA0058000 section.

Thx
0 Likes
8 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
If you're using the iLLD, initializing the BTV is in Ifx_Ssw_Tc0.c:
    Ifx_Ssw_MTCR(CPU_BTV, (unsigned int)__TRAPTAB(0));

I understand this part, However i have a further query,

the application vector table and the bootlaoder vector tables are in different location.

So before i set to jump from bootloader to applciation.

How do i map the vector tables to the adress i need,,,

can u give an example..

Application vector tables are in 0xA0000100

 

0 Likes

Hi @LijoDan .  Generally, the application and bootloader are built as two completely separate projects.  Each one has its own initialization, and its own vector table (typically handled by the compiler's cstart).  When the bootloader jumps to the application, the application's cstart changes BIV and BTV to point to the application's vector tables.

okay, but how does the cstart know where the BTV and BIV point locations are?

In my case, these locations are specified from linker files.

0 Likes

As an example: in AURIX Development Studio, the linker file (Lcf_Tasking_Tricore_Tc.lsl) contains the directives below.  Then this line in Ifx_Ssw_Tc0.c picks up that __INTTAB_CPU0 definition and sets BTV to that address.

 Ifx_Ssw_MTCR(CPU_BTV, (unsigned int)__TRAPTAB(0));

 

/*Fixed memory Allocations for Interrupt Vector Table*/
group (ordered)
{
group int_tab_tc0 (ordered)
{
# include "inttab0.lsl"
}
group int_tab_tc1 (ordered)
{
# include "inttab1.lsl"
}
group int_tab_tc2 (ordered)
{
# include "inttab2.lsl"
}
"_lc_u_int_tab" = (LCF_INTVEC0_START);
"__INTTAB_CPU0" = (LCF_INTVEC0_START);
"__INTTAB_CPU1" = (LCF_INTVEC1_START);
"__INTTAB_CPU2" = (LCF_INTVEC2_START);
}

 

0 Likes
panda
Level 1
Level 1
5 sign-ins 5 replies posted Welcome!
it does not helped me further. can you give more information how to reallocate the vector table?
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
I'm not clear what your question is. Let me describe the general case, and please fill in the details where your setup is different.

In most bootloader / application architectures, the bootloader and application are linked as separate projects:
- The bootloader occupies, say, the first 256K of program flash, with its own system initialization (RAM, PLL, BTV, BIV, etc.)
- The application occupies the rest of program flash, with its own system initialization (RAM, PLL, BTV, BIV, etc.)

The bootloader and application are typically both iLLD-based or MCAL-based. But either way, the low-level parts of the system initialization are invoked again. That means the bootloader has its own vector tables, and the application has a separate set of vector tables.

Can you explain the specific problem you're having in more detail?
Intern_s2
Level 1
Level 1
50 sign-ins 5 replies posted 25 sign-ins

I hope this message finds you well. My name is  Satya , and I am reaching out to you as a new intern . I have recently been assigned the task of developing a bootloader for the TC 265 board. After learning that you have expertise in this area through your work on the TC 387 board, I am reaching out to seek your guidance and assistance.

I understand that your time is valuable, and I genuinely appreciate any support you can provide, whether it be through advice, documentation, or perhaps even a brief discussion to clarify certain aspects of the bootloader development process.

If you are available and willing to assist me in this endeavor, I would be grateful for the opportunity to learn from your expertise. Please let me know a convenient time for you, and I will gladly accommodate your schedule.

Thank you very much for considering my request. I look forward to the possibility of collaborating with you and am eager to begin this project under your guidance.

0 Likes