This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

user.h cannot access any of the header files.

Other Parts Discussed in Thread: MOTORWARE

I am working on lab 5b using my custom board. I first ran lab 3 to detect motor parameters and then made changes to user.h file. For no apparent reason, the user.h is all grayed out and cannot access any of the header files being called even though they are all physically present at the correct location. I checked other files and the problem seems to be with user.h only.

Does anyone have any thoughts  why this might be happening?

  • I would check your list of include directories (project, right-click, properties, Build, C2000 ..., Include Options).

    Also, use a diff tool to compare user.h against an original and look for something awry.

    You are using some kind of source code management like Subversion, right?

    Rich
  • Do you have another user.h that is linked in your project? The other user.h will define _USER_H_ and then gray out the user.h that you want. The path to user.h for the project is set in the project properties. It will show up in Build->C2000 Compiler->Include Options as "${PROJECT_ROOT}/../../../src/pttid/". Make sure that your new user.h file is pointed to by this path.

    -Eric
  • I made a mistake on the path to my previous post, I am also working with a different user.h and put it into the pttid folder. The correct path will be "${PROJECT_ROOT}/../../../src/".

    -Eric
  • Eric, yes that was what was heppening. Before I made changes I copied the original and while I changed the addresses in the individual files to the new location I had not changed the address in the Project Properties so it was linking to the older user.h file.

    Rich, I am not using any file management system, but the problem was what I said above.

    Thanks for the help :-)
  • I replied too soon. When I first did what you suggested, user.h became active. However after building and debugging it became inactive again. The way I am doing this is I have copied the whole sw folder from the motorware into E:/jedl_lab5b folder and running everything from there. Since the folder structure is unchanged this should work. I changed the include options shown in screenshot. All other header and c files are linking properly and opening the correct files. Even the header files which user.h is attempting to access are being accessed by other files from the same project without any problem.

  • Nikhil,

    I copied MotorWare subfolders over to C:\jedl_lab5b to create the same path filing as you, and everything worked fine with no changes required.

    I'd start fresh.

  • Chris,

    I started fresh and now making all the changes one by one to see if anything that I did went wrong, but that seems unlikely since I followed the procedure in the tutorials.
  • the procedure in the tutorial is on how to instrument the code to ID and run your motor. I believe your issues are related to inserting a mistake in the paths. starting with a fresh install of MotorWare and a new CCS workspace should solve that issue at least.
  • Yes, finally I did exactly that. Figured it would be less time consuming to reinstall motorwear and start fresh than trying to find out what went wrong. It is working now. Thanks :-)
  • A source control system would tell you what you've changed. Software engineering without one is not particularly good practice.