I use imx6sx board. On A9 core run linux, on M4 core run MQX 4.1.
M4 binary is mapped in DDR from 0x80000000 to 0x80800000. This region is reserved by dts configuration.
I need to load M4 binary from linux user space application more times.
I'd like to know if exist a procedure supported by nxp that defines how to do.
I searched on the community, forum, etc but I only found cases where the loading is done by u-boot
Francesco
I echo Ryan's question, did anyone get this working or have an example ?
Did you happen to get this working? I am attempting to do the same using the iMX7 Dual. An example to compare against would be great.
Thanks,
Ryan
Is the issue stopping the M4 and reloading new firmware without the M4/A9 halting? or becoming non-repressive the issue?
M4 would have to be halted. The easiest way to do that is by asserting non-self-clearing SW reset for M4 in SRC Control Register (bit 4).
A9 doesn't need to be halted as A9's used memory region doesn't overlap with M4's (if mapping the memory for Linux was done properly).
Hi Francesco,
to load binaries from Linux user-space to memory region dedicated for M4 seems like one would have to implement a Linux device driver. The driver would be accessible from user-space with standard functions for file operations (fopen, fclose,..).
You could look at Writing a Linux Kernel Module — Part 2: A Character Device | derekmolloy.ie
The described driver can easily be integrated in your Yocto build and it's a good start for implementing your custom driver.
More detailed description of Linux device drivers can be found at Linux Device Drivers, Third Edition [LWN.net]
The memory region in which you want to write to would have to be mapped from physical to virtual address space. Chapter 9 in the Linux Device Drivers describes how to do so.
This link could also be helpful: http://stackoverflow.com/questions/11621911/mapping-physical-addresses-to-virtual-address-linux
Best regards
Zvonimir
Are you aware of any working examples from the community?
Hi Francesco
right, BSP supports M4 application loading only by u-boot.
Seems one will have to develop own linux user space application
using example on:
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------