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.

TMS320F28379D: "Break at address "0x3fe493" with no debug information available, or outside of program code" warning when copying from FLASH to RAM

Part Number: TMS320F28379D

Hie Folks,

Currently, I am working on flash based standalone booting and later, copying the complete code to RAM after powerup.

I have used copy sections and code start assembly files to copy the initialized and uninitialized section from flash to ram.

Now the issue is whenever I dump the code into the flash using the XDS100V3 debugger, I am getting this popup:

"Break at address "0x3fe493" with no debug information available, or outside of program code."

However, the application code is running as per requirement.

Please let me know with your suggestions.

Regards.

  • Furthermore, I have also observed that the warning pops up when I add the program to copy the .text initialization.

  • Hi Vamsi, 

    Thanks for the thread info.

    I have gone through the thread.

    When I am executing my application from flash and not RAM, there is no such pop-up or warning. However, when I try to copy the entire code from FLASH to RAM and then execute from RAM, I am getting this warning. 

    I could not find a way to debug as the application is running fine.

    Please suggest a method to debug the reason from ITRAP.

    Regards.

  • Vamsi,

    I have also checked the memory allocation. All the initialized sections are correctly copied to RAM from FLASH.

  • Hi Nikhil,

    1) Please ensure that the stack is not overflowing in to some other RAM block overwriting code or data.  You can fill in the stack space with a known value before executing the application and later see the stack space to know whether the entire space is used up or not.

    2) Since you said the issue occurs when you add the code to copy .txt -> Did you check whether the code to copy the .text is intact or not?

    3) Step through your code and figure out which part of the code is causing illeagal ISR and debug from there.

    4) In the event of an ITRAP, you can read the next PC location pushed to stack.

        MOVL     ACC,*-SP[2] ;

        The immediate previous address (ACC-1) would be the address of the instruction that caused ITRAP. 

    Thanks and regards,
    Vamsi

  • 1. I have checked the .stack overflow. The memory assigned to stack is off length 0x400 and stack size is 0x200. Further, i did the mention exercise and found that the stack space is completely utilized.

    2. The code for copying .text is:

    MOVL XAR5,#_text_size ; Store Section Size in XAR5
    MOVL ACC,@XAR5 ; Move Section Size to ACC
    MOVL XAR6,#_text_loadstart ; Store Load Starting Address in XAR6
    MOVL XAR7,#_text_runstart ; Store Run Address in XAR7
    LCR copy ; Branch to Copy

    Please look into the code.

    3. I could step through the code because the ITRAP occurs just after I dump the code to flash. I did try to step through but the cursor stays in the break point untill resume the excution.

    Screen Shot:

    4. The ACC value is 0x0000. I could not guess whether I am reading it correct or not. Also, saw the stack space in memory browser, the complete stack is empty.

    Suggestions awaited.

  • Hi Nikhil,

    If stack is full utilized, please try to increase the size of the stack and see if that helps.

    May I know why you are copying the entire code to RAM and not just the time critical code?  As you may know, F28379D flash is much faster than the previous devices and the flash read interface has prefetch mechanism to improve the performance.  Please see below.

    Are you following any application note to copy the entire flash to RAM?  

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    I have checked by increasing the stack size as well. That did not work as well.

    I am currently following "spraau8a-Flash to Ram" guide to copy the files.

    The reason behind is to increasing the code exception time. I tried only copying the time critical tasks but due to data flow between different functional processors, I am experiencing time delay in the received data. That's the reason I am looking to move the execution code to RAM.

    Furthermore, the current application is already proven in F28335. I am migrating to F28379D and cannot comprise on code executing, at least at this stage.

    Regards.

  • Hi Nikhil,

    Is watchdog disabled while copying the code to RAM?

    Or is it being serviced by your copy code?

    Thanks and regards,
    Vamsi

  • I have disabled it in CodeStartBranch.asm file. The source is attached below:

    WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0

    .ref copy_sections
    .global code_start

    ***********************************************************************
    * Function: codestart section
    *
    * Description: Branch to code starting point
    ***********************************************************************

    .sect "codestart"
    .retain

    code_start:
    .if WD_DISABLE == 1
    LB wd_disable ;Branch to watchdog disable code
    .else
    LB copy_sections ;Branch to start of boot._asm in RTS library
    .endif

    ;end codestart section

    ***********************************************************************
    * Function: wd_disable
    *
    * Description: Disables the watchdog timer
    ***********************************************************************
    .if WD_DISABLE == 1

    .sect "wddisable"
    wd_disable:
    SETC OBJMODE ;Set OBJMODE for 28x object code
    EALLOW ;Enable EALLOW protected register access
    MOVZ DP, #7029h>>6 ;Set data page for WDCR register
    MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
    EDIS ;Disable EALLOW protected register access
    LB copy_sections ;Branch to start of boot._asm in RTS library

    .endif

    ;end wd_disable

    .end

  • Hi Nikhil,

    When you are stepping through the code, the execution of whichever instruction caused the ITRAP has to be checked thoroughly to ensure it is the intended code.

    Thanks and regards,
    Vamsi

  • Vamsi,

    I am unable to step through the code, as it occurs just after I dump the code and when I try to step through, the cursors stays at "Break at address "0x3fe494" with no debug information available, or outside of program code." 

    however, when I the run the code, its working perfectly fine.

  • Nikhil,

    When you say it works fine when you run the code, do you mean it won't hit the ITRAP then?  Did you try keeping a breakpoint at the ITRAP ISR and it did not hit?

    Thanks and regards,
    Vamsi

  • Vamsi,

    I could not figure which instruction is hitting the trap. When I say the code is running perfectly, I mean that the code execution is as per the requirement. The problem is that whenever I dump the code into flash using debugger, I get this warning and when I click the run button the code executes perfectly fine. I can see all the variables in the watch window and they are as per requirement. All the interrupts are working fine as per their software priority. I checked each and every peripheral functionality and it works fine.

    I am only facing this warning when I dump the code into the flash, especially when I include the section copy code to copy the .txt file to RAM. The screenshot is attached.

    Since, the code is running fine, I could not step through and check for error. Furthermore, as I said in the earlier case, after I dump the code, I tried to step through the code and it does not move out of the break address window. The cursors stays there itself. Later, if I press the execute button or the play symbol, the code runs fine and I can even step through.

    To be specific, when I dump the code, the cursor is not pointing to main function, which I think is the normal case. Please correct me if I am wrong.

    Please help me with this warning of ITRAP.

    Regards.

  • Hi Nikhil,

    Since the application is running as intended when you do a free run, I think the warning is because of the entry_point configuration.  What did you configure for the entry_point in your project settings?  

    Project's linker options: Project build settings -> Build -> C2000 Linker -> Advanced options -> Symbol Management -> --entry_point:  

    Cursor is not pointing to the main function since the main moved to RAM by your copy functions - this should be ok.

    Thanks and regards,

    Vamsi

  • Vamsi,

    I did not specify anything at --entry_point.

    Please let me know what should I add to this option.

    Regards.

  • Hi Nikhil,

    Can you try code_start?

    Thanks and regards,
    Vamsi

  • It is giving me this error, when I mentioned code_start as entry point

    undefined first referenced
    symbol in file
    --------- ----------------
    _c_int00 ./System Assembly Files/_FLASH_F3837xD_SectionCopy_nonBIOS.obj
    _round ./User C Files/TBPRD_Calculation.obj

    error #10234-D: unresolved symbols remain
    warning #10063-D: entry-point symbol other than "_c_int00" specified: "code_start"
    error #10010: errors encountered during linking; "Traction AFE.out" not built

  • Nikhil,

    Error looks as if CodestartBranch.asm is not included in the project.

    Could you attach your project's codestartbranch file here?

    Thanks and regards,

    Vamsi

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    ;//###########################################################################
    ;//
    ;// FILE: F2837xD_CodeStartBranch.asm
    ;//
    ;// TITLE: Branch for redirecting code execution after boot.
    ;//
    ;// For these examples, code_start is the first code that is executed after
    ;// exiting the boot ROM code.
    ;//
    ;// The codestart section in the linker cmd file is used to physically place
    ;// this code at the correct memory location. This section should be placed
    ;// at the location the BOOT ROM will re-direct the code to. For example,
    ;// for boot to FLASH this code will be located at 0x3f7ff6.
    ;//
    ;// In addition, the example F2837xD projects are setup such that the codegen
    ;// entry point is also set to the code_start label. This is done by linker
    ;// option -e in the project build options. When the debugger loads the code,
    ;// it will automatically set the PC to the "entry point" address indicated by
    ;// the -e linker option. In this case the debugger is simply assigning the PC,
    ;// it is not the same as a full reset of the device.
    ;//
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • It looks it is defined.

    I may have to loop in our project creation expert for you.

    Please expect a reply in a day or two.

    Thanks and regards,

    Vamsi

  • Sure please do the needfull.

    Regards.

  • Hi Nikhil,

    Do you gave the libc.a or the compiler rts library included in your linker options?

    Regards,

    Veena

  • Hie Vamsi,

    I have included the rts library. Please check the screenshot below:

    Regards.

  • Vamsi,

    I have tried by including libc.a in the include options and then added code_start as entry point. I got this warning which seems ok.

    "warning #10063-D: entry-point symbol other than "_c_int00" specified:  "code_start""

    Now, I am not getting the ITRAP warning message. However, now I could debug the system using the watch window. The screen shot of the window after dumping code is below:

    From above screenshot, it shows that the CPU is running. However, is not connected for debug.

  • The warning on entry-point is symbol is okay, If you want to suppress that, you can do that in C2000 Compiler->Advanced Options->Suppress diagnostic id, and add 10063.

    Vamsi can comment on the second part of your question  

    Regards,

    Veena

  • Hi Nikhil,

    Try halting the core in the debugger and place a few breakpoints in the RAM code space (of your application) and see whether the breakpoint gets hit or not.

    Please note:  Breakpoints should be placed after the code is copied from flash to RAM.

    Thanks and regards,
    Vamsi

  • Hie Vamsi,

    As you can see in the earlier screenshot, the debugger is getting disconnected immediately after dumping the code to flash.

    I am unable to control the code executing if I include to code_start as entry point, as said earlier.

    Regards

  • Hi Nikhil,

    In the snapshot that you provided, debugger is not disconnected.  It is connected and the core is running.  Try halting the core and load symbols as shown in step 5 of SPRAAU8A:

    Thanks and regards,

    Vamsi

  • Thanks for help Vamsi and Veena. 

    The issue is resolved and the code is running without any warnings.

    Regards.