• AVR Freaks

Hot!Where are the nbproject generated files generated?

Author
BillP
Super Member
  • Total Posts : 443
  • Reward points : 0
  • Joined: 2014/09/28 07:53:35
  • Location: CA
  • Status: offline
2020/11/16 11:40:10 (permalink)
5 (1)

Where are the nbproject generated files generated?

I have found a problem with Hv3, MPLABX v5.45 on a Win10 box using the SAM E70 Xplained Ultra kit.  I submitted a support ticket but no solution yet, so I am trying to track the source myself.

The error occurs when I do a project rename in which the original project contains the usb library and/or tcpip library.  The errors occur in the <renamed_file>.X/nbproject/configurations.xml and Makefile-<name>.mk files.  The original project name shows up in these files which causes a lot of compile errors.

I can see that all the generated files in the nbproject directory are re-generated every time I build the project.  What I cannot find is where those generated files are generated.  Is the source code in a python file, java file, ftl, or what?  

BTW - this error did not occur in earlier versions of MPLABX.

New book: Learn Harmony v3.  Go to amazon.com/books, then search for Bill Petrick
#1

5 Replies Related Threads

    jdeguire
    Super Member
    • Total Posts : 611
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: Where are the nbproject generated files generated? 2020/11/17 11:02:19 (permalink)
    2 (1)
    If you haven't done so already, check the "nbproject/project.xml" file. That contains the name of your project that MPLAB X will use when displaying the project in the Projects window and when generating Makefiles.
     
    Closing MPLAB X and deleting all of the generated files can help. Delete everything in "nbproject/" except for "project.xml" and "configurations.xml". You may also want to delete the MPLAB X cache directory at "C:/Users/<Name>/AppData/Local/mplab_ide/Cache/dev/<version>".
     
    The Makefiles are generated using XML files that are built into the JAR files containing the compiler plugins to MPLAB X. You can open up JAR files using something like 7-zip if you want to see what's inside. For example, you can open up "<MPLAB X Install Dir>/mplab_platform/mplab_ide/modules/com-microchip-mplab-nbide-toolchainXC32.jar" and have a look at the "XC32.languageToolchain.xml" file inside. That is where the Makefile output is defined. Other XML files in there are used to generate the options you see in the Project Properties.
    #2
    oliverb
    Super Member
    • Total Posts : 369
    • Reward points : 0
    • Joined: 2009/02/16 13:12:38
    • Location: 0
    • Status: offline
    Re: Where are the nbproject generated files generated? 2020/11/17 12:06:14 (permalink)
    5 (1)
    I don't know if this is relevant but in older MPLAB X versions the IDE was needed in order to generate the makefiles. Since probably 5.00? There's a separate tool "PrjMakefilesGenerator" to generate those files. At least I think that's what it does.
    #3
    BillP
    Super Member
    • Total Posts : 443
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: Where are the nbproject generated files generated? 2020/11/18 09:06:17 (permalink)
    0
    @jdeguire - thanks for giving me some ideas for places to look..
    Closing MPLAB X and deleting all of the generated files can help. Delete everything in "nbproject/" except for "project.xml" and "configurations.xml". You may also want to delete the MPLAB X cache directory at "C:/Users//AppData/Local/mplab_ide/Cache/dev/".

    I did this and deleted everything except those 2 files.  Unfortunately the configurations.xml contains the erroneous reference to the previous project.  I tried editing the file to remove the references, but then the Open Project does not work.
    Next, I will try to find the jar-files you suggested.

    New book: Learn Harmony v3.  Go to amazon.com/books, then search for Bill Petrick
    #4
    jdeguire
    Super Member
    • Total Posts : 611
    • Reward points : 0
    • Joined: 2012/01/13 07:48:44
    • Location: United States
    • Status: offline
    Re: Where are the nbproject generated files generated? 2020/11/18 12:34:16 (permalink)
    4 (1)
    I believe the configurations.xml file is created by the NetBeans C/C++ support module used by MPLAB X. I don't think you'll find what you're looking for by examining the plugin files. Those use the configurations.xml file to generate the Makefiles and so will probably not help you.
     
    What sorts of errors do you get when you try to edit the configurations.xml file? I've done a "find and replace" before like you're describing and have been able to do it successfully.
    #5
    BillP
    Super Member
    • Total Posts : 443
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: Where are the nbproject generated files generated? 2020/11/20 11:28:28 (permalink)
    5 (1)
    I tried to reproduce the error after editing the configurations.xml file, but I could not because it worked!  Thanks jdeguire.  I must have had some editing error. 
     
    I did get a response from my support ticket on this issue and they acknowledged that this is a real error in 5.45.  The solution (for now) is to uninstall 5.45 and revert to 5.40.    No mention of when a fix is expected.
     
    Oh well...on to the next problem with the component groupings.

    New book: Learn Harmony v3.  Go to amazon.com/books, then search for Bill Petrick
    #6
    Jump to:
    © 2021 APG vNext Commercial Version 4.5