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.

New CCS Project with Instaspin

Other Parts Discussed in Thread: MOTORWARE

I'm trying to set up a new project in CCS, and want to use InstaSPIN.  I've searched the forums, and when someone asks how to do this the response is typically that we should just use the MotorWare projects and labs.  However, I plan on making some significant changes to the code for this project, and I have a new project on the horizon that will require other modifications to the code.  I really would like to set up a different CCS project with unique source code that is dedicated to each drive that I'm going to use.  Otherwise, whenever I make changes to, say, the GPIO unit, I'm going to be overwriting everything I just did in the last project.

Are there any resources to help us through the setup process?  I've been struggling with this for a day or so, and I've finally run into some linker issues that I can't get around on my own.

Thanks,

Matt

  • Matt,
    All the projects use relative paths (..\..\ etc.), that's the main "issue" in why we recommend using the projects as your starting point, and keep in the MotorWare directory structure. Of course you CAN change this, but it will be a manual process of updating the locations of each file for your project. You should also re-use the link order of the libraries in the provided projects. The order you link is important.

    I would still start with a project as a baseline (typically 5, 7, 9, or 10 for InstaSPIN-FOC). Move the files we provide where you want, then update the path in the project.

    I know some people like having all used files in a single directory. This can make sense for an embedded project but really doesn't work for us when we are trying to provide projects that work on multiple devices and multiple inverter/hardware platforms.
  • Thanks for the response, Chris. I think I've taken care of these things. It was really tedious changing all the #includes, and hunting down all the required files, but I think I was successful in making copies of all the files and updating their locations. I did it with lab 4a because we've been using that for torque control with a demo board up until this point. The error I was encountering was my fault; there was one .c file that I was missing. I just had to trace that symbol through the original project.

    However, I'm getting a series of warnings about the fpu32.lib compatibility, specifically with some of the IQ24 and IQ30 objects. I've done some research here, too, and it looks like the answer is that it shouldn't be a problem. However, I've seen some people report problems when they migrate away from the emulator and onto a standalone program. Is this an issue I should be concerned with, and if so, is this the place to try and find a solution, or would that be better in a different forum?

    Thanks again,

    Matt
  • proj_lab04a uses the FPU, includes the library appropriately, and deals with "tricking" the floating point values from ROM that are returned in fixed point.  If you do a compare between the two you will see what I mean.

    did you use 4a for your project or 4?

  • Chris,

    I've been through the "trick" code sections in Lab 4a when I first started playing around with the FPU, and can see how they're clearly different from Lab 4. I also can see the two libraries, and see how 4a uses the two fpu32 libraries. However, I'm using both those fpu32 libraries in my standalone project and am still getting the error. Is there a third (or fourth, fifth, etc.) library that I should be including? You mentioned including them appropriately. I have the libraries IQmath_fpu32 and 2806xRevB_FastSpinROMSymbols_fpu32 in my project folder, and (I think) my C2000 linker options are configured the same as they are in Lab 04. I checked the build and link orders, and I made sure the project uses the correct linker files. I went through each of the project options tabs one at a time, and they all seem to be the same as in Lab 4a. I still get the same error message.

    For now, I just made a complete copy of Motorware into three separate directories. I figure this will at least let me get started with the two separate projects while preserving the original example code. However, having 700MB on my hard drive taken up by two projects is a little nuts, so I'd like to find a solution that doesn't require completely copying everything. I assume I'll be able to whittle down the unused parts to save space, and then once I have a little bit of a break I'll try to simply relocate everything, but I'd still like to try and solve this for my own edification. I can't imagine I'm the only one who is using InstaSPIN for more than one contract. Is there anyone else out there who has been successful, or has everyone pretty much just done what I just resorted to?

    Incidentally, I'm not complaining here at all. I do understand why you guys have set this up the way you have. I would have absolutely done the same thing, and it totally makes sense. I just want to make it work the more streamlined way.

    Thanks,

    Matt
  • regarding size, most is stuff you don't need.

    just use

    C:\ti\motorware\motorware_1_01_00_14\sw

    don't need anything else at same or higher levels.

    then, if you want you can go remove any of the boards you don't use, and the board you do use but the other f280xx variants you don't.

    finally, at the lower levels you can delete the doxygen \doc folders which are the largest space hogs

    ex:

    C:\ti\motorware\motorware_1_01_00_14\sw\solutions\instaspin_foc\boards\boostxldrv8301_revB\f28x\f2806xF\docs

    that will get you lean and mean.

    link order is RTS, ROM Symbols, IQmath:

  • image didn't show up. let's try again

  • still didn't...once more