Hi,i am a beginner in MPU development. I have created cortex-M4 firmware project using stm32cubeide , but how can i start my firmware at the time of bootup?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-09 3: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"
- Labels:
-
ST-Boards
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-13 3:17 AM
a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-13 7: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-15 7: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" \
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-16 11:34 PM
Hi, it solved my compilation issue.And it generated the following files,
- u-boot (executable) file
- u-boot.bin
- u-boot.cfg
- u-boot.cfg.configs
- u-boot.dtb
- u-boot.lds
- u-boot.map
- u-boot.srec
- u-boot.sym
- u-boot-dtb.bin
- u-boot-nodtb.bin
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-17 12:36 AM
- First you need to check the starter package version you used, if you use v2.x or v1.x, you should replace <starter_package_patch>/.../bootloader/u-boot-stm32mp177x-dkx-trusted.stm32 with u-boot.stm32 (generated), but looks, you don't have it in you list, so I guess you are using v3.0, which FIP package is used, this version is a little complex, you need more step to do this. so I suggest you to change to v2.x to start learning.
- If you change/check the version you used is v2.x, check out corresponding u-boot version, then recompile to get u-boot.stm32.
- Replace <starter_package_patch>/.../bootloader/u-boot-stm32mp177x-dkx-trusted.stm32 with u-boot.stm32 (generated).
- copy a tsv file like FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv, re-name to FlashLayout_sdcard_stm32mp157c-dk2-trusted-test.tsv, then modify the u-boot file with correct name, like:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-19 1: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."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-19 1:20 AM
is there any video which shows step by step process to start the coprocessor from bootloader?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-20 3:02 AM
what are you using to flash the board? and how do you compile the u-boot image, with CubeIDE?
