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.

Developing a simple program - CCS V3.3

Expert 1800 points
Other Parts Discussed in Thread: SPRC097

Hi,

I was successful in making F2812 custom board and also could get connected thru the XDS510LC emulator.

As I am new to F2812 I felt prudent to take small steps.  In that direction started trying out the Lesson 1 of CCS V3.3 tutorials - Developing a simple program.

I could create the project and add the file : Volume.h, rts2812_ml.lib, load.asm, vectors.asm, volume.c and volume.cmd.  I could also rebuilt it and get the .out file.

I could not load the program as get the following error .

Data verification error occured, file load failed.

Data verification failed at address 0x3FFC0.

Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

 

Could I know how to sort this to enable me to complete the exercises.


thx

  • indiantuktuk said:
    Data verification failed at address 0x3FFC0.

    I think the address is probably 0x3FF FC0 - if so this location is the reset vector.  On the 281x it is either in the boot ROM or zone 7 of the external memory interface (XINTF).  Which it is depends on the state of the MP/MC pin when the device is reset. 

    One suggestion I have is starting with the peripheral examples that come with the C/C++ header files and peripheral examples.  Only the specific run from XINTF example requires external memory on zone 7. 

    http://focus.ti.com/docs/toolsw/folders/print/sprc097.html

    But for now, back to the problem at hand:

    If MP/MC is high at reset, then zone 7 of the XINTF is enabled.  If you have external RAM on your board connected to zone 7 you should be able to load the code without the error.  If you have RAM but sitll get the error make sure you have reset the device after changing MP/MC to a high signal.   This signal is only sampled at reset.   If you still can't load it then it could be an issue with the CCS memory map - the region may be defined as read only instead of read/write. 

    If you don't have external RAM on your board then you won't be able to load this address through the external interface.  In this case set MP/MC low at reset, so the boot ROM is present.  In this case you cannot load the address 0x3FFFC0 since it is in the boot ROM so you can remap the section or tell the tools to not use it or load it.

    In the linker command file (.cmd)  you can add the section type type = DSECT so .reset won't be loaded/used.

    i.e.       .reset   : > RESET,   PAGE = 0, type = DSECT

    This is described in the assembler users guide (SPRU513)

    The same issue likely exists with the allocation of other sections - for example probably the VECTOR section.

    -Lori

  • Thanks Lori for the info.

    My custom board has IS61WV6416BLL-12TLI external memory.

    Based on my understanding I would do the following

    1)  Power ON the F2812 processor.

    2)  Change MP/MC to a high signal.  At the moment it is neither high or low.

    3)  Reset the F2812 processor by using the reset pin provided in the custom board

    4)  Implement the peripheral examples as in SPRC097.  Which is not done till now.

    5)  Start developing the Simple program as in the tutorial

    6)  If the problem exists change the linker command as suggested by you.

    I would do the above and report back.  If my understanding is wrong please suggest.

    I appreciate your support.

    Thx

     

  • hi

     

    You try to check the memory mapping in the cmd file...

     

     

  • Lori Heustess said:
    One suggestion I have is starting with the peripheral examples that come with the C/C++ header files and peripheral examples.  Only the specific run from XINTF example requires external memory on zone 7

    Dear Mr.Lori,

    I was started with the peripheral examples from SPRC097.  The example I tried was run_from_xintf.

    1)  Pulled the XMP_MCn to high and then powered on the board.

    2)  configured for "boot to H0" operation.

    3)  Started the code composer studio V3.3

    4)  Removed the F2812.gel file

    5)  File -> Open the Example_281xRunFromXintf.gel file

    6)  Debug-->Connect.

    7)  The disassembly window opened.  Its amazing the window is blank with    ---------   -----------  -----------    in all rows.

    could you please review and let me know if I am missing any steps in the above.  Please suggest.

    Thx & rdgs

     

     

  • CCS will display dashes in the memory window if the memory map has not been described to it via the GEL file.  If you look at the Example_281xRunFromXintf.gel file, the F2812_XINTF_Map() routine is not called automatically, which describes the memory map to CCS.  You can run a menu command GEL->DSP281x Run from XINTF->Load_Code to actually get this routine to be called.  This should be your step 7.  Then the disassembly window might be appropriately displayed.

  • Brandon,

    Thanks for the guidance.  I retraced the steps as mentioned below.


    1)  File -> Open the Example_281xRunFromXintf.gel file
    2)  Debug-->Connect.

    The GEL callback “OnReset(0)” for the target “F2812 XDS 510USB emulator/cpu_0” is still processing.  The function could contain an infinite loop.
    Do you wish to pause the processing of this function and continue.
    Yes/no

    Selected : No

    4)  The disassembly file is still blank.
    5)  Opened GEL->DSP281x Run from XINTF->Load_and_build_project
    6)  error observed :Encountered a problem loading file:\debug\Example_281xRunFromXintf.out.  Could not open the file
     7)  GEL->DSP281x Run from XINTF->Load_Code
    Error observed "Function “F28112_XINTF_Map()” not found


    Shut down the CCS and after a gap again started CCS to check if above errors would be repeated,

    a)  loaded the Example_281xRunFromXintf.GEL file
    b)  GEL->DSP281x Run from XINTF->Load_and_build_project

    Amazing the program loaded and disassembly window opened.  The message at the bottom indicates Halted :S/W breakpoint.

    Oh what a relief.

    Noted the watch window; Debug---> closed; removed the GEL file and closed down CCS.
    ------------------------------------------
    Query :-

    1)  does the above example file indicate that I am able to access the external memory IS61WV6416BLL-12TLI. 
    2)  Any more tests needs to be done to confirm the run from XINTF?.
    3)  Why I got the errors in my first run?.
    -------------------------------------------
    Encouraged I went back to my earlier tutorial CCS - L1.

    Started CCS, File --> load --> volume.gel
    Project-> open-> volume1.pjt
    Project--> rebuild all
    The build shows 0 erros, 4 warnings, 0 remarks

    Message 1
    Data verification failed at address 0x8688.  Please verify target memory and memory map.
    Pressed OK

    Message 2
    A data verification error occurred, file load failed.

    Not sure what's the problem this time around.  could you please review and suggest.

    Thx & rdgs

  • Hi,

    Started CCS V3.3,File --> load --> volume.gel
    Project-> open-> volume1.pjt
    Project--> rebuild all
    The build shows 0 erros, 4 warnings, 0 remarks

    Message 1
    Data verification failed at address 0x8688.  Please verify target memory and memory map.
    Pressed OK

    Message 2
    A data verification error occurred, file load failed.

    Not sure what's the problem.  Please suggest.

    Settings :- XMP/MCn :- High & Boot to H0

    Thx & rdgs

  • This particular region of the memory map is in the L0 SARAM Secure RAM which needs to be unlocked via the CSM.  It seems that perhaps the CSM is not being unlocked to allow access to this region.  Which GEL file are you using at this particular moment in time when running the Volume1 example?

  • Thanks Brandon for the response.

    I am using the F2812.GEL file.

    Please suggest.

    Thx

  • BrandonAzbell said:
    This particular region of the memory map is in the L0 SARAM Secure RAM which needs to be unlocked via the CSM.  It seems that perhaps the CSM is not being unlocked to allow access to this region.

    As Brad suggests, the gel files that come with the peripheral examples have a CSM unlock function.  It will be automatically called when you reset the device if it is in the "OnReset()" function of the GEL file.

    In addition to this you can keep the CSM unlocked during debug by opening a memory window to the password location (0x3F7FF8-0x3F7FFF on 281x).  When you first open the window it may read back all 0's.  Make sure to refresh the window and then it should read back 0xFFFF's if it is unlocked (assuming the password is not programmed).  If it reads 0x0000's then it is locked with a password.  By keeping the memory window open CCS will re-read the password and unlock the CSM after each reset.

    Regards,

    -Lori

  • Hi,

    I am new to CCS and would wish to avoid CSM at the moment as I am scared that it could get locked. 

    Is there a safer option to overcome this. 

    I wonder if I could reset the board with the reset pin provided on the controller board as the first line in F2812.gel has the "OnReset()" function?. 

    Does this help.

    I have a query : For the first time when I POWERED ON the board the jumpers were are not placed does this lock the processor by any chance?.

    thx

     

  • indiantuktuk said:

    I am new to CCS and would wish to avoid CSM at the moment as I am scared that it could get locked. 

    Is there a safer option to overcome this. 

    The only thing that can lock the processor is to program the CSM password or not power the flash (ie leave VDD3VFL unconnected).   If you leave the power pin unconnected then the processor cannot read the password so it is by default locked.  Just power the pin and the processor will again be able to read the password.  

    After a reset the CSM will "lock" but it isn't really secure if the password is erased (0xFFFF's) because it can be unlocked by simply reading the password locations.   Either the GEL file can do this read or you can open a memory window as I suggested.

    indiantuktuk said:
    I wonder if I could reset the board with the reset pin provided on the controller board as the first line in F2812.gel has the "OnReset()" function?. 

    Either a reset with the pin or a debugger reset will "lock" the CSM.  But if the password is not programmed it will unlock as soon as code composer reads the password locations.  Does OnReset() call something like "CSMUnlock()"  ? (name might be slightly different).

    indiantuktuk said:
    I have a query : For the first time when I POWERED ON the board the jumpers were are not placed does this lock the processor by any chance?.

    No.    

    -Lori

  • Lori Heustess said:
    Does OnReset() call something like "CSMUnlock()"  ? (name might be slightly different).

     

    Hi,

     

    The function to unlock CSM is

     OnReset(int nErrorCode)

    {

        Unlock_CSM();

    }

     

     

    I did the memory map (view ---> memory) at the locations suggested and the results are as given below

     

    Location           Values

     

    0x3F7FF8        0xFFFF           0xFFFF           0xFFFF

    0x3F7FF9        0xFFFF           0xFFFF           0xFFFF

    0x3F7FFA       0xFFFF           0xFFFF           0xFFFF

    0x3F7FFB       0xFFFF           0xFFFF           0xFFFF          

    0x3F7FFC       0xFFFF           0xFFFF           0xFFFF

    0x3F7FFD       0xFFFF           0xFFFF           0xFFFF

    0x3F7FFE       0xFFFF           0xFFFF           0x736C

    0x3F7FFF       0xFFFF           0x736C            0x0B5C

     

    I am not sure why the couple of values for 0x3F7FFE & 0x3F7FFF are not 0xFFFF.  What amazes me is the value 0x736C was 0x636C earlier in the day.  Am I missing something.  I did not give any password since I do not know how to do it at the moment.

     

    Could you please review and suggest how to sort this.

     

    thx

     

  • indiantuktuk said:
    I did the memory map (view ---> memory) at the locations suggested and the results are as given below
     
    Location           Values
     
    0x3F7FF8        0xFFFF           0xFFFF           0xFFFF
    0x3F7FF9        0xFFFF           0xFFFF           0xFFFF
    0x3F7FFA       0xFFFF           0xFFFF           0xFFFF
    0x3F7FFB       0xFFFF           0xFFFF           0xFFFF          
    0x3F7FFC       0xFFFF           0xFFFF           0xFFFF
    0x3F7FFD       0xFFFF           0xFFFF           0xFFFF
    0x3F7FFE       0xFFFF           0xFFFF           0x736C
    0x3F7FFF       0xFFFF           0x736C            0x0B5C

    I'm not exactly sure about your data.  The password is 128 bits and the data has 3x that. 

    If you are seeing non "FFFF" password locations and didn't do anything to unlock the part then I suspect these are really part of the memory space following the flash.  If any of the password locations were not "FFFF" then the CSM would stay locked and you would read all "0000" unless you knew the password and could unlock it.

    Can you double check the address locations against the value again? 

    -Lori

  • Thanks Lori for the response.

    Could you confirm the method to check the values as given below.

    View--> memory and the

    bottom of the memory window there are couple of drop down options such Hex.32 bit C style; TI-style;64 bit float; 64 bit exponential float and many more.  However there is no 128 bit option. 

    The other drop down has DATA, IO and program as option.

    Could you please suggest how to look for the same.

    thx

     

  • 8304.reg_mem_map.doc

    Hi Lori,

    I checked the memory map again.  I think I need to ignore data from the second column since the number of columns keep increasing as I enlarge the window.  Please confirm my understanding.  If I ignore the additional columns the values would look as below.  The reading is with Format chosen as "16bit Hex - C style" and page field as "Data" selected.

    Location           Values

     

    0x3F7FF8        0xFFFF

    0x3F7FF9        0xFFFF

    0x3F7FFA       0xFFFF

    0x3F7FFB       0xFFFF                 

    0x3F7FFC       0xFFFF

    0x3F7FFD       0xFFFF

    0x3F7FFE       0xFFFF

    0x3F7FFF       0xFFFF          

     

    Please also find the image of memory map at one of the location.  Could you please review and suggest the next course of action.

     

    thx