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.

Load Program Error with F28027

Other Parts Discussed in Thread: MOTORWARE

hi,

i have a problem in using F28027. i had this problem before but no one has answered me.

i configure my project and C code file for running a motorware project with F28027.

in the middle of code a must set high a GPIO by this code:

HAL_setGpioHigh(halHandle,GPIO_Number_16);

but when i add this line and after building the project, when i want to debug the project, this error display. 

most say that erasing flash sectors  and programming the F28027 doing fine, and at the end this error displays and debugging session finished.

how can i fix this error?

there is a video that explain the error.11-16-2015 2-13-11 PM.rar

  • if you don't add the line of code and you build and load, does it load fine or do you get the error?
  • without that line of code, the program debug and run fine without any error.

  • check to see if there is a build error from the compiler.
  • no, there isn't any compiler error.
  • Hi,

    Since there was no linker error the loader then attempts to program memory.  If the linker command file does not accurately match the actual device memory configuration you will get an error.  Not sure if it is this error.

    Have you modified the linker CMD file?

    Do you get the same error for "any" additional line of code or is it specific to this particular function call?

    Do you get the same error when programming RAM instead of flash?

    Jeff

    Did a reply answer your question? If yes, please click the "Verify Answer" button located at the bottom of that post.

    C2000 TI Wiki Pages
    TI Forum Sitemap

    ControlSUITE
    Motor Drive & Control (everything)

    CLA FAQs
    Workshop Material!

    InstaSPIN Wiki
    InstaSPIN
    FAST Software Encoder

    InstaSPIN-FOC
    InstaSPIN-MOTION
    InstaSPIN-BLDC

    InstaSPIN-FOC/MOTION User's Guide
    MotorWare 
    InstaSPIN Training

  • hi,

    1- i didn't modify the linker CMD and don't know how to do that. is this necessary? how can i do that?

    2- i test what have you said and i realize that i get this error(debug error not compile error) when i want to assign a value to a variable.

    i.e. i define a variable named "tempor_val1". when i used this variable in a "if" instruction like: "if(tempor_val1==19)" there is no error but when i try to assign a  value to it like : "tempor_val1=1", this error comes up.

    i think that maybe the memory is full but the memory allocation not saying that:

    3- i don't know how to program to RAM instead of Flash cause i'm using a proj_lab5b of motorware and it can't change the build configuration like a pic below:

  • Okay - this helps, we know a little bit more about the issue.

    Next step we should do is to understand the contents of your MAP file to see how much of the memory defined in your linker command file is being used by your code.  It will also show if a section does not have enough room, and it does not matter if it is a data or program section.  Please send your MAP file (see

    You can program the RAM or FLASH for any of the InstaSPIN projects by selecting the desired project configuration as seen in the video below.  Note how the project file contents change when you switch between RAM and FLASH releases (linker CMD file changes).

    Jeff

  • Sorry - I forgot you were using the 027.  Since this device has limited RAM, the projects only are configured for programming into FLASH.

    Let's still look at your MAP file to understand exactly what is going on for both cases of your test:

    i.e. i define a variable named "tempor_val1". when i used this variable in a "if" instruction like: "if(tempor_val1==19)" there is no error but when i try to assign a  value to it like : "tempor_val1=1", this error comes up.

  • hi,

    i want to send my map file to you but before that i have i question.

    when i add the motorware project to CCS6, the project configure is in default mode like the pic below:

    do i need to change this to F28027? if it is right, i did it and some errors comes up. how can i solve it?

  • and sorry to ask but,
    what do you mean MAP file?
    you mean F28027.CMD file?
  • this is my F28027.CMD file.

    also, i made a lot test and i m sure that this error create because of fullness of something. 

    because, i write some line of code and the error show up but when i comment some other line of codes, this error disappear until the new codes become big and again error can be disappear by commenting more codes.

  • hey,
    anybody hear me?
    i need help?
  • Hi,

    There is typically no need to change the project properties from the default settings, yours is the same as mine.

    The MAP file is the output from linking your code.  The linker CMD file is an input file to the linker instructing the linker how to link the symbols in your code to the memory map of your target device.  By looking at the MAP file we can understand more about your linking process.

    Jeff

  • hi,

    this is my project MAP file: 

    proj_lab05b.rar

    by the way the memory allocation still doesn't say anything:

  • Hi,

    Your linker CMD does not match what is delivered with MotorWare (C:\TI\motorware\motorware_1_01_00_15\sw\ide\ccs\cmd\f2802x\F28027F.cmd).  This is especially important for the 027F since there is a linker section named "rom_accessed_data" that references the code in ROM that access data in RAM.  I think the loading process was having a conflict between your code and one of the libraries included in the build.

    Please try out the MotorWare linker CMD file and let us know how it works.

    Jeff

  • hi,

    the problem solved.

    it's because of motorware version.

    as can see in the picture that "Jeff Stafford" shared, his motorware version is 1_01_00_15.

    the F28027.CMD file in this version is diffrent from previous version that i have used(1_01_00_15).

    i think the Flash structure in new version is enhanced and  

    Load Program Error

    disappeared. i suggest to work with Motorware  1_01_00_15.

    thank you Jeff.