In creating a new folder to test new version of code, Code Warrior has lost my project.
I have a folder called "MyProject - Sandbox" with some 50 C files in various sub-folders. I use Code Warrior (CW) 5.9.0 to build the HCS12XD files along with Processor Expert to create support files. Everything was working 100%.
Being done with the development, I renamed the entire project folder to "MyProject". But when I went to make a change to a module it said I did not have a project file and I need to create a new one. It would be pretty difficult to recreate the project with all the 50 files and the all proper settings of the Processor Expert which I don't have documented.
To diagnose the problem, I copied the MyProject folder and all of its contents to a new folder called MyProject - Sandbox, the original name before I renamed it. Then I open the project.mcp file to start CW and it gave me a lot of message saying I had duplicate files. It then left me with a list a just a few of the Files in the project under the Files list. And now, when I go back to the MyProject folder that I just copied from, instead of saying I have no project, it i showing me the same partial list that I saw in MyProject - Sandbox.
Where has my project been lost to???? Everything was working 100% and was about ready to deliver to the client and now I don't know where my project has gone.
Please explain how one creates a connection list at this site and then adds other people to it. I see there is a way to Follow people, but I would think that is when you wish to see everything that a particular person posts. So how do you just form a connection as you would like to do in this case?
Hi Jay,
today I got the board.
I tested your project on my 9s12xdp512 evb board. I didn't see problem as you described. see my testing video attached.
please let me know how to reproduce your problem with your code?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Jay,
attached is my CW5.1 Installed Plugins.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
please add me to your connection list, thus I can send you by message. Thanks!
Apparently there is more to it than removing the project_data folder when you wish to change the name of the folder/directory in which you project and source code exists.
I copied all the complete directory for Version2.4 of a large project to a new directory called Version2.5. The idea is that this new folder is where new development is being done while Version2.4 is released to the field.
So we removed the project_data file in Version2.5 and opened Code Warrior. We executed a Make and it built the entire project with no problems and linked fine. But when we went to Debug in order to flash the resultant code to our hardware, we got the message "A project file must be created". But we just did a successful Make on that project. We tried executing Make again, and this time it said "A project file must be created" instead of executing the Make it successfully executed before.
So it seems something else needs to be changed or deleted when renaming a folder in which a project resides.
Any clues? Perhaps some can follow the same steps we are noting here and to report their results. We are running version 5.9.0 of Code Warrior.
I think there are two places we need pay attention:
1. in project Linker option, please make usre the application filename is correctly defined
2. in debugger menu "File ", "Load Application...", make sure the load file is the one that linker generated.
can this help you? if not, please upload your project here, or send it to me. I will have to check the problem directly from my side.
thanks!
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Jennie -
Can you please send me your Email address so I may provide you with a means to download the code onto your development system. The project directory is about 25mb. This is a proprietary project, so we need a guarantee that it will be removed from your system after resolving the issue we keep having when renaming the folder in which the code resides.
I would also suggest that whatever solution is determined, that it is posted in this thread to assist others in the future that are trying to accomplish the same thing.
Jennie,
Thank you for your comments about how to correctly rename a project folder or make a copy of a project folder under a new name.
It sounds like the bottom line is that you must remove the file called MyProject_Data (to use my original example). That seems to be the key to generating a new version under a new folder name.
The other files you mentioned would not have to be renamed if you are keeping the project name the same and only changing the folder that it is in. In my example, I have a project called "Project.mcp" in a folder called "Project2.3-Sandbox". The Code Warrior project will forever be called "Project" as that would be the name of the product. It is only the folder that the project is in that would change names as the name of the folder would represent a release name or a name of a new release in progress.
So what you have stated is that the key is to remove that "Project_Data" file and let Code Warrior create a new one in the new folder.
Yes, removing "Project_Data" folder is necessary, because CW will create and use new *_Data folder files for new named project.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Ok - finally resolved. Had to remove each file listed in the rescued folder as well as the copy of the file listed in the Link Order tab. THEN add the source file back into the project. This removed the supposed duplicate copies of each file. Now everything is back to normal. Finally. Kept taking one step forward and two steps back.
Hope this thread may help someone else who ends up going through the same thing. There was only one reference to the L1016 error in a Google and Bing search while trying to get a hint on what was going wrong. They suggested using an old .mcp file to fix it. That looked like it fixed it until closing Code Warrior then restarting it, only to start getting new duplicate file errors.
I had to manually remove and add back some 40 modules. A pain in the neck when all I was trying to do it create a new folder to start working on a new release of the code and rename a sandbox into the production source code.
WE DEFINITELY NEED A PROCEDURE DOCUMENTED TO RENAME A CODE WARRIOR FOLDER OR COPY A FOLDER TO A NEW FOLDER/NAME TO WORK ON UPDATES FROM A COPY OF A WORKING PROJECT. THIS THREAD SPEAKS OF WHAT I RAN INTO IN JUST RENAMING A FOLDER OR COPYING TO A NEW FOLDER.
We need a document to state how to rename a project folder without all hell coming loose on you like this.
And one step forward, two steps back. Still not back to things normal. So adding the files removed the "n/a" designation and the code and data columns now correctly show sizes. But, the project seems to now think there are multiple copies of the same files. The ordeal continues.
When I Make the project, i get errors like:
Source Files "name.c" stored object file "name.c.o". This superseded the previous build dependency between source file "name.c" and that object file.
This occurs for each of the file names that were added to fix the "n/a" problem.
Then after all of these Source File errors comes another set of errors for each file saying:
L1016: File <path\...\project_data\P&E_Multilink_CyclonePro\ObjectCode\name.c.o found twice.
Now to track down THIS new error.
Would have been nice if Code Warrior just provided an option to rename a project and folder instead of what I am going through to keep revisions of code in different folders.
hi,
if no processor expert, To rename a project "project1" to "project2", please refer the following steps.
- Close your project1 (please close CW also to be sure that all files are released)
- Rename project folder from "project1" in "project2"
- Rename project1.mcp in project2.mcp
- Delete project1_Data folder
- open CW
- load project2.mcp
for processor expert project, Please also rename *.pe and *.G_C. Then to rename a project "project1" to "project2", the whole process should be:
- Close your project1 (please close CW also to be sure that all files are released)
- Rename project folder from "project1" in "project2"
- Rename project1.mcp, project1.pe, project1.G_C in project2.mpc, project2.pe, project2.G_C respectively. All three files need to have the same base name.
- Delete project1_Data folder
- open CW
- load project2.mcp
Hope this helps!
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Just when you think you are all done and resolved things, taking the steps noted above, is not complete. After removing all the object code and making the project, everything compiled and linked properly. Except the file list (which now has the files moved to the correct groups from the recover list), have "n/a" under the column heading Code and Data. Yet, if you go to the Link Order list, the Code and Data information for those files are correct.
Going back to the file list, you are probably aware that you can right click on any file name and you can select Compile as a means of compiling an individual file. Well for those files with the N/A under the Code/Data list, the compile option, check syntax, and similar options do not exist.
In order to solve this problem, for each of the file names that have the "n/a" designation, I had to select the file, select add files, find the original file in the folder directory, then tell it to add it to the project (even though it is already there). An error message is generated that says "At least one file could not be added to the selected target(s).". BUT, the "n/a" designation goes away and the compile and similar options returns. So things are back to normal.
Yet another thing I want to avoid in the future.
This was quite some nightmare to repair.
After further investigation I found the missing project files but I am leaving this post open so someone might suggest a way of avoiding this problem in the future.
I copied the entire folder to a new folder - let's call it MyProjectFixed. I went into the projects G_C file and I change the entry called Project Directory, to the path to the MyProjectFixed folder. Then started CW (clicked on the project.mcp file). When it started it put out a lot of warnings that I had duplicate file names. The list of files I finally got under the File list was once again a shortened list and once again the Link Order list was correct. It turned out that all the files which are part of the project but were missing, were moved into a folder called Rescued Items under the File list.
It appear that when changing the name of the folder a project is in or creating a new folder with the project under a new name, Code Warrior seems to have lost its understanding of where certain modules appeared in the list of files/groups. I have to manually go through some 25 modules (c and h code) and move the file name back under the group folder in the File list. Everything is actually there and compiles and links fine, it is just that CW lost where the files existed in the file hierarchy that was set up to keep track of source modules by functionality.
This is definitely confusing and it would be good to document how to copy a project folder into a new folder without going through this issue. We create a new folder with all our modules when we complete one release and move to working on the next. So we may have a folder called "Project2.3 - Sandbox" where we were developing updates to version 2.2 of the code. Once we go into production we wish to rename Project2.3 - Sandbox into Project2.3 and make a copy of the folder and call if Project2.4 - Sandbox. This is where we got into trouble.
There must be an easy way to do this renaming and copying of files that is not going to leave us with a version of Code Warrior that lost it file heirarchy and placed the files in this recover folder. We also get a message that the code was compiled into a different directory. We need to eliminate that happening also.
Here is additional information.
All of the files which are missing under the list of Files (Files, Link Order, Targets, and Processor Expert tabs) do appear under the Link Order Tab.
If I go to Make, the project makes correctly and links correctly. So it does think all the source code files are there.
If I go to File/Open and open one of the missing files, I am unable to add the file to the project. That option under the Projects tab is dimmed. Certainly because it know the file is already part of the project.
So the files are in the project but they do not appear in the File list.
So part of Code Warrior knows the files are in the project (the link order list) but the File list does not show those files where they used to be in the list of files (which was grouped by the various folders/functions in which the source files are located.