Newly LPCOpen project falis to run on lpc11e67

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

Newly LPCOpen project falis to run on lpc11e67

1,310 Views
ttahut
Contributor III

I'm trying to create a lpc11e67 project, and debug using MCUXpresso. I know the board I have works and the J-Link debugger connection works because I have a separate Keil project that I can run on the board (with Keil IDE) without issue. I am trying to move from Keil to MCUXpresso.

I downloaded the lpcopen_3_03_lpcxpresso_lpcxpresso_11e68 code from here https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/lpcopen-libr...

There is no lpc11e67 specific download that I can find.  The project is nothing more than the default while(1) loop so I would not expect there to be an issue.  I can connect to the debugger, start the debug session but the code immediately goes off into the weeds.  See the screen shot below.  The debugger does not stop at main, nor anywhere else.  It starts to run immediately.  When I click the pause button, it is off somewhere it shouldn't be (address 0x1fff20b2 ??). 

ttahut_0-1693582232250.png

 

I created the project through the Quickstart panel: New Project->LPC11E67, LPCOpen - C Project, then selected the requisite LPCOpen paths to locate the code.  Clicked through all of the default settings and built the code.  To debug, I went through Debug As->Segger J-Link Probes.  I have tried various ways to create the project but they all result  with the same issue.  Is there something simple I'm missing to get things configured?

Ive attached the workspace and project. The workspace was created new as well.  Thanks for any help in advance.

 

0 Kudos
Reply
8 Replies

1,252 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @ttahut 

Please look into the Getting Started with LPCOpen, you are missing the board file to be able to run the project.

I hope it helps.

Best Regards, Miguel.

0 Kudos
Reply

1,210 Views
ttahut
Contributor III

I have run through those docs and tried creating projects in various ways, but the results are the same.

There is no 'board' file for the lpc11E67 part (because there is no nxp dev board), only the lpc11u68 expresso dev boards.  I even selected that as the board library for a project. It linked it in, but the results are the same.  The debugger is able to connect and program the code, but it does not stop at main.  I can not even get it to stop at ResetISR.  If I set a break point at RestISR and then debug, The IDE puts a break point icon at the line for a moment, then it goes away and the code/debugger is off in the weeds.  The same thing happens if I try and configure GDB to stop at ResetISR rather than main.

I don't think this a board file issue- it never gets that far in the debugger to be executing the board level code anyways.  But I will take any pointers to lpc11E67 specific code you may have. The downloaded LPCOpen libraries do not seem to have any that I can find. I'd even take and LPC11E67 blinky project that you are able to debug on a an LPC11E67 board. 

Are there any know issues between MCUXpresso and the JLink debugger probes and/or with  the LPC11E67 parts?

0 Kudos
Reply

1,195 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @ttahut 

Sorry for not being clear.

The files from LPC11e68 work for the LPC11e67, the difference is on USB.

I meant, you must have the chip and the board files on the workspace to be able to run any example.

Miguel04_0-1693944381606.png

Regards, Miguel.

 

 

0 Kudos
Reply

1,121 Views
ttahut
Contributor III

I have tried including those, but the results are the same.  Attached is a workspace with a requisite project.  I was able to get the code loaded and programmed in OZone, and break at ResetISR.  If I step through the assembly code, it generates a hard fault at address 0x18A, when it is trying to store the enables back to SYSCON_SYSAHBCLKCTRL.

I have tried various things to fix this.

1.) I defined DONT_ENABLE_DISABLED_RAMBANKS.  This gets farther of course but fails shortly after in the __USE_ROMDIVIDE section of code. 

2.) I undefined __USE_ROMDIVIDE.  This fails somewhere in SystemInit().

3.) I added a startup assembler file to set the clock enable for SRAM1 prior to calling ResetISR.  That assembler file is excluded from the current build setup in the project.  There an associated #define USE_MY_STARTUP_ASSEMBLER_CODE you need to define if you want to use that code because the ResetISR entry symbol would now be defined in the assembler file.  This also fails.

0 Kudos
Reply

1,107 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @ttahut 

I was able to run the example demo switch blinky with the board and the chip projects, I imported the example directly from MCUXpresso 11.8 you can find it on this path. 

MCUXpressoIDE_11.8.0_1165\ide\plugins\com.nxp.mcuxpresso.tools.wizards_11.8.0.202306131047\Examples\LPCOpen

and I imported the lpcopen_2_12_lpcxpresso_nxp_lpcxpresso_11u68_fix folder.

Can you help me trying this method?

Which version of MCUXpresso are you using? If you have a version older than the 11.8 I recommend you to update to the newer version.

Best Regards, Miguel.

0 Kudos
Reply

1,057 Views
ttahut
Contributor III

I upgraded to 11.8 and imported the blinky project as described.  The results are the same.  The code gets programmed but goes off into the weeds as before. 

What board did you run this on?  Can I get one of those boards?  I don't see an 11e67 dev board out there anywhere.

I also just received an MCU-Link board and tried debugging through that.  The results are the same so it's not the Segger J-link.

0 Kudos
Reply

968 Views
Miguel04
NXP TechSupport
NXP TechSupport

Hi @ttahut 

I used the LPC11U68 development board, the hardware can be the problem.

If you are planning to get another board, I suggest you to use a newer LPC that has support with the SDKs from MCUXpresso.

Best Regards, Miguel.

0 Kudos
Reply

1,056 Views
ttahut
Contributor III

Forgot to attach the workspace- here it is...

0 Kudos
Reply