mqxboot and Kernel 3.13

cancel
Showing results for 
Search instead for 
Did you mean: 

mqxboot and Kernel 3.13

Jump to solution
1,085 Views
johannestraxler
Contributor III

Dear Freescale/Timesys,

I updated our Phytec PCM052 platform to the new kernel 3.13 with device tree support, but I have a problem regarding the application "mqxboot".

When I start the application I get the usual output in linux:

# mqxboot aci_mqx_m4.bin 0x3f000000 0x3f0004e1

Loading aci_mqx_m4.bin to 0x3f000000 ...

len=1024

len=1024

len=1024

...

...

...

len=1024

len=1024

len=656

Loaded 101008 bytes. Booting at 0x3f0004e1...

done

But the program does not start on M4 (I have debug outputs on M4 on a second serial interface). The mcc kernel module has been loaded before, and I double checked the correct address for load and start with the map file of M4. When I load exactly the same binary on the previous Kernel 3.0 it works. Is there anything, which needs to be adapted for Kernel 3.13?

Thanks,

Johannes

Labels (4)
0 Kudos
1 Solution
282 Views
johannestraxler
Contributor III

Last week I got the solution from Timesys. I was affected by two problems:

1) If you have UART2 enable in MQX and Linux there is a conflict, therefore I disabled UART2 on MQX (in the MQX user config file) and left it as default serial for Linux.

2) There is a conflict when using SPI in MQX and Linux, so my solution was to disable all SPI interfaces in the device tree. I found out when Linux has initialized the DSPI and MQX tries to initialize it too (which is done in the MQX init routines) it will hang in an endless loop. This is the problem, why it seemed that mqxboot won't work.

View solution in original post

0 Kudos
12 Replies
282 Views
jackblather
Senior Contributor I

Which version of MQX are you using?

0 Kudos
282 Views
johannestraxler
Contributor III

MQX is at version 4.1.0

0 Kudos
282 Views
Nouchi
Senior Contributor II

Hi Johannes,

IMHO, it's not a MQXboot issue, it's rather an mcc_lib version problem, AFAIK, mcc_lib linux is version 1.2 and MQX mcc_lib is 2.0.

So, we have to wait for a Linux mcc_lib update, or you can downgrade (taken from MQX 4.0.2)  MQX mcc_lib.

Regards,

Emmanuel

0 Kudos
282 Views
johannestraxler
Contributor III

Dear Emmanuel,

do you have the same problem too?

I'm using following tool versions:

libmcc: 1.05

mcc-kmod: 1.06

MQX: 4.1.0

Personally I think, that the problem is situated on linux side only, because even the startup message (on M4 debug uarts) does not appear. I also tried a fully reduced M4 program which only blinks a LED every 200ms, without any MCC functions - this doesn't work either.

Timesys - can you please help here?

0 Kudos
282 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

One way that could give us a clue if it is linux problem is to load the binary with uboot and start the core from u-boot before booting Linux. At least we should be able to see a startup message of the M4 in case there is one of course.

Something like this:

fatload mmc 0:1 0x3f000000 aci_mqx_m4.bin

mw.l 0x4006e028 0x3f000485

mw.l 0x4006b08c 0x00015a5a

/Alejandro

282 Views
johannestraxler
Contributor III

Dear Alejandro,

Thanks for your proposition. Booting the M4 from uboot works!

When I then start the linux kernel afterwards with "boot" the M4 stops working, so I think it is obviously a problem related to the new linux kernel.

I also checked the behaviour with a ULinkPro debugger:

  1. Boot linux 3.13
  2. Start debug session in DS-5 with uLinkPro
  3. Run the application - nothing happens
  4. Pause the execution I can see, that MQX has started, but there is only one task called "System". This tasks runs the scheduling functions "find_noempty_que" and "no_one_to_run" from "dispatch.S".

I think that with Kernel 3.13 it was not possible to create any runable tasks on MQX, but the big questions is in how far linux can influence the task creation of MQX?

0 Kudos
282 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Let me try to reproduce the problem. I just wonder where you got the Linux version you used.

As far as I know MQX should run from iRAM and all the TCBs of MQX should be created there as well.  I will have to check if Linux for some reason uses or links some code to iRAM that erases the TASK ready queues.

Best Regards,

Alejandro

0 Kudos
282 Views
johannestraxler
Contributor III

Dear Alejandro,

I ported my MQX application to version 4.0.2 (as seen for download on timesys/linuxlink). It is the same behaviour: I'm able to start it from the bootloader, but as soon as the Kernel 3.13 is running the M4 application stops working.

Have you found out anything yet?

Thanks, Johannes

0 Kudos
283 Views
johannestraxler
Contributor III

Last week I got the solution from Timesys. I was affected by two problems:

1) If you have UART2 enable in MQX and Linux there is a conflict, therefore I disabled UART2 on MQX (in the MQX user config file) and left it as default serial for Linux.

2) There is a conflict when using SPI in MQX and Linux, so my solution was to disable all SPI interfaces in the device tree. I found out when Linux has initialized the DSPI and MQX tries to initialize it too (which is done in the MQX init routines) it will hang in an endless loop. This is the problem, why it seemed that mqxboot won't work.

View solution in original post

0 Kudos
282 Views
jackblather
Senior Contributor I

Is this with MQX 4.1.0? I have not been able to get it to start from U-boot with MQX 4.1.1, but I can with MQX 4.0.2.

I have the same problems with starting the MQX 4.0.2 program with "mqxboot".

0 Kudos
282 Views
Nouchi
Senior Contributor II

Could you check your mqxboot parameters match with the Image entry point address

0 Kudos
282 Views
johannestraxler
Contributor III

Dear Emmanuel,

I double checked the correct address (resp. mqxboot parameters) for load and start with the map file of M4.

Exactly the same call work on the previous Kernel 3.0.

Excerpt of mapfile:

Memory Map of the image

  Image Entry point : 0x3f0004e1

  Load Region LOAD_REGION_INTRAM (Base: 0x3f000000, Size: 0x0000a8ac, Max: 0xffffffff, ABSOLUTE, COMPRESSED[0x0000a758])

0 Kudos