Which IDE to be used for debugging LPC4367?

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

Which IDE to be used for debugging LPC4367?

3,469 Views
gauravmore
Contributor III

Hello,

I am working on the development of one of our product. There i am using LPC4367 tricore controller for my development. Initiatially i did the evaluation on OM13088 eval board along with LPCXpresso v8.2.2_650. But later i downloaded MCU Xpresso V10.3 for the development but i found that there is a problems which i faces with the MCU  Xpresso IDE listed below Which is not observed in LPCXpresso IDE

1. It never programs for the first time. For that I need to terminated and debug and ther it fails and then I need to kill the debug connection and again initiate after that it programs

2. After terminating also it always shows error that the core priority is already occupied. Then again I need to follow the steps mentioned in point 1. 

3. While debugging when I put M4 and M0App core In debugging mode then its ok but when I put M0sub core in debugging more then it shows Redlink erro 255 then for that again I need to clean , delete the launch and debug folder and recompile it and then program

If in case i need to do modification then it take lot of time to just do all these activity to just put the controller in debugging mode. 

Also i saw the examples of keil.  I need to know whether  Keil MDK v4.74.0.22  support LPC4367 controller ?  if not then which version is required and its support for flash programming.

for LPCXpresso it is 256KB , For MCU Xpresso there is no limit., similaly what will be for Keil?.

Also out of these three IDE which one is recommended and how will be the support for the same?

Since no other version of LPCXpresso  is upgraded after v8.2.2_650 .So what will be the support for the IDE means will it be discontinued ?

About the MCU Expresso from  v10.1, 10.2 and now 10.3 is the latest so will it affect the development since i have already mentioned the issue that i faced with MCU Xpresso10.3 latest version.

Regarding Keil i want to know the project creation for multicore  controller and also whether LPC link 2 supports the debugging or not.need the procedure for the same .

This all depends on the preferences of IDE . Currently i an continuing with LPPXpresso 8.2.2_650 till the time i am getting the response reagarding the above mentioned issues

Thanks 

Gaurav More

 

Labels (2)
0 Kudos
Reply
17 Replies

2,998 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Guarav,

I have looked at the issues you have raised and tested your simple application on the LPCXpresso LPC4367 evaluation board. I am unable to duplicate the programming issues you report so all I can do is offer some advice.

The model for multicore debug is that the Master (linked) project programs the code and data for all cores - therefore this will be 'Debugged' first and the M0 cores must only be 'Attached'.

Care must be taken with a number of issues.

Be sure to connect the appropriate projects to the required cores (over JTAG) for this device.

pastedImage_1.png

The M4 core is automatically selected by the IDE when a debug operation is performed. This operation will program all the required code to flash. RAM code as used by the M0Sub is placed by the M4 start up sequence - Therefore I recommend that the M4 project is run once it has been programmed.

The M0 Sub has to be manually selected the first time (as below) - this setting will be remembered inside the projects build configuration folder.

pastedImage_2.png

Once the the M4 project has been run, and the M0 sub attached, you can pause the M0 sub and see it running at the correct (expected) address.

pastedImage_3.png

You will also see the automatically created launch configuration for the M0Sub set to show it will attach on 'Debug' via the 'A' decorator (shown below).

pastedImage_4.png

The remaining M0App project will automatically select the remaining M0 core. You can then attach this and run and pause all of the projects (together or singly) and see something like below:

pastedImage_5.png

Step within this debug stack to see scope and core displayed in the various debug views.

Some other things to watch.

If you make a mistake and allocate a project to the 'wrong' core, you can delete the project build configuration .jtag file.

pastedImage_6.png

or more simply, just delete the entire build configuration directory for the project.

Take special care if you use the Debug Shortcut buttons. These buttons force a type of debug operation to be either that set in the launch configuration or their current setting. So, if these are used for the first debug of an M0 project, they may actually force a real debug i.e. write data to the target rather than the IDEs automatic 'attach'.  I strongly recommend initial debug operations are performed by the QuickStart Debug button for all MultiCore projects.

Finally, for each new debug connection be sure that no old debug processes remain. Therefore use the 'Clean Up Debug' button before beginning. Furthermore, power cycling the target may also be prudent.

I hope this helps,

MCUXpresso IDE Support

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi,

Thanks for the quick reply and it Gaurav not Guarav :-).

 

I will follow the steps as you mentioned below but there is one confusion regarding the steps that you mentioned where you launched M0Sub project after M4Core and before launching M0App core project you run and M4Core project and stop at  M0Sub core project.

