Hey to all,
was someone able to boot the S32z with sd boot from R52_0?
If yes, how do you initialize the IVT Tool and create the image blob?
I was able to boot from sd card the M33 but R52 fails...
Regards
Sebastian
Solved! Go to Solution.
Hi @sebastianwelzel,
thanks for sharing the screenshot
I found the following information.
The binary size is up to 10MB that's because in the linker file int_sram_dram start from 0x31780000 and the int_sram start from 0x32100000, the image have to covery all memory between them even there is no valid data.
To reduce the image size, I will recommend you keep sections RUN locations but change their LOAD locations, and the start up code will copy the data from LOAD location to RUN location. For this example, changes will be made in linker file (use AT to specify LOAD location, like code below) and startup.s, you can find modified files in the attachment.
.acfls_code_ram :
{
. += (acfls_code_rom_end - acfls_code_rom_start );
} > int_sram
__SDATA = .;
.sram_data : AT(__SDATA)
{
. = ALIGN(4);
*(.data)
*(.data*)
. = ALIGN(4);
*(.mcal_data)
. = ALIGN(16);
__sram_bss_start = .;
*(.bss)
*(.bss*)
. = ALIGN(16);
*(.mcal_bss)
. = ALIGN(4);
__sram_bss_end = .;
} > int_sram_dram
Please try this to reduce the Size of the bin file and generate your blob.
Hi @sebastianwelzel,
Could you share which steps are you following to run boot the M33 with the SD Card?
Also, are you trying to follow these same steps for the R52?
Hi Carlos,
to boot M33 I performed the following:
1. Create *.bin file
2. Use IVT tool to create the blob image
- Boot Target: System Manager M33
- Application Bootloader: Import *bin file
- set RAM start pointer/RAM entry pointer
- Export Image
- Export Blob image
- write binary to sd card and set BOOT Pins of S32Z to SD Boot
This is procedure which I was using also for the R52. May there is a missunderstand for RAM entry pointer. I´ve used the "intc_vector" for it....
regards
Sebastian
Hi @sebastianwelzel,
Thanks for sharing your steps.
Did you debug the R52 project before try to pass it to the SD card?
This to confirm that the error is at the IVT or Boot process instead of the project itself.
Hi Carlos,
yes I treid to run the R52 in debug session. If I do, all is running as expected...
I´ve started an "Attach" session after booting from sd card, to see were the firmware is hanging. From my point of view there is problem in the "gic500_enableDistributor" function. Accessing registers in memory spac 0x47800000 seems to be the problem or not possible. After writing to this memory, program starts again at "entry point" (isr)
Are the steps to create the binary blob for R52 the same as for M33? What about DRAM section? The binary created from porject was about 10MB, much bigger than CRAM section. So I modified the linker file. I pushed the dram from 0x31780000 to 0x32100000 and also shift the sram to 0x32200000 to have a binary file whichnfits into 7MB SRAM. Is there another way to create the blob file?
regards
Sebastian
Hi @sebastianwelzel,
I can confirm that the process to create the blob image for the R core is the same as the M cores.
You only need to make sure that the boot target being the R52 core.
The Ram entry pointer you are using is correct. It needs to be the VTABLE value.
Could you share a screenshot of you IVTView.
Which RTD version are you using?
HI @carlos_o ,
attached a screenshot of the IVT Tool. Only Applicatiuon bootloader is used. Ohter fields are greyed out.
I assume that everything is correct. As mentioned, I´ve changed the linker file to have Binary that fits into 7MB RAM. If the DRAM is used in the linker file at address 0x31780000, the resulting Binary is 11MB and the IVT tool messages an error that SRAM is smaller than 11MB... How to solve this problem?
RTD are Real Time Drivers AUTOSAR R21-11 Version 2.0.0
Hi @sebastianwelzel,
thanks for sharing the screenshot
I found the following information.
The binary size is up to 10MB that's because in the linker file int_sram_dram start from 0x31780000 and the int_sram start from 0x32100000, the image have to covery all memory between them even there is no valid data.
To reduce the image size, I will recommend you keep sections RUN locations but change their LOAD locations, and the start up code will copy the data from LOAD location to RUN location. For this example, changes will be made in linker file (use AT to specify LOAD location, like code below) and startup.s, you can find modified files in the attachment.
.acfls_code_ram :
{
. += (acfls_code_rom_end - acfls_code_rom_start );
} > int_sram
__SDATA = .;
.sram_data : AT(__SDATA)
{
. = ALIGN(4);
*(.data)
*(.data*)
. = ALIGN(4);
*(.mcal_data)
. = ALIGN(16);
__sram_bss_start = .;
*(.bss)
*(.bss*)
. = ALIGN(16);
*(.mcal_bss)
. = ALIGN(4);
__sram_bss_end = .;
} > int_sram_dram
Please try this to reduce the Size of the bin file and generate your blob.
Apologies I forgot to attach the files.
These files are only for example it may vary for your application.
Hi @carlos_o ,
thank´s for the files. I have changed my linker and startup script. It worked so far, that debugging my example project is running! But booting from SD does not work...
Can you confirm that I used correct Entry Point? According to MAP file below its 0x32100360
*fill* 0x32100334 0xc
0x32100340 __exceptions_ram_start = .
*(.extable)
.extable 0x32100340 0x20 ./Project_Settings/Startup_Code/Vector_Table.o
0x32100340 ETABLE
0x32100360 . = ALIGN (0x4)
0x32100360 __exceptions_ram_end = .
0x32100360 __interrupts_ram_start = .
*(.intc_vector)
.intc_vector 0x32100360 0xf04 ./Project_Settings/Startup_Code/Vector_Table.o
0x32100360 DEFAULT_VECTOR
0x32101264 . = ALIGN (0x4)
0x32101264 __interrupts_ram_end = .
0x32101264 . = ALIGN (0x4)
After booting from sd card "Attach Debug" is possible. Code crashes here:
void Core_IC_Init(void)
{
/* Enable exception to take into T32 mode */
write_SCTLR((read_SCTLR() & ~CORE_R52_SCTLR_TE_MASK)|(SET_T32_MODE << CORE_R52_SCTLR_TE_SHIFT));
gic500_enableDistributor();
gic500_enableRedistributor();
gic500_enableCpuInterface();
}
regards
Hi @sebastianwelzel,
The RAM entry point is correct.
Can you confirm that the bin file of the code is smaller than before?
I'm reviewing possible causes of the code to crash in that function you mentioned.
Hi @carlos_o ,
in the meanwhile the problem is solved...
Do you have also information regarding the NETC on S32Z. I would like to setup a port routing as follows:
- Frames received on Switch Port 0 should be forwarded to PSI0 and vice versa
- Frames received on Switch Port 1 should be forwarded to VSI1 and vice versa
My idea was to enable "Frame Modification" and inservt a VLAN tag to ingress frames on Switch ports. But its hard to configure with the configuration tool without any documentation.
May you have hint or an idea how to solve my problem?
Regards
Sebastian
Hi @sebastianwelzel,
Great to hear the problem is solved.
Regarding to your NETC questions. Could you please help me opening a new post with that question? This to maintain the information at this post related to the same topic.
If you want me to support that ticket, please tag me at the post. I will appreciate if you mark the response that help you to solve the main issue of this post as accepted solution.