MCU Linker Issue for Multicore project

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

MCU Linker Issue for Multicore project

3,797 Views
gauravmore
Contributor III

I am using LPC4367. I was using LPC Xpresso but now i want to switch to MCU Xpresso so i have installed MCUXpresso IDE v10.1.0 and created the multicore project for LPC4367. While compiling the project  (M4 Prj) i got follwoing error.

Building target: M4_Prj.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"D:\RELAY DEVLOPMENT\NEW FEEDER RELAY\ESE\Team\Gaurav\Code\MCU\MCU_TestPrj\lpc_chip_43xx\Debug" -Xlinker -Map="M4_Prj.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T "M4_Prj_Debug.ld" -o "M4_Prj.axf" ./src/M4_Prj.o ./src/cr_start_m0.o ./src/cr_startup_lpc43xx.o ./src/crp.o ./src/sysinit.o -llpc_chip_43xx

/* This is consle window Output*/
c:/nxp/mcuxpressoide_10.1.0_589/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: No slave code for _core_m0app
M4_Prj_Debug.ld:173: undefined symbol `__vectors_start___core_m0app' referenced in expression
collect2.exe: error: ld returned 1 exit status
make: *** [M4_Prj.axf] Error 1

/* This is in problem window*/
make: *** [M4_Prj.axf] Error 1 M4_Prj C/C++ Problem
No slave code for _core_m0app M4_Prj C/C++ Problem
undefined symbol `__vectors_start___core_m0app' referenced in expression M4_Prj_Debug.ld /M4_Prj/Debug line 173 C/C++ Problem

Please find attached code for which is giving this error of linker. 

Kinldy provide the solution or let me know if any modification is required in the project created since it is created for M0Sub,M0App, M4.

Also let me know whether MCU xpresso supports LPC4367 tricore or not.

This similar issue is there in the LPC Xpresso 8.2.2 Version 

Labels (1)
0 Kudos
Reply
22 Replies

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to refer to the multicore demos in the LPC4376's LPCOpen library as the template.
The download link of the LPC4376's LPCOpen library is below.

LPCOpen Software for LPC43XX|NXP
Have a great day,
TIC

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

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

Hev you check the project tha i have created in MCU expresson? Please check an let me know is there anything that ia have missed. Also i am attaching the LPC xpresso project which also has the same issue. Request you to please chect the project and let me kwno mean while i will go through the link that you have shared and also chec with that if it is possible to creat milticore project using the share data. but it seems all the project of multicore is for 2 cores not for 3 cores. 

But still  i will check and let you know

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

I have created the project now and it is created properly. Fund the issue. It was related to the procudure. i was creating  M4 creo project first and then slave core project. Instead i did it in reeverse manner and then it is resolved. 

I am able to creste project in MCU xpresso and  LPC Xpresso. Validation of both is still pending . need to check whether it can debug or not.

Will let you know if there is any issue regarding the same.

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy

I Am able to create th multicore project and compile the same but when i am tring to debug this project then i am not able debug it since it is not booting the M0App and M0Sub core and when trying the do, it is terminating the  M0 cores. 

Even thoguh the project is a multicore project but still it is only running M4 core.

I am attacting the project for your reference. Request you to please check and let me know whether the same behaviouri is at you end.

I am using LPC Xpresso 8.2.2_695 and MCU Xprsso  10.2.2_795

 Kindly check botht e project since both are having similar behaviour.

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

As the Con Verse mentioned, I made a mistake before.
Whether you want to debug the multi-core simultaneously.
Have a great day,
TIC

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

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

I did not get what you want to say. It is mentioned in LPC Expresso while creating a project that it supports for multicore project. 

have you checked the project attached. Request you to please check LPC  xpresso Project (LPC4367_Multicore.zip)

In case of the MCU xpresso as per the guide Rev. 10.1.0 — 14 November, 2017 no chapter 18 is there and neither in LPC xpresso usier guide.

I want to debug the code one by one means first m4 Core wil l be loaded then the m0app core will be loaded. whiel runnning m4 core should be starting the m0App core and 

then it m0App core shall be running.

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
converse
Senior Contributor V

MCUXpresso 10.3.0 User guide - 27 November 2018. Chapter 18.

https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf 

But , as far as I remember, it has worked this way since LPCXpresso days.

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

If  it has worked this way since LPCXpresso days. Then please check for the LPC Xpresso project and provide the solution for the same.

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

To provide the fastest possible support, I‘d like to suggest you refer to the thread to learn how to debug the LPC43xx's multicore projects.

LPC43xx Cortex-M4 / M0 Multicore Applications 
Have a great day,
TIC

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

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

As per the reply from you qand Con Verse, I read the document and created the project. As i mentioned earlier that i was able to create the project but when i lauch for debugging i am able to launch both m0App and M4 but when i am running the code it is not going from m4 main() to m0App main () function as per the document and forums . 

when i click on the main () of m0App the debug session gets terminated.

what would be the reason for this behaviour? 

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

Thanks for your reply.
Whether you encounter a similar issue when you try to debug dual-core demo which is from the LPCOpen library.

Have a great day,
TIC

 

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

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

The issue is resolved . I created the project with three cores refering the  NXP vedio in 