Then you lanched M0App project. Is it possible, the reason behind asking this is that in M4 porject in main at the initialization it runs both the core with the statement mentioned below.

// Start M0APP slave processor
#if defined (__MULTICORE_MASTER_SLAVE_M0APP)
cr_start_m0(SLAVE_M0APP,&__core_m0app_START__);
#endif

// Start M0SUB slave processor
#if defined (__MULTICORE_MASTER_SLAVE_M0SUB)
cr_start_m0(SLAVE_M0SUB,&__core_m0sub_START__);
#endif

So already it has run the M0App core and you have not yet launched the M0App core. So will it not give any error while launching M0App project?

Just let me know if I have mentoine in proper way as per your input. Please confirm this then i will initiate the process since i will be testing it it on my development board as well so there should not be issue with the controller moving ahed.

Thanks 

Gaurav More

0 Kudos
Reply

2,998 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Gaurav,

> Thanks for the quick reply and it Gaurav not Guarav :-).

Apologies, it is not a name I have come across before... better than being called MCUXpresso IDE Support :smileywink:

In this model of MultiCore debug, the M4 master project (and Core) is responsible for both placing the data (and code for RAM) and starting the M0 cores running. No debug connection is required to achieve this - a POR would of course do the same.

The M0 projects contribute code into the M4 master project but when debugged (via attach) - they do not provide any debug control of the M0 cores - until they are paused of course.

Furthermore, attempting to pause the M0 core(s) before they are started (by the M4 core) will likely result in a poor debug experience.

So at a basic level, I recommend debugging the M4, this will reach main(), then start it running. Then you can make the M0 connections in any order you please. Any further debug control can be achieved via breakpoints as required.

I hope this helps,

Regards,

MCUXpresso IDE Support

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi ,

Any update reagrding the issue of MCU Xpresso since not recieved any solution till now. Also request you to follow the procedure which i mentioned in the earlier post.

Thanks 

Gaurav More

0 Kudos
Reply

2,998 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaurav More,

I refer to LPCX presso support expert suggestions, it can can debug well with your project.

First of all, you need confirm M4 project can debug well:

Mass erase your chip;

Clean up debug;

Debug M4 project.

If still can't work, please change a new workspace , reopen your project to have a try.

BR

Alice

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Alice,

Thanks for the reply, 

As you mentioned I did the same way by creating other project and importing the project and then try to debug. it worked for the first time but then again as I follow the procedure mentioned above, it behaves the same way. 

Again it gives error while debugging M0App and M0Sub. Which I have mentioned in the above post earlier.

Thanks 

Gaurav More

0 Kudos
Reply

2,998 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaurav More,

I take a video about debug your project on my side, please have a look at my attachment.

As LPCX presso support mentioned, we should more careful when debug tricore project .

BR

Alice

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi,

As pe your input and suggestion I followed your procedure but before that i did mass erase and then recompiled all the project one by one. After mass erase I initiated for the first time to debug then the IDE stuck at one point mentioned below

pastedImage_1.png

It stuck for long time so to come out of this loop I did Clean up to kill the active debug components.

Again initiated to debug the M4 Project. But again got stuck in the below mentioned point. so to come out of this loop I did Clean up to kill the active debug components.

Deleted the launch and .jtag file of M4 project and again initiated to debug the M4 Project. Again got stuck in the below mentioned point. so to come out of this loop I did Clean up to kill the active debug components.

Then I Reset the controller and then click on debug icon and it got programmed. The I tried to programme M0Sub project and I got this error.

pastedImage_2.png

I don’t understand why it gives this error shown below.

“  15: Target error from Set break/watch

  Unable to set an execution break - no resource available.

  Debugging context: M0Sub_FPR LinkServer Debug”

Then I clicked to cancel to terminate the session. Then it terminates both M4 and M0Sub session. Again initiated to debug the M4 Project and I got below error,

pastedImage_3.png

Again I need to do Mass erase using GUI flash tool to reinitiate debugging, Then the M4 Project was programmed.

pastedImage_4.png

Then initiated to launch debug for M0Sub Project. And it got programmed

pastedImage_5.png

Then I initiated to launch debug for M0App Project. Then I got the same error again,

pastedImage_6.png

Now this time it is for M0App project and every time when this error comes and I click on OK ot goes to ResetISR(void) function of M0App Project. 

pastedImage_7.png

Again I need to do Mass erase using GUI flash tool to reinitiate debugging for all the Projects.

I am able to programme M4 Project but while launching M0Sub project it again gives error   

pastedImage_8.png

