Using gcc makefile for OpenAMP projects
Hello,
I was wondering how hard is to convert the simple OpenAMP_TTY_echo (I have it installing the STM32Cube_FW_MP1_V1.6.0 package from STMicroelectronics' web site) to a Makefile driven project.
I need it so, because the firmware auto building of my BSP (partially based on buildroot, makerootfs and others shell based scritps).
I have a custom board based on the STM32MP151AAA3 and STM32MP151CAA3.
At the moment I am running a vanilla 6.1.55 Linux Kernel on top of Debian 11 Bullseye (11.7) with all needed stuff compiled in as static modules:
CONFIG_REMOTEPROC=y
CONFIG_REMOTEPROC_CDEV=y
CONFIG_STM32_RPROC=y
CONFIG_RPMSG_TTY=y
CONFIG_RPMSG_CHAR=y
CONFIG_RPMSG_CTRL=y
CONFIG_ROMSG_VIRTIO=y
CONFIG_RPMSG_NS=y
CONFIG_STM32_IPCC=yIn that case Linux, will show any remoteproc stuff under /sys (sysfs).
In my device-tree there is everything (I think) set for CM4 execution code:
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
mcuram2: mcuram2@10000000 {
compatible = "shared-dma-pool";
reg = <0x10000000 0x40000>;
no-map;
};
vdev0vring0: vdev0vring0@10040000 {
compatible = "shared-dma-pool";
reg = <0x10040000 0x1000>;
no-map;
};
vdev0vring1: vdev0vring1@10041000 {
compatible = "shared-dma-pool";
reg = <0x10041000 0x1000>;
no-map;
};
vdev0buffer: vdev0buffer@10042000 {
compatible = "shared-dma-pool";
reg = <0x10042000 0x4000>;
no-map;
};
mcuram: mcuram@30000000 {
compatible = "shared-dma-pool";
reg = <0x30000000 0x40000>;
no-map;
};
retram: retram@38000000 {
compatible = "shared-dma-pool";
reg = <0x38000000 0x10000>;
no-map;
};
};and for the Cortex M4 resources:
&ipcc {
status = "okay";
};
&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>;
status = "okay";
};I think everything is configured quite good, following every Wiki page from the wiki.st.com website...
I know at the moment the M4 is not going to use any hardware pin or peripheral devices, and all those stuff must be removed from Linux side, and added to the m4_rproc node and subnodes (I suppose), but for now I only need a simple way to compile the code under the Makefile environment and running it via remoteproc in Linux and using two channels via ttyRPMSG drivers.
Please help, because it is quite important as my company is using more than 30k MPUs/year...
Regards
Gianluca Renzi
