Hello,
I encounter difficulties to load and run M4 applications from linux with mqxboot. Applications works fine from debugger.
I build (successfully) and I tried mcc-pingpong demo without success (from timesys wiki).
From Timesys wiki the commande line is : mqxboot pingpong_example_twrvf65gs10_m4.bin 0x3f000000 0x3f000485
0x3f000000 is the load address in internal RAM, right?
and 0x3f000485 is the start address (odd address ???).
When I launch this, it crashes linux (have to hard reset).
Which address should I use ?
In the linker map file this line seems to interesting :
0x3f0004e0 0x00000068 Code RO | 1055 * . text | psp.a(boot.o) |
In this case 0x3f0004e0 seems to be the entry point.
If I try to launch mqxboot /home/demo-items/accelerometer_example_twrvf65gs10_m4.bin 0x3f000000 0x3f000485 (which is already build), it works.
Is there something to do with DS-5, it seems all things I build don't work.
I'm lost, somebody can help me.
Regards,
Emmanuel
Edit :
Now it works but :
- The Start address seems to be the Entry point address + 1
Somebody can explain why "+ 1" ?
Solved! Go to Solution.
Hi Emmanuel,
The entry point I was referring to is defined at the top of the mapfile - at line 7 for me:
ARM Linker, 5.03 [Build 102]
=========================================================
Memory Map of the image
Image Entry point : 0x3f0004e1
Section 19.11 in the Vybrid Reference manual specifies that the entry point should always be
odd because the Cortex-M4 supports only Thumb Mode - which I believe is why you needed to
add 1 to the other address you mention.
Thanks,
Timesys Support
What version of MQX is it?
Btw. karinavalencia, I will on this, but isn't this question better suited for timesyssupport?
Hello,
It's MQX 4.0.2. Now, I can run MQX application from linux. I just like to know why start address must be Entry Point Address + 1.
In my case start address wasn't 0x3F0000485, because I compiled MQX with MQX_ROM_VECTORS 0, and I'm not ARM specialist (I'm a 68K old school man).
I don't find documents which explain how to use mqxboot.
Thanks,
Emmanuel
Hi Emmanuel,
To review, the usage of mqxboot is:
mqxboot <binary MQX image> <load address> <entry point>
You can find both the values of the load address and entry point in mapfile.map generated during the MQX image build. The entry point may not be 0x3f000485 if you have changed any MQX configuration options, so it is a good practice to verify the entry point in the mapfile.
Thanks,
Timesys Support
Hello,
I understand how to use mqxboot, but why start address must be Entry Point address + 1?
Hi Emmanuel,
The entry point I was referring to is defined at the top of the mapfile - at line 7 for me:
ARM Linker, 5.03 [Build 102]
=========================================================
Memory Map of the image
Image Entry point : 0x3f0004e1
Section 19.11 in the Vybrid Reference manual specifies that the entry point should always be
odd because the Cortex-M4 supports only Thumb Mode - which I believe is why you needed to
add 1 to the other address you mention.
Thanks,
Timesys Support
hello,
This seems to be a good explanation.
Thanks,
Emmanuel
timesyssupport can you review this case and share your comments?