cancel
Showing results for 
Search instead for 
Did you mean: 

Debuggin M4 Firmware on a custom SOM based on STM32MP153A using STMCUBEIDE

jutoroa
Associate III

Hello to everyone!

We have develop a System on Module board based on the STM32MP153AAB. Currently it have a custom Yocto Image build, that it's working. The process followed  almost all the steps in the wiki for the STM32MP157F-DK2 discovery kit, however, some pins had to change due to the custom design. Now we have encountered a problem debugging the M4 firmware in the custom SOM. This firmware currently works in the MP157F-DK2 discovery kit (The debug too).

 

Trying to fix this, we have used the STM32CubeIDE 1.14.0 to develop a blinky example on the M4, and the STLINK-V2 to start the debugging. The STLINK-V2 it's correctly recognized by the STM32CubeIDE. Besides that, we have not been able to debug. We can download and run the .elf manually on the board, following the steps in the wiki using sys and remoteproc interface: https://wiki.st.com/stm32mpu/wiki/Linux_remoteproc_framework_overview 

 

LED blinks okay. Because we are in a custom PCB, don't have access to engineering Mode for debugging. So, in Production Mode (STMCubeIDE) the ssh download progress starts, and stops getting:

 

 

Error in final launch sequence:
 
Failed to execute MI command:
 
target remote 192.168.2.44:3333
 
Error message from debugger back end:
192.168.2.44:3333: Connection timed out.
Failed to execute MI command:
target remote 192.168.2.44:3333
 
Error message from debugger back end:
192.168.2.44:3333: Connection timed out.
192.168.2.44:3333: Connection timed out.

 

 

And the serial connection logs:

 

 

[ 2174.385112] remoteproc remoteproc0: stopped remote processor m4
[ 2179.484162] remoteproc remoteproc0: powering up m4
[ 2179.493251] remoteproc remoteproc0: Booting fw image STM32MP153AAB_TEST_CM4.elf, size 2489804
[ 2179.500701] remoteproc remoteproc0: header-less resource table
[ 2179.506452] remoteproc remoteproc0: no resource table found for this firmware
[ 2179.513765] remoteproc remoteproc0: header-less resource table
[ 2179.519465] remoteproc remoteproc0: remote processor m4 is now up
-ne 
-sh: -ne: not found

 

 

For this, I have checked the posts here in the community whithout getting a solution.

I know that it's not the "missing the resource_table section needed by remoteProc Linux framework". Because I'm using the same resource_table generated by the STMCubeIDE. I attach the STMCUBEIDE Project. 

This is my node remoteproc and memory regions for my Kernel devicetree:

 

 

&m4_rproc{
	/*Restriction: "memory-region" property is not managed - please to use User-Section if needed*/
	resets = <&scmi_reset RST_SCMI_MCU>,
                 <&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
    reset-names = "mcu_rst", "hold_boot";
    /delete-property/ st,syscfg-holdboot;
	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
	mbox-names = "vq0", "vq1", "shutdown";
	status = "okay";
	

	/* USER CODE BEGIN m4_rproc */
	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
			<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
	interrupt-parent = <&exti>;
	interrupts = <68 1>;
	wakeup-source;
	/* USER CODE END m4_rproc */

	m4_system_resources{
		status = "okay";

		/* USER CODE BEGIN m4_system_resources */
		/* USER CODE END m4_system_resources */
	};
};



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;
	};
	mcu_rsc_table:mcu_rsc_table@10048000{
		compatible = "shared-dma-pool";
		reg = <0x10048000 0x8000>;
		no-map;
	};
	mcuram:mcuram@30000000{
		compatible = "shared-dma-pool";
		reg = <0x30000000 0x40000>;
		no-map;
	};
};

 

 

Are we missing something to be able to DEBUG?

Thank you!

Best regards,

Juan P. 

@LudovicR @Tesla DeLorean 

0 REPLIES 0