How to restore project properties to individual files or folders in LPCxpresso

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

How to restore project properties to individual files or folders in LPCxpresso

1,406 Views
brampeeters
Contributor I

Project vs per-file properties Describes how to change properties on a per file or per folder basis. Unfortunately it does not mention how to make sure that all the properties are back in sync with the top level project properties. Restore to defaults does not do the trick. Is there a way or is this functionality missing ? The only think that seems to work is deleting and readding again.

Tags (2)
0 Kudos
8 Replies

1,162 Views
brampeeters
Contributor I

And to anyone else fighting lpcxpresso over this: I renamed to original src folder to src_ and created a new src folder (which now had the right properties, victory), then moved everything from src_ to src.  After this nothing compiles anymore because the IDE wanted to be smart and decided to change includes in a bunch of common files  (between different projects) to contain the entire path to a specific project with /src_/ in the name as a result of the renaming operation  (I have a linked folder in the project with 'common' files between a number of projects, these files need the include path with /src/ in it ).  Any tips on how to prevent this 'not-so-smart' feature from corrupting my sources in the future ?

0 Kudos

1,162 Views
brampeeters
Contributor I

No, that is what I already did when I mentioned "Restore to Defaults does not do the trick". One indication that this button is not meant for that (or only in a really cumbersome way) is that it does not allow to  set all project properties at once because you have a separate button for Resource, C/C++ Build and Run/Debug settings, and not for the others Builders, C/C++ General, Project References. Though if you descent into the tree C/C++ General tree you have the button again for 'Code Analysis' -> that would mean a lot of clicking on that button to get it in sync again and even then you miss some.

And besides that, it also does not set the values to the ones of the top level project for the cases when the the button is there. In my top level project properties i have a C/C++ Build.Settings.MCU C Compiler.Architecture property of Cortex-M0 (processor is an lpc1112). In my subdirectory it remains ARM7TDMI no matter what i do. The 'key' (?) icon that the properties are different from the top level properties also remains present.

So either the button is meant for something else (which 'defaults' ? ) or the functionality is broken (v8.2.2).

0 Kudos

1,162 Views
converse
Senior Contributor V

I don't know what you are doing wrong, but "Restore Defaults" on the files that have individual build settings, removes those settings. In v8.2.2 and MCUXpresso 10.0.0. I just tried it...

0 Kudos

1,162 Views
brampeeters
Contributor I

I am pretty sure I am not doing anything wrong (except trying to get work done with LPCXpresso maybe ;p ).

I tried reproducing the corrupted project state and found i can easily get there in a few steps , see pic

1. (first 2 images in pic) Start condition is OK, both FW_Receiver (project) and boardspecific (subdir) have the good architecture

2. I go to the preprocessor option of "boardspecific" subdir properties and select 'preprocess only', and press apply and close properties.

3. I open the boardspecific subdir properties again and go to the same settings and press restore defaults. Preprocessor only is not checked anymore (which is good).

4. But if i go to architecture i now have an ARM7DTMI architecture selected.

5. Sanity check in last pic, if i go to project level properties it is still cortex-M0. You can also see project structure here, and that the 'key' icon is present for boardspecific indicating that it is not in sync with the project properties.

So it is restoring to some defaults, but those defaults are not the project level properties but some unknown properties.

Now in your case, maybe it works because the defaults match the project properties, but obviously not in mine....HowToCorruptLPCExpressoProject.png

0 Kudos

1,162 Views
converse
Senior Contributor V

I see your behaviour in LPCXpresso. But it seems to have been fixed in MCUXpresso.

0 Kudos

1,162 Views
brampeeters
Contributor I

So I made the transition to MCUExpresso but it is more of the same problems. Somehow the 'src' subfolder's settings got the 'key' icon again indicating that they were different from the project level settings (no idea which settings were different or how it happened this time, i was working in debug mode all the time which was fine but when switching to release it happened), so i tried the 'restore defaults' button but it still corrupts the project settings as in the screenshot below. Instead of a cortex M0 i get a cortex M7 architecture. 

PropjectProperties.jpg

So i am in for another round of deleting all folders files and re-adding then to the project to get out of the mess.

(Or i need to figure out a way to change this in the meta files directly)

0 Kudos

1,162 Views
brampeeters
Contributor I

Ok, thanks for verifying that. I will look into moving to MCUXPresso then (I was not even aware LPCXpresso was obsolete) !

0 Kudos

1,162 Views
converse
Senior Contributor V

You do use "Restore to Defaults" but on the files/folders that have been changed - not the project.

0 Kudos