IMX8MM Cortex M4 m_data size issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MM Cortex M4 m_data size issue

602 Views
Dhevan
Contributor IV

Hi,

   I am using 5.4.24 kernel version.

   DTS File:

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		m4_reserved: m4@0x80000000 {
			no-map;
			reg = <0 0x80000000 0 0x1000000>;
		};

		vdev0vring0: vdev0vring0@b8000000 {
			compatible = "shared-dma-pool";
			reg = <0 0xb8000000 0 0x8000>;
			no-map;
		};

		vdev0vring1: vdev0vring1@b8008000 {
			compatible = "shared-dma-pool";
			reg = <0 0xb8008000 0 0x8000>;
			no-map;
		};

		vdevbuffer: vdevbuffer@b8400000 {
			compatible = "shared-dma-pool";
			reg = <0 0xb8400000 0 0x100000>;
			no-map;
		};
	};

	imx8mm-cm4 {
		compatible = "fsl,imx8mm-cm4";
		rsc-da = <0xb8000000>;
		clocks = <&clk IMX8MM_CLK_M4_DIV>;
		mbox-names = "tx", "rx", "rxdb";
		mboxes = <&mu 0 1
			  &mu 1 1
			  &mu 3 1>;
		memory-region = <&vdev0vring0>, <&vdev0vring1>, <&vdevbuffer>;
		syscon = <&src>;
	};
};

 

I want to allocate big buffer(ex 100kb) in m4 side.

When ever am trying compile the code am getting error as a m_data size exceed.

/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: ddr_debug/rpmsg_lite_str_echo_rtos_imxcm4.elf section `.bss' will not fit in region `m_data'
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: region m_data overflowed with stack and heap
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: region `m_data' overflowed by 2699576 bytes
collect2: error: ld returned 1 exit status
CMakeFiles/rpmsg_lite_str_echo_rtos_imxcm4.elf.dir/build.make:1074: recipe for target 'ddr_debug/rpmsg_lite_str_echo_rtos_imxcm4.elf' failed
make[2]: *** [ddr_debug/rpmsg_lite_str_echo_rtos_imxcm4.elf] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rpmsg_lite_str_echo_rtos_imxcm4.elf.dir/all' failed
make[1]: *** [CMakeFiles/rpmsg_lite_str_echo_rtos_imxcm4.elf.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

 

I had tried both ddr_debug and tcm_debug am getting same error.

If possible to increase m_data size in ld file?

How to increase m_data size ?

Thanks & Regards,

      Vasu

Labels (1)
0 Kudos
Reply
1 Reply

547 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

If this is does still help, I think it may be better to run at DDR and not TCM if you have already exceeded the size.

 

You may increase m_data at liner file just make sure that you increase the reserved memory size in device tree as well.

 

Best regards,
Aldo.

0 Kudos
Reply