modify the .mk file and .lcf file,the program can not run

cancel
Showing results for 
Search instead for 
Did you mean: 

modify the .mk file and .lcf file,the program can not run

234 Views
hongjinzeng
Contributor IV

Hi everyone,

  I use simulink generator the mpc5643l program.if I do not modify the .mk file and .lcf file,the program can run.After I modify those files,the program can not run.

First,I creat a model in the simulink by MCToolbox for mpc5643l.I upload the model file in the accessory.

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

Second,I build the model without any modify.Through click the build button,the elf file automatic generate.

pastedImage_5.png

pastedImage_7.png

Third,I download the .elf file to the trk-usb-mpc5643l through the S32DS for power by Executable File Importer.

pastedImage_8.png

pastedImage_9.png

pastedImage_10.png

Fourth,I debug the program by S32DS.In the debug interface,I click the run button.The program can run without any error.

pastedImage_11.png

pastedImage_12.png

Then I modify the MPC564xLFlash.lcf and secondtestmodel.mk file.

In the secondtestmodel.mk,the old version

pastedImage_13.png

the new version

pastedImage_14.png

In the MPC564xLFlash.lcf,the old version

pastedImage_17.png

pastedImage_18.png

the new version

pastedImage_15.png

pastedImage_16.png

Then I use the cmd to build the program.

pastedImage_19.png

the build successful

pastedImage_20.png

Then through the above method,I download the program to the board and debug the program.

In the debug process, I click the run button,after several seconds,I click the suspend button,the program run to 0x0.

pastedImage_21.png

I face the problem in several days.

I would appreciate it if you could solve the problem.

Tags (3)
0 Kudos
2 Replies

57 Views
hongjinzeng
Contributor IV

After I modify the -romaddr 0x00013000 -rambuffer 0x00013000,The program can run.

57 Views
dumitru-daniel_
NXP Employee
NXP Employee

lukaszadrapa‌ / petervlna‌,

This issue is reported by a customer that wants to build a custom bootloader using MPC5643L. He used the Model-Based Design to generate the code and that worked. Now - he want to change the linker command file to move the code/data section to make it suitable for his bootloader. I suggested him to add this thread on MPC5xxx community to have a access to expert support on that - since here in MBDT we do not cover for such issues.

I think someone moved back the thread back to us just because of Simulink references - but ultimately the issue is about configuring the MPC5643L linker files.

Can you handle this ?

Thank you!

Daniel

0 Kudos