- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ifx_Ssw_MTCR(CPU_BTV, (unsigned int)__TRAPTAB(0));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?