iMx6sx cortex M4 program size problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

iMx6sx cortex M4 program size problem

跳至解决方案
1,959 次查看
huihuang
Contributor II

Hi

Could you please help me? I am developing a system using imx6sx, and I have a problem with the M4 core. I am using the FreeRTOS BSP provided by NXP, and I want to read ADC in Cortex M4, do a simple process (filtering and level detecting), then send the result to the Cortex A9 which is running the Linux OS. I ran the RPMSG examples (the PingPong and string examples) successfully, and I thought I could enhance these to my benefit. But the problem is these examples take almost all of the 32K space available in the program memory (TCM in my case).

Is there any way to enlarge the program memory? Or are there other BSPs with a smaller footprint?

I should add a simple program (just main function with a printf function) takes 11K using this BSP, RPMSG approximately 15K, and FreeRTOS occupies 4K.

Thanks in advance Best Regards.

标签 (2)
标记 (1)
0 项奖励
1 解答
1,408 次查看
art
NXP Employee
NXP Employee

First, please note that the i.MX6SoloX processor has two TCM regions, Upper TCMU and Lower TCML, located directly one after another in the memory space. Seems that you can use them both, so, having more space for the application.

Another way is to run the code in some location other than TCM, e.g. in OCRAM or DDR. For more information, please refer to attached documents. Note that AN5127 discusses the MQX RTOS, but it can be applicable to the FreeRTOS as well.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

4 回复数
1,409 次查看
art
NXP Employee
NXP Employee

First, please note that the i.MX6SoloX processor has two TCM regions, Upper TCMU and Lower TCML, located directly one after another in the memory space. Seems that you can use them both, so, having more space for the application.

Another way is to run the code in some location other than TCM, e.g. in OCRAM or DDR. For more information, please refer to attached documents. Note that AN5127 discusses the MQX RTOS, but it can be applicable to the FreeRTOS as well.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,408 次查看
huihuang
Contributor II

Hi Artur,

Thanks for your helpful reply.

I used the AN5127 and changed the FreeRTOS BSP (mostly the linker command file) to boot from 0x80000000 (DDR). Also, I modified the Linux side as mentioned in the application note. The result is somewhat satisfying. Other than RPMSG, the examples work fine even when the program size exceeds from 32KB. So Thank you.

About the RPMSG example, which is crucial for my project, I suppose I must change the shared memory address somehow. The problem is during initialzing, the rpmsg init function waits for the Linux side module (rpmsg_tty.ko) to be installed. Although the module is installed correctly, the M4 application is stuck. I searched the community and found out some post in which people asked about the increasing the size of the rpmsg buffer, not in detail though.

Do you have any idea?

Thanks in advance.

Kind Regards.

0 项奖励
1,408 次查看
rewers
Contributor II

I have a similar problem with the i.MX7 SABRE. I would like to run RPMSG string echo example from OCRAM, but after installing the Linux module the M4 application is stuck. To run the application from OCRAM I just changed the make file to use MCIMX7D_M4_ocram.ld instead of MCIMX7D_M4_tcm.ld

Did you solved yout problem or anyone other has an idea on this issue?

0 项奖励
1,408 次查看
huihuang
Contributor II

I found the problem, but still I am looking for the solution. The problem is when the cortex m4 application is running from ddr (0x80000000), the interrupts, including rpmsg, are not working.

Any ideas?

Thanks.

0 项奖励