Re: Using the Cortex M4 on IMX7D


Michael Graichen
 

Am 26.02.21 um 17:27 schrieb Kumar Gala:

On Feb 26, 2021, at 3:43 AM, Michael Graichen <michael.graichen@hotmail.com> wrote:

Hey,

I have just started working on a IMX7D (https://www.kontron.de/products/boards-and-standard-form-factors/smarc/smarc-samx7.html) together with Zephyr
I noticed that the Colibri iMX7 Board has support for the Cortex M4.
So I've build an example by using:

cmake -GNinja -DBOARD=colibri_imx7d_m4 ../samples/basic/blinky

and tried to load that on the Cortex M4

echo -n zephyr.elf > /sys/class/remoteproc/remoteproc0/firmware
and
echo -n start > /sys/class/remoteproc/remoteproc0/state

Unfortunatly the start fails because the elf-file has no resource table.
I can select TOP ---> Additional libraries ---> [*] coprocessor resource table within menuconfig
but the resulting elf-file is still missing the resource table.

What am i missing? How can a add a resource table to the elf-file?

best regards
Michael
I don’t believe the remoteproc loading was ever supported for the imx family with zephyr. This is something you’d need to add support for. I think it might be supported on the STM32 MP1 as an example. (I added Arnaud on CC as he added the STM32 MP1 support).
For the i.mx I think you can load via u-boot and there’s a section in the zephyr board docs here about it:
https://docs.zephyrproject.org/latest/boards/arm/colibri_imx7d_m4/doc/index.html
- k
Thanks for your reply.

This link was the reason why I thought to give it a try. But I'm using barebox as a bootloader right now, so I thought to test "the Linux way" first. I guess I will test u-boot next week.

I have looked over the boot instruction from the link.
u-boot is using the plain .bin file for loading the M4 while remoteproc is using the .elf file.

Is it right that all those environment variables, especially 'setenv m4addr 0x007f800' that are set in u-boot before booting the M4 should come out of the resource table when using remoteproc?

Do you have more information about how a resource table for the IMX7-M4 should look like?



Have a great weekend.
Michael

Join users@lists.zephyrproject.org to automatically receive all group messages.