hi all experts .
i have also meeting one issue,
My bsp is 41.0, my compile command is :
1. compile ATF with u-boot s32g399ardb3_qspi_defconfig
##make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/oven/work/bsp_41/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_qspi_defconfig/u-boot-nodtb.bin LDFLAGS="
2. Compiled results, fip.bin generated:
3. Burn to S32G399A board to nor-flash with S32 Flash tool, , BL2 cannot booting BL31, you can check my print below,
I can see SW stuch at io_read() of function of load_image()
in addition, if i use compile command of:
make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/oven/work/bsp_41/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_defconfig/u-boot-nodtb.bin LDFLAGS=""
no uart print if i burn to nor-flash with S32 Flash tool, so i think we should not use fip.bin(sd-card), we must use fip.bin(qspi), am I right?but i cannot see any infomation in your docuemnts.
can you help to check my operation and tell me whether to modify ATF codes for support Nor-flash start? thanks.
Solved! Go to Solution.
issue is fixed, need to adjust ATF codes, we should put s32_plat_clock_init ahead, thanks.
Hello @xlfd_1981,
From what you posted I understand you are doing manual compilation and flashing of each component. To boot from QSPI you can follow the steps in the BSP41 User Manual [Linux BSP 41.0 User Manual for S32G3 platforms] section 4.2.5 Booting from QSPI from step 4. Update FIP partition containing TF-A and U-Boot images onwards, the steps describe how to flash the binaries from linux or uboot, while booting from another boot source, for example booting from SD card.
You will need to put all your binaries inside the FAT partition of the sdcard I would recommend connecting the card to your computer and putting all the files inside an specific folder like binaries/ to avoid overwriting the Image already on the SD card.
To find the files you can mount the FAT partition like this:
root@s32g274ardb2:~# mkdir temp_dir
root@s32g274ardb2:~# mount /dev/mmcblk0p1 temp_dir/
root@s32g274ardb2:~# ls -l temp_dir/
total 14312
-rwxrwx--- 1 root disk 14544904 Apr 5 2011 Image
drwxrwx--- 2 root disk 2048 Sep 20 2024 'System Volume Information'
drwxrwx--- 2 root disk 2048 Apr 28 17:44 binaries
-rwxrwx--- 1 root disk 58229 Apr 5 2011 s32g274a-rdb2.dtb
-rwxrwx--- 1 root disk 44992 Apr 5 2011 s32g_pfe_class.fw
root@s32g274ardb2:~#
As you can see, after mounting the FAT partition you can access the current Image, Device Tree and PFE FW and you will also find your binaries/ folder.
Now you can follow the steps I mentioned. I would recommend following the steps for Linux since it will be easier to locate the files from the mounted FAT partition.
After that you can check section 4.3.3 S32G399A RDB3 to know the dip switches configurations needed to boot in QSPI.
I can also recommend to use the Yocto build, which can generate a complete image (including ATF, uboot, Linux and File System) that can be flashed in one step.
For that you can check section 4.1.2.1 Generating the .flashimage file for booting from QSPI and then follow steps 1 and 2 from section 4.2.5 Booting from QSPI.
Let me know if this information helped you with your problem.
Thanks your definite reply and suggestion, as you know, the yocto default compile image bin is for SD-card launching, i have successfully verified with sd-card.
But currently, i need to implment ipcf function, needing M7 bootloader launches M7 application and A53 application at the same time.
So I need to use bootloader launching ATF in Nor-Flash boot state, but it is failed with manually compiled ATF bin (both qspi and sd-card), i use S32FT tool burn the fip.bin to board.
In addition, i can add some print info codes in ATF source codes to looking for why it is failed(pls, the ATF default align value is 16, needs to change 64 according to your referrence manual).
Finally, i want to ask four questions below, please give me clafication if possible.
1. whether need to adjust below align value as we not enable CRC for ATF
arm-trusted-firmware/plat/nxp/s32/s32_common.mk:`FIP_ALIGN := 16`changed to
`FIP_ALIGN := 64` before building.
2. please help to share the "Linux BSP 41.0 User Manual for S32G3 platforms" document, i cannot find this User Manual, from your suggestion steps, they are not same with what BSP32 and BSP38 User Manual's descripted.
3. I have checked my generated fip.bin(support qspi), and get know that it covers BL31 and u-boot, the BL31 DDR address is 0xff600000, BL2 can start but i donot know why cannot sucessfully loading BL31 below shown,
I use below compile commands for generating above fip.bin.
make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/oven/work/bsp_41/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_qspi_defconfig/u-boot-nodtb.bin LDFLAGS=""
4. please tell me whether i use the above commands or use below commands
make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/oven/work/bsp_41/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_defconfig/u-boot-nodtb.bin LDFLAGS=""
unfortunately, the generated fip.bin cannot launch BL2 at all.
I am sorry to ask so many questions.
I have checked bsp38.0 user manual below, it seems we can use command of bitabke fsl-image-flash to generate image running in Nor-Flash, but unfortunately i have checked this method, the Nor-flash overall size is 64M, but my generation image size far beyond it, so this method is not meet my requirement. I need other method, thanks.
Hello @xlfd_1981,
If you require a bootloader to boot both the M7 cores and the A53 cores I can recommend you checking the Bootloader-User-Manual.pdf, in particular section 4 Deployment, this comes from the GoldVIP package available in the AUTO-SW-PACKAGE-MANAGER there you can download the package for the S32G3:
You can find the document in the documentation/ folder.
Answering to your questions:
1. The change is correct, as you will find in page 20 of the document I mentioned before.[Bootloader User Manual, Rev. 1.12.0 — 18 June 2024].
2. To download all files related to BSP41 (User manual, Release notes, precompiled binaries, etc) please follow the instruction below:
- Sign in to your NXP account (NXP Semiconductors)
- Click on My NXP Account (top-right) and click on Software Licensing and Support under the Licensing section within the window it opens.
- This will redirect you to another page. In this new page, select the option View Accounts under the Software accounts section.
- This will again redirect you to another page. On this page, you should see an Automotive SW - S32G - Linux BSP (Cortex-A53) option, click on it.
- Now you should be able to see all the BSP versions available, click on SW32G3 Linux BSP version 41.0.0
- accept the Software Terms and Conditions, now you should be able to see all the documents related to the BSP. and in the .tgz file you will find all the precompiled images.
3-4. As you can see in the image I shared above. Both the u-boot and the ATF should be configured as for SD card. Although they will be flashed in the QSPI flash, they will boot Linux from the SD card.
Please let me know if this information solved your problem or if you have any trouble when following the steps mentioned.
Best regards
Thanks @alejandro_e
1. I cannot download S32G3 relate codes and documents you show me in AUTO-SW-PACKAGE-MANAGER ,they are disabled now, so i do not know how can we use bootlaoder launch M7 and A53 st the same time, or can you attach the user manual(how can bootloader launch A53 and M7) here?
2. BSP41 I cannot download either, could you attach bsp41 the user manual here?
Hello @xlfd_1981,
I'm not able to attach the documents you are asking, I apologize for the inconvenience. To enable the products in the NXP page and the AUTO SW Package manager please contact you FAE/DFAE/NXP representative so they can guide you on how to enable them.
Again, I apologize for the inconveniences.
Let me know if you still have technical questions or doubts.
Thanks @alejandro_e
We can discuss about how to lanuch M7 application and A53 below,
I think we can use three methods for realization launching M7 application and A53 at the same time.
1. In QSPI boot mode, we can burn M7 application and ATF to Nor-flash with S32 Flash tool(as you have told, Both the u-boot and the ATF should be configured as for SD card. Although they will be flashed in the QSPI flash, they will boot Linux from the SD card),
Test Results:
ATF cannot be lanuched referring to my original post above.
2. Using bitbake fls-image-flash for compile one supported Nor-FLash image(your suggestion method according to your post above).
Test Results:
Failed for the NOR-flash only 64M memory, which far beyond our currrent comiled image
next to check the solusion feasibility with NXP.
3. Using U-boot startM7 application and boot A53
What your suggestion and comments, thanks.
As I suggested before, the best option is to check the GoldVIP Bootloader user manual, in which you can see the most updated information on how to configure your bootloader. It this is not an viable option for you, you can check AN13750 although it is meant for the S32G2 it can give you an idea on how to configure and flash your multicore application. Unfortunately there is no application note to enable a multicore application in the S32G3 outside the GoldVIP package. Please be aware that to configure the bootloader for multicore application you will need Tresos Studio.
The QSPI suggestion I did before was intended to follow the original post topic.
and about the u-boot approach, we don't have any guide or example on how to do it, so if you choose this approach the implementation will need to be completely on your side.
got yit, thanks.
Hello @xlfd_1981,
If the information I provided in previous messages solved your problem/questions. Can you help me marking it as an accepted solution?
Thanks in advance.
Sorry to responce you, the issue still failed, currently i focus on in Qspi mode, i want ot launch M7 application and ATF via nor-falsh,
M7 application can be launched normally, but ATF cannot be launched, no any print when board start.
I use below command to compile ATF and burn fip.bin to nor-flash,
make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/sandy/connevo/d02a_connevo_a53_sw/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_defconfig/u-boot-nodtb.bin LDFLAGS=""
any updated from you next is welcome.
Hello @xlfd_1981,
I can recommend using the BSP user manual meant for your BSP version, since some commands have small changes that can affect the build process of the different components. I have already shared the steps to download the BSP41 user manual. I'm sorry but as I already stated, I'm not able to share the document here.
If you are able to access the Flexera/Flexnet in the future, I can recommend checking the Integration Reference Examples (Cortex-A53 and Cortex-M7) where you can also find a bootloader user manual. To enter Flexera/Flexnet please follow these steps:
- Sign in to your NXP account (NXP Semiconductors)
- Click on My NXP Account (top-right) and click on Software Licensing and Support under the Licensing section within the window it opens.
- This will redirect you to another page. In this new page, select the option View Accounts under the Software accounts section.
- This will again redirect you to another page. On this page, you should see an Automotive SW – S32G Reference Software option, click on it.
- Now you should be able to see Automotive SW - S32G - Integration Reference Examples (Cortex-A53 and Cortex-M7).
- There you will see all the available version, select S32G3 Platform Software Integration 2023.02 for example.
- Accept the terms and conditions. And you should be able to see a file named Platform_Software_Integration_S32G3_2023_02.exe. After downloading and installing this package you will see the Bootloader_UserManual in the following path: C:/NXP/Integration_Reference_Examples_S32G3_2023_02/documentation/Bootloader_UserManual.pdf
This document should guide you on how to configure your bootloader.
@alejandro_e thanks you, i have download from using your above method, but
ATF still cannnot launched by bootloader in nor-flash boot mode, below is some information
make ARCH=aarch64 PLAT=s32g399ardb3 BL33=/home/oven/sandy/connevo/d02a_connevo_a53_sw/build_s32g399ardb3/tmp/work/s32g399ardb3-fsl-linux/u-boot-s32/2022.04-r0/build/s32g399ardb3_defconfig/u-boot-nodtb.bin LDFLAGS=""
$dd if=fip.s32 of=/dev/sdb skip=512 seek=512 iflag=skip_bytes oflag=seek_bytes
conv=fsync,notrunc
could you help to check and give us surport, thanks.
issue is fixed, need to adjust ATF codes, we should put s32_plat_clock_init ahead, thanks.
Hello @xlfd_1981,
I'm glad to know that you were able to solve your problem! thanks for the information
Best regards,
Alejandro
my NXP Board is s32g399ardb3, Yocto version is BSP41.0, who can help me, thanks