Boot M4 automatically on i.MX6 SoloX SABRE-SDB

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

Boot M4 automatically on i.MX6 SoloX SABRE-SDB

Jump to solution
1,520 Views
jasonqueen
Contributor I

Hi there, 

I am trying to get the M4 core to boot before the A9 core on the i.MX6 SoloX SABRE-SDB. It is important for me to have the M4 boot quickly and then have the A9 follow. I have successfully developed a FreeRTOS application for the M4 which only utilities FlexCan to communicate to other devices. When I boot the M4 manually in uboot everything works perfectly. However, when I try boot the M4 automatically before the A9 then the application works fine until the A9 begins to boot into Linux.

I have added the following variable to uboot which I use to boot the M4 core with my application:

   startm4=fatload mmc 2:1 0x80000000 driver_control_code.bin; dcache flush; cp.b 0x80000000 0x7F8000    0x8000; dcache flush; bootaux 0x7F8000;

I have changed the the following variables in uboot (changes are in bold):

   fdt_file = imx6sx-sdb-m4.dtb

   bootcmd=mmc dev 2;mmc dev 2; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage;    then run startm4; run mmcboot; else run netboot; fi; fi; else run netboot; fi

   mmcargs=setenv bootargs uart_from_osc console=${console},${baudrate} root=${mmcroot}

Any advice on how to automatically boot the M4 before the A9 correctly?

Thanks,

Jason

Labels (1)
1 Solution
1,044 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Jason,

there are examples provided by FreeRTOS. The following document explains how to run RPMsg demo which sends messages from one core to another, but there are also other simple examples such as starting a simple hello world in M4 from A9.

Running RPMsg Demo Applications for Multicore Communication with IMX6SX and IMX7D 


Best regards,
Carlos

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

View solution in original post

3 Replies
1,044 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Jason,

Booting M4 before A9 is impossible.

In IMX6SX Reference Manual you can find

         13.5 Cortex-M4 Boot Requirements
• Cortex-A9 always boots as the primary core.
• Cortex-M4 does not have a boot ROM and at POR is not provided a clock
• Cortex-A9 user code is responsible for the following:
• Loading and authenticating Cortex-M4 firmware by HAB API or with Cortex-
A9 firmware together as a unified image by boot ROM.
• Launching the Cortex-M4 by enabling its clock and clearing its reset bit in SRC
(See System Reset Controller Chapter for more details).


Best regards,
TIC

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

1,044 Views
jasonqueen
Contributor I

Hi Carlos,

Thanks for your reply. Sorry for my late response I was on leave for a few weeks.

Okay, my question then is how do I write a user application for the A9 to boot the M4?

I am yet to find any good resources and examples of how to write an A9 user application to do this? I have compiled the Yockto Linux BSP that Freescale provides and the SDK. I can compile user applications but not sure what to put into the user application to get the M4 booting and how to configure it to get the M4 booting automatically.

Regards,

Jason.

0 Kudos
1,045 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Jason,

there are examples provided by FreeRTOS. The following document explains how to run RPMsg demo which sends messages from one core to another, but there are also other simple examples such as starting a simple hello world in M4 from A9.

Running RPMsg Demo Applications for Multicore Communication with IMX6SX and IMX7D 


Best regards,
Carlos

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