Now this is a random behaviour since sometimes it comes for M0App and sometimes it comes for M0Sub but for M4 Project it gets launched successfully every time. when I click on OK to goes to ResetISR(void) function of M0Sub / M0AppProject.

This all the procedure I tried with the older version of the MCUXpresso V10.1 in  my laptop, there also for the first time when i did  mass erase and then inititated the programming it programmed all the core / Project but when I do relaunching after termination it shows "Target error from write flash EF(50)"

pastedImage_3.png

Then i have to do Mass erase using  Regaining debug access to target MCU  and tried to relaunch the project , than it is observed that M4 Core is programmed successfully all the time but when it come to M0App and M0Sub project it is the random behaviour and it goes to the reset ISR function as already mentioned above.

 I am not able to get the reason for the error

"15: Target error from Set break/watch

  Unable to set an execution break - no resource available.

  Debugging context: M0Sub_FPR LinkServer Debug”

Whats is the cause for this error. If no resource available then why for the first time it  got programmed successfully? . This happens when we terminate the debugger and agian relaunch the debug session.

After that i am not able to launch the Project with all core.

I am unable to get the sequence as to when and what to do to relaunch the project since I am modifying the code and then testing the project so relaunching shall happen many times.

I suggest you perform following steps.

1. Mass erase using GUI flash tool

2. Launch the project (M4. M0Sub and M0App)

3. Run all the projects 

4. Terminate all the projects .

5. Again relaunch the project as per the required sequence and then check the behaviour.

All this procecure when I performed with LPCXpresso IDE, I did not find any error and it is working properly.

Please check the same and let me know ASAP. Mean while i will check other peripheral of my development board  using LPCXpresso IDE.

Thanks

Gaurav More

0 Kudos
Reply

2,998 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaurav More,

1) MCUXpresso IDE 10.3 support LPC4367. You can first use the LPCopen demo to test on your board:

Download LPCopenv3.02 :

LPCOpen Software for LPC43XX | NXP     

pastedImage_2.png

2)Keil MDK v4.74.0.22  support LPC4367 controller ?

-> I think yes, while I haven't this version, so please also download the LPCopen for Keil I mentioned above,

test whether can work well.

3) Keil support LPC link2.

4) There is a video about how to debug multi-core on KEIL at arm website:Keil Embedded Development Tools for Arm, Cortex-M, Cortex-R4, 8051, C166, and 251 processor families... 

or Multi-core debugging with MDK - YouTube  

5)For MCU Xpresso there is no limit., similaly what will be for Keil?.

-> This need refer to license of KEIL.

In generally, I recommend you use MCUXpresso IDE, if the demo code can work well, we can analysis your own project in detail


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Alice,

As per your input I created a project in MCU Xpresso 10.3 version and tried to download the code in my development board which was working previously when using LPCXpressoV8.2.2_650.

When i tried using MCU Xpresso then the memory got corrupted and it give me error, Refer the attached MCUXpress Error.txt file. 

Then I again tried with the LPCXpresso IDE then also it gives me error mention below.

pastedImage_1.png

Now I am not able to program that controller and my development board got wasted, I want to recover from this so please let me know how to come out of the issue and reprogram the code and remove the memory corruption issue.

This is very critical problem with MCUExpresso. I am not sure  whether it is properly validated since same issue is there  again as I have written in the above mentioned post.

I am also attaching the code which i was trying to program.at first it programmed M4 and M0App core and then when it comes to M0Sub core it goes in to erro mode where it gives some Set/Break point location not found and when pressed OK it goee in ResetISR function of M0Sub core.

This is very critical issue for me know. Please let me know how to erase the code and reprograme,

Thanks, 

Gaurav More

0 Kudos
Reply

2,997 Views
converse
Senior Contributor V

MCUXpresso definitely works with LPC43 parts. May you need to regain debug access?

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

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Con Verse,

Yes i refered Regaining debug access to target MCU  and followed the same and after doing that I did mas erase using program flash tool in LPC Xpresso and then tried programming with LPCExpresso then is it working. But still the issue for MCUXpresso remains same.

Already I have  very limited samples of development boards available and in that case if any of them is nonfunctional the I cannot afford  so using MCUXpresso is a question for me.

 

Thanks

Gaurav More

0 Kudos
Reply

2,998 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaurav More,

I use MCUXpresso IDE v10.3.1_2233, just download your attachment,

import the project on my IDE, build M0SUB_FRR project, then build M0APP_FRR project,

then build M4_FRR project.  Then choose M4_FRR as active, download and debug, there is no error :

pastedImage_1.png

If still have any error, could you please take a video about the steps on your side.


Have a great day,
TIC

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Alice,

