2021-08-09 03:34 AM
i have read the article, https://wiki.st.com/stm32mpu/wiki/How_to_start_the_coprocessor_from_the_bootloader#Starting_the_coprocessor_firmware
where will i find this in my device tree
#define CONFIG_EXTRA_ENV_SETTINGS \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0" \
...
BOOTENV \
"m4fw_name=rproc-m4-fw.elf\0" \
"m4fw_addr=${kernel_addr_r}\0" \
"boot_m4fw=rproc init; rproc load 0 ${m4fw_addr} ${filesize}; rproc start 0\0" \
"boot_m4_mmc0=if ext4load mmc 0:4 ${m4fw_addr} ${m4fw_name} ; then run boot_m4fw; fi;\0"
"bootcmd=run boot_m4_mmc0; run bootcmd_mmc0\0"
2021-08-12 11:55 PM
Hi,
You should add these line
"m4fw_name=rproc-m4-fw.elf\0" \
"m4fw_addr=${kernel_addr_r}\0" \
"boot_m4fw=rproc init; rproc load 0 ${m4fw_addr} ${filesize}; rproc start 0\0" \
"boot_m4_mmc0=if ext4load mmc 0:4 ${m4fw_addr} ${m4fw_name} ; then run boot_m4fw; fi;\0"
"bootcmd=run boot_m4_mmc0; run bootcmd_mmc0\0"
into <U-boot source code>/include/configs/stm32mp1.h, then re-compile/flash U-boot, bot the device tree.
2021-08-13 03:17 AM
a
2021-08-13 07:57 AM
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_addr_r=0xc2000000\0" \
"fdt_addr_r=0xc4000000\0" \
"scriptaddr=0xc4100000\0" \
"pxefile_addr_r=0xc4200000\0" \
"splashimage=0xc4300000\0" \
"ramdisk_addr_r=0xc4400000\0" \
"altbootcmd=run bootcmd\0" \
"env_check=if env info -p -d -q; then env save; fi\0" \
STM32MP_BOOTCMD \
BOOTENV \
"m4fw_name=rproc-m4-fw_CM4.elf\0" \
"m4fw_addr=${kernel_addr_r}\0" \
"boot_m4fw=rproc init; rproc load 0 ${m4fw_addr} ${filesize}; rproc start 0\0" \
"boot_m4_mmc0=if ext4load mmc 0:4 ${m4fw_addr} ${m4fw_name} ; then run boot_m4fw; fi;\0"
"bootcmd=run boot_m4_mmc0; run bootcmd_mmc0\0"
i copied this in u-boot/include/configs/stm32mp1.h and tried compiling, but i am getting the below error
include/configs/stm32mp1.h:165:9: error: expected identifier or ‘(’ before string constant
165 | "bootcmd=run boot_m4_mmc0; run bootcmd_mmc0\0"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:155: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1837: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
2021-08-15 07:21 PM
There should be one "\" ate the end of
"boot_m4_mmc0=if ext4load mmc 0:4 ${m4fw_addr} ${m4fw_name} ; then run boot_m4fw; fi;\0" \
2021-08-16 11:34 PM
Hi, it solved my compilation issue.And it generated the following files,
But as i am new to MPU development, i don't know what to do next and what steps do i follow next?
Do i need to replace the files in u-boot directory in starter package with these files, and populate the board again OR Do i need to replace the files generated by stm32cubeide(image attached) with these files.
2021-08-17 12:36 AM
PD 0x06 ssbl Binary mmc0 0x00084400 bootloader/u-boot.stm32
then re-flash the board.
The cubeIDE generated files only the dtb file, are not useful.
2021-08-19 01:17 AM
i am extremely sorry but i didn't understood this part
" PD 0x06 ssbl Binary mmc0 0x00084400 bootloader/u-boot.stm32
then re-flash the board.
The cubeIDE generated files only the dtb file, are not useful."
2021-08-19 01:20 AM
is there any video which shows step by step process to start the coprocessor from bootloader?
2021-08-20 03:02 AM
what are you using to flash the board? and how do you compile the u-boot image, with CubeIDE?