cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug M4 firmware based on "st_image_core" using the EV1 board?

Machilus
Associate III

hello all

i have a STM32MP157C-EV1, and I want to build an m4 core development and debugging environment in minimal "st-image-core".

M4 firmware created using "STM32CudeIDE" can be debugged in "st-image-weston", but an error occurs in "st-image-core".

​What items should be added to "st-image-core.bb" to work normally?

error message :

[ 100.552483] remoteproc remoteproc0: powering up m4

[ 100.555897] remoteproc remoteproc0: Direct firmware load for OpenAMP_TTY_echo_CM4.elf failed with error -2

[ 100.571270] remoteproc remoteproc0: request_firmware failed: -2

[ 100.575829] remoteproc remoteproc0: Boot failed: -2

I will wait for your reply.

11 REPLIES 11
Olivier GALLIEN
ST Employee

Hi @Machilus​ 

Good news but anyway still strange behavior.

If you confirm that this "/lib/firmware" is a file issue only happen on custom board and not on EV1, we can suspect the Yocto adaptation you have made to build "st-image-core" for your custom board.

Can you detail further what you have done ?

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi ​ @OlivierG (ST Employee)

Yes .

This is a phenomenon that only happens on custom board.

I distributed "st-image-core.bb" and dts on custom boards as follows.

<< st-image-core.bb >>

SUMMARY = "OpenSTLinux core image."

LICENSE = "Proprietary"

include recipes-st/images/st-image.inc

inherit core-image

IMAGE_LINGUAS = "en-us"

IMAGE_FEATURES += "\

  package-management \

  ssh-server-dropbear \

  eclipse-debug    \

  "

#

# INSTALL addons

#

CORE_IMAGE_EXTRA_INSTALL += " \

  packagegroup-framework-core-base  \

  packagegroup-framework-tools-base  \

  \

  ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'packagegroup-optee-core', '', d)}  \

  ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'packagegroup-optee-test', '', d)}  \

  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-networkd-configuration', '', d)}  \

  "

<< Allocate virtual device memory from "dts" >>

reserved-memory {

#address-cells = <1>;

#size-cells = <1>;

ranges;

retram: retram@0x38000000 {

compatible = "shared-dma-pool";

reg = <0x38000000 0x10000>;

no-map;

};

mcuram: mcuram@0x30000000 {

compatible = "shared-dma-pool";

reg = <0x30000000 0x40000>;

no-map;

};

mcuram2: mcuram2@0x10000000 {

compatible = "shared-dma-pool";

reg = <0x10000000 0x40000>;

no-map;

};

vdev0vring0: vdev0vring0@10040000 {

compatible = "shared-dma-pool";

reg = <0x10040000 0x2000>;

no-map;

};

vdev0vring1: vdev0vring1@10042000 {

compatible = "shared-dma-pool";

reg = <0x10042000 0x2000>;

no-map;

};

vdev0buffer: vdev0buffer@10044000 {

compatible = "shared-dma-pool";

reg = <0x10044000 0x4000>;

no-map;

};

};

&m4_rproc {

memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,

<&vdev0vring1>, <&vdev0buffer>;

mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;

mbox-names = "vq0", "vq1", "shutdown";

interrupt-parent = <&exti>;

interrupts = <68 1>;

interrupt-names = "wdg";

wakeup-source;

recovery;

status = "okay";

};

After booting up this created distribution,

Error occurs when "OpenAMP_TTY_echo" is built and executed.

This is an error caused by being made into a "/lib/firmware" file.

If you change to a directory, the error disappears.

This is all I did.

Regards.

Machilus.