Sorry for replying late since I was  busy with some other tasks.

So as per your input I downloaded the latest version of MCU xpresso (v10.3.1_2233) and performed the same steps that you mentioned (import the project, build M0SUB_FRR project, then build M0APP_FRR project, then build M4_FRR project ). 

Following are the observations:

After the compilation I choose M4_FRR project to download and debug. But while doing the same I faced following error and  I was not able to download and debug.

pastedImage_1.png

You can see I was not able to program and it got stuck. This behaviour is observerd for both the board (Development board and Eval board OM13088). To come out of this condition I clicked on "TerminateBuildandDebug" option. After clicking of this option I got following error.

pastedImage_2.png

You can see that the MCUxpresso IDE was unable to detect M4 core. Again this is the same observation in both the boards (Development board and Eval board OM13088). Then to over come this I clicked on "Clean up Debug " option and again reinitiate to download and debug M4_FRR project. Then I got the folowwing error.

pastedImage_3.png

You can see that "Target error from flash write Ef(50)" occurs. So I deleted the debug and launch and did cleaned the build the project again and initiate to download and debug M4_FRR project. I was not able to down load and debug and  got follwing error.

pastedImage_4.png

You can see    "Target error from flash write Ef(50)" occurs again. Then  I tried with LPCXpresso as well but same error occurs since there was a corruption in memory. Then as per the Regaining debug access to target MCU  post I performed following operation

1. Press and hold the ISP button

2. Whilst still holding down the ISP button, press and release the RST button

3. Release the ISP button

After this I did mass erase using GUI program flash tool in LPCXpresso and I was able to erase.

Again I deleted the debug and launch and did cleaned the build the project again and initiate to download and debug M4_FRR project and initiate for download and debug. Then I was able to download and debug  M4_FRR project, M0App_FRR project. but in case of M0Sub_FRR project after download the debug I got following error.

pastedImage_6.png

When I click on cancel button it terminated all the other cores as well. Again this is the same observation in both the boards (Development board and Eval board OM13088). When I click on ok  (after getting the same error again ) then the M0Sub core  program is in ResetISR function and it is stuck there even if i tried to reset the code by using "move to line" option in debugging mode. After that i again tried to download and debug but then the same error "Target error from flash write Ef(50)" occurs again (mentioned above). One more thing while I was performing the same in LPC eval board  and when tried to reprogram M0Sub core I got following error

pastedImage_8.png

Then I did cleanup Debug and deleted the launch and dedug and reprogrammed  but the same error "Target Srror from Set break /watch "

Then i performed the same using LPCxpresso IDE and there everything works fine.

While downloading using MCUXpresso in case of Eval board I was able to reprogram but then while loading M0App _FPR project it gives follwong popup but i was able to debug.

pastedImage_9.png

pastedImage_10.png

I clciked ok and proceed further but when started downloading the M0Sub_FPR project then again the following error ocurs

pastedImage_6.png

I case of LPC expresso I was able program download and debug all the time. So over all I can see that there is a problem with the MCU Xpresso while dowloading the program for the first time, while Downloading third core (M0App / M0Sub). I tried by clicking on Skip all break point opting  doubting that there migh be more breakpoint set but atill no success. 

I would sugest you to do the same opertion and download and debug all the three cores since in you mentioned feedback above you have only M4_FPR project. Download and debug others as well with the same tescode project I shared already.

Thanks ,

Gaurav More

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Alice,

Any updates reagrading the Issue mentioned above?

Thanks 

Gaurav More

0 Kudos
Reply

2,998 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gaurav More,

I test on my side, yes, there is some problem using MCUXpresso IDE debug LPC4367 with dual cores.

I will report it to IDE development team.

Now you can use LPCxpresso IDE to debug .

BR

Alice

0 Kudos
Reply

2,998 Views
gauravmore
Contributor III

Hi Alice,

Thanks for your quick reply.  would suggest not only for dual code but also for tricore there is a problem with MCU xpresso. So please check for tricore as well since i am using tricore controller architecutre LPC4367. 

Also confirm the functionality of MCU Xpresso regarding the other series of controller since in other product also i am using freescale series and LPC series but single core. reason behind this is to get the common platform and so it is required this thee should not be any issue with single core controller in MCU express since LPC only supports LPC series and i am using frescale as well.

Kindly let mw know when i can get the issue resolves reagarding the MCU xpresso IDE so taht i can planfor further development on other comtrollers (Freescale and LPC). Mean while for LPC4367 I will proceed with LCP xpresso but it support only for 256KB whereas MCU is free.

Thanks 

Gaurav More

0 Kudos
Reply