https://www.nxp.com/video/lpcxpresso-jumpstarting-your-nxp-mcu-project-development:LPCXPRESSO-TO-YOU... link in both LPC xpresso and MCU xpresso. I am able to debug the code and the debugger is switching properly between the cores.

 The only part i faces is, when i am using MCU expresso 10.2 795 Version it does not debug for the first time. I need to terminated it and then reconnect . please check this from your side. 

 I found that there was a mistake from my side where i was not selecting the core properly. May be that is the reason. I also checked the code which crashes your board but it is working fine at my and the code which i recived from the LPCexpresso team is not working, Moving ahead if there is any issue i face i will ley you now immediately. 

One more request,  i need the code or the procedure for accessing the SDRAM. I have interfaced the SDRAM  i one of my project and i want to test it. i am refering the forums but not getting the proper Idea as to how to interface w.r.t code.

request you please share the sample code as there is no such sample code for the SDRAM interface and NOR FLash interface.

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

Thanks for your reply.
It's good news.
And the lpcopen_3_02_lpcxpresso_mcb4357 has provided the sample code for the SDRAM and Nor Flash interface, they're the periph_memtest and misc_spifi_tst demos.

LPCOpen Software for LPC43XX | NXP 

Have a great day,
TIC

 

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

0 Kudos
Reply

2,868 Views
gauravmore
Contributor III

Hi Jeremy,

I refered the code as per your given link, But there is no EMC init routine avialable. Is there any sample code or a reference code for SDRAM with proper intitiatilization routine. I am using SDRAM and nor flash both interfaced in EMC lines.

Also i want to allocate one of my Buffer to SDRAM address, i got the information related to it i MCU expresso User guied but still i want to know than as we user 

__At(Address) attribute in Keil to allocate the array or a buffer like

uint16_t Buffer[1024]                     __at(0x28000000) 

In the similar manner how we can use it in MCU Expresso . I have  downloaded MCUxpresso 10.3.0 . 

To conclude i want the sample or areference code for SDRAM and NOR flash with proper EMC init routine which not provided in existing reference code.

Thanks 

Gaurav More

0 Kudos
Reply

2,864 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

I'd highly recommend you to create a new thread for the question about the SDRAM and Nor flash, then share the link.
Thanks for your understanding.

Have a great day,
TIC

0 Kudos
Reply

2,864 Views
gauravmore
Contributor III

Hi Jeremy,

Done as per your instructions and shares the link as well . Also refer if not recieved shared link


https://community.nxp.com/thread/495962 

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Jeremy,

Thanks for the quick response. I m using MCU Expresso Ver 10.2.1_795. While launching the multi core project i am getting follwing error 

pastedImage_2.png

Whic is comming wheni am debugging M0App . I am not able to get the actual issue. only once it was able to launch all the cores properly. Same when i am doing with LPCxpresso 8.2.2 it is working fine and proper.

Another observation is that when i restart the PC and reload the new project it is getting reloaded and able to debug properly . Then i terminate the debugging session and then again tried to relaunch the debug session. Then i found that i was able to launch M4 and M0App but when it comes to M0Sub follwing is the error pop out

pastedImage_1.png

Please let me know what is the resaon. This is happeing with MCU xpresso 10.201_795 version consistently. To conclude it launch the debugging session only for the first time and for the next time it fails.

Please let me know of any moficiation required in my project whihc i may be missing.

Thanks

Gaurav More

0 Kudos
Reply

2,870 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Hi

Usually, when working with two cores projects, the debugger doesn’t exit correctly the debug session and before connecting again to other debug session it needs to have a known state. Disconnecting the device and holding the ISP button before connecting it again should do the work.

Hope this will help you.

Vicente Gomez

0 Kudos
Reply

2,870 Views
gauravmore
Contributor III

Hi Vicente,

The issue is resolved. I had a discussion with the technical team of NXP from banglore and get itresolved on my Development board as well.

The issue was 

1. I was able to launch two cores but when i was trying to download 3rd core it as giving me error. So the solution i got from the team is to run it then it will be in reset ISR and then select the project and click on terminate and relaunch then worked properly. the reason is the same that ou mentioned in you post.

2. Other issue as that i also created the project at my end and tried to debug the same way mentioned by the team. There i was able to launch all three cores but the when i tried to relaunch them after terminating then it was giving flash driver failed error. After discussion with the team , got to know theat ther is mistake in the memory configuration that i had done in my project where i was selecting wrong .cfx file for M0app. after modifying it and changing the memory sequencing it worked.

reagrding the second issue this was not the case in LPCXpresso it it only reagrding the MCU Xpresso.

So now i am evaluating the code but the reagarding the 1st issue i was informed that since the IDE (MCUXpresso) is license free there are cerain things we need to take care, So reagrding that i need to know that whether there any new updated version of MCUXpresso geting launched? 

Please clarify this.

 jeremyzhou

Thanks 

Gaurav More

0 Kudos
Reply

2,870 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gaurav More,

Thanks for your reply.

Actually, I also have no idea with it now.
Maybe you can give a try to clean all projects, then recompile them to eliminate the error.

Have a great day,
TIC

0 Kudos
Reply