lpcopen project: problems with importing a saved project

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

lpcopen project: problems with importing a saved project

Jump to solution
806 Views
jDrum
Contributor III

Hello, I am using MPCXpresso IDE v11.8.0 to debug software on an LPC11U68 on our own PCB.  Using Link2.

First question/problem.

The program debugged well until today when we made several program changes.  They compiled without errors using the standard Build command.  The Debug build also compiled without errors.  However, the debugging session encountered a major problem and entered a loop that was not present in the source code or disassembly code. 

The debugger console reported:

program stopped.

0x1fff00a0 in ?? ()

No line 415 in file "C:\\Users\\John\\Documents\\MCUXpressoIDE_11.3.0_5222\\workspace\\L3M\\src\\main.c".

No line 432 in file "C:\\Users\\John\\Documents\\MCUXpressoIDE_11.3.0_5222\\workspace\\L3M\\src\\main.c".

Restarting the IDE and Link2 made no difference. 

I assume that we can figure out the cause once we get going again.

Second question/problem. (the title of this inquiry)

We tried to import the files from yesterday to get a fresh start.  Somewhere in the import wizard, we wrote over the project files and now our project tree is a mess.  The source files are still there, but several header files are now missing.  The files in the editor are still present but probably cannot be reloaded.

  1. /*
  2. * defs_5.h
  3. *
  4. * Created on: Jul 9, 2021
  5. * Author: John
  6. */
  7.  
  8. #ifndef DEFS_5_H_
  9. #define DEFS_5_H_
  10.  
  11.  
  12. #include <chip.h>  (not found)
  13. #include "board.h" (not found)
  14. #include "string.h" (found because loaded in the editor))
  15. #include "I2c.h"  (found because loaded in the editor)
  16. #include "eeprom.h" (not found)
  17.  
  18. #define VERSION " L1.43\r\n" // see end for data
  19. //#define INHIBITPHASE
  20. #define L3M
  21. //#define DATA_LOGGER
  22. //#define SONDE1
  23. //#define SONDE2
  24. //#define SONDE3
  25. //#define SONDE

We tried to import again, using the "quickstart" import command,
but this failed because it does not overwrite  projects  already  loaded,
even if they are closed.

A screenshot of the project directory is shown below.  There are quite a few
red x's in the directory, including the src.  The include directory is now empty.

Any hints on how to proceed?  Thanks, jDrum

jDrum_0-1697513302493.png

 

 

 

 

Labels (3)
0 Kudos
1 Solution
768 Views
jDrum
Contributor III

Hello,

We were able to get a project to show the proper include files.  To do this we started a new project in the same workspace.  Before copying the source files into the new project, the project build was successful.

After copying the source files (not overwriting the new project source files), the build did not report any non-located *.h files.  Instead there were 1300 errors which were of the form:

"multiple definition of `oRS232Buffer'"

c:/nxp/mcuxpressoide_11.8.0_1165/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047/tools/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/Range.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:612: multiple definition of `oRS232Buffer'; ./src/Factory.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:612: first defined here

Cleaning the make files makes no difference.  The errors started in the middle of the defs_5.h file.

Thanks, jDrum

 

View solution in original post

0 Kudos
5 Replies
773 Views
jDrum
Contributor III

Hello @xiangjun_rong 

Thank you for your quick response.

We have made some progress by fixing the path names to the include files.  However, there are now additional errors in the build when the compiler reads the *.h files.

As shown in the screen shot below, the include section of the project explorer has the L3M/inc grayed out.  The question is how to make the includes active again?  Until we tried to import a backup, the includes worked well.

jDrum_0-1697684697662.png

Thanks in advance, jDrum

0 Kudos
769 Views
jDrum
Contributor III

Hello,

We were able to get a project to show the proper include files.  To do this we started a new project in the same workspace.  Before copying the source files into the new project, the project build was successful.

After copying the source files (not overwriting the new project source files), the build did not report any non-located *.h files.  Instead there were 1300 errors which were of the form:

"multiple definition of `oRS232Buffer'"

c:/nxp/mcuxpressoide_11.8.0_1165/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047/tools/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/Range.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:612: multiple definition of `oRS232Buffer'; ./src/Factory.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:612: first defined here

Cleaning the make files makes no difference.  The errors started in the middle of the defs_5.h file.

Thanks, jDrum

 

0 Kudos
762 Views
jDrum
Contributor III

Problem is now solved.  We did not resolve what caused the problem in the first place, but here is a short summary of what we did to get the program to work again.

As recommended by the forum a year or two ago, we started with a new project in a clean workspace.  In our case, we had been using the workspace from an earlier version of the IDE and hadn't observed any problems. The "proper" workspace MCUXpresso IDE v11.8.0 was still empty.

Using the wizard, we gave the new project a different name and installed the proper chip and board that used the LPC11U68 chip.    At that point the still-empty project could be built and the includes section of the project explorer was functional.

Using the file system we copied the previously working source code back into the src folder (not overwriting any files).

The first build fetched the 1200 errors!.  On further investigation, they were somehow due to source code that should have already been defined out using the #ifdef xxx technique. The previous workspace somehow hid the problem.

We still need to put the Link2 project back into the workspace.

jDrum

0 Kudos
714 Views
jDrum
Contributor III

Hello again,

The following is a progress report on problems importing a saved project (or for that matter starting a new project in a new workspace).

Note that the above linker problem with the 1200 errors  was solved in a more recent post LPCopen linker problem: how to change the linker to the correct workspace? 

We have often asked how one fixes the includes section of the project explorer

In principle, the create a new project wizard should handle this.  In our IDE (11_8), the wizard usually fails, and at least right now, can't even complete the task of starting a project.  (Is it written in a script that doesn't function on our computer?)  We have re-installed the IDE with no improvement.

In any case, we have looked into the operation of the eclipse software lurking behind the LPC compiler.

The project settings has a *.xml file that handles the includes section.  We "predict" that that file could be edited to fix the problem.  For example:

<language id="org.eclipse.cdt.core.gcc" name="C Source File">
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_board_nxp_lpcxpresso_11u68\inc</includepath>
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_chip_11u6x\inc</includepath>
</language>
<language id="org.eclipse.cdt.core.assembly" name="Assembly Source File">
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_chip_11u6x\inc</includepath>
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_board_nxp_lpcxpresso_11u68\inc</includepath>
</language>
<language id="org.eclipse.cdt.core.com.crt.mcu.assembly" name="Additional Assembly Source Files">
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_chip_11u6x\inc</includepath>
<includepath>C:\Users\John\Documents\MCUXpressoIDE_11.8.0_1165\WS3M\lpc_board_nxp_lpcxpresso_11u68\inc</includepath>
</language>

We were unable to attach the full *.XML file (not allowed by this forum)

In any case, the depths of the Edit project settings has places to type in the includes, for example, "lpc_chip_11u6x\inc".   Needs to be done in more than one place.

I hope this helps

jDrum

 

0 Kudos
796 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Your issue is that the compiler can not find out the file which is included, so I suppose that you have to add the path so that the compiler can get the file.

Pls follow up the figure to add the path the including file is located.

Hope it can help you

BR

XiangJun Rong

 

xiangjun_rong_0-1697521166437.png

 

0 Kudos