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.

CCS/TMS320F28335: DSP/BIOSv5.42.0.07: C2Proj gives Sector violation (0xce50...0xce5f) for flash based application

Guru 20045 points
Part Number: TMS320F28335


Tool/software: Code Composer Studio

Hello,

C2Proj is giving a Sector violation (0xce50...0xce5f) for flash based application.  I generated the ehx file the same way I did for a non-DSP./BIOS that I successfully downloade to the uC using C2Proj.

According to the map file, the following is located in that region.  

.trace 0 0000ce00 00000200
0000ce00 00000200 --HOLE-- [fill = 0000]

That region seems like some type of trace buffer for the DSP/BIOS, which should be in RAM.

I was able to download and run the program using a JTAG debugger.  Also, the program ran ok after removing the debugger and cycling power.

The disassembly of that region is shown below.

How do I fix this issue?

Stephen

        SYS_PUTCBEG:
00ce00:   0000        ITRAP0       
00ce01:   0000        ITRAP0       
00ce02:   0000        ITRAP0       
00ce03:   0000        ITRAP0       
00ce04:   0000        ITRAP0       
00ce05:   0000        ITRAP0       
00ce06:   0000        ITRAP0       
00ce07:   0000        ITRAP0       
00ce08:   0000        ITRAP0       
00ce09:   0000        ITRAP0       
00ce0a:   0000        ITRAP0       
00ce0b:   0000        ITRAP0       
00ce0c:   0000        ITRAP0       
00ce0d:   0000        ITRAP0       
00ce0e:   0000        ITRAP0       
00ce0f:   0000        ITRAP0       
00ce10:   0000        ITRAP0       
00ce11:   0000        ITRAP0       
00ce12:   0000        ITRAP0       
00ce13:   0000        ITRAP0       
00ce14:   0000        ITRAP0       
00ce15:   0000        ITRAP0       
00ce16:   0000        ITRAP0       
00ce17:   0000        ITRAP0       
00ce18:   0000        ITRAP0       
00ce19:   0000        ITRAP0       
00ce1a:   0000        ITRAP0       
00ce1b:   0000        ITRAP0       
00ce1c:   0000        ITRAP0       
00ce1d:   0000        ITRAP0       
00ce1e:   0000        ITRAP0       
00ce1f:   0000        ITRAP0       
00ce20:   0000        ITRAP0       
00ce21:   0000        ITRAP0       
00ce22:   0000        ITRAP0       
00ce23:   0000        ITRAP0       
00ce24:   0000        ITRAP0       
00ce25:   0000        ITRAP0       
00ce26:   0000        ITRAP0       
00ce27:   0000        ITRAP0       
00ce28:   0000        ITRAP0       
00ce29:   0000        ITRAP0       
00ce2a:   0000        ITRAP0       
00ce2b:   0000        ITRAP0       
00ce2c:   0000        ITRAP0       
00ce2d:   0000        ITRAP0       
00ce2e:   0000        ITRAP0       
00ce2f:   0000        ITRAP0       
00ce30:   0000        ITRAP0       
00ce31:   0000        ITRAP0       
00ce32:   0000        ITRAP0       
00ce33:   0000        ITRAP0       
00ce34:   0000        ITRAP0       
00ce35:   0000        ITRAP0       
00ce36:   0000        ITRAP0       
00ce37:   0000        ITRAP0       
00ce38:   0000        ITRAP0       
00ce39:   0000        ITRAP0       
00ce3a:   0000        ITRAP0       
00ce3b:   0000        ITRAP0       
00ce3c:   0000        ITRAP0       
00ce3d:   0000        ITRAP0       
00ce3e:   0000        ITRAP0       
00ce3f:   0000        ITRAP0       
00ce40:   0000        ITRAP0       
00ce41:   0000        ITRAP0       
00ce42:   0000        ITRAP0       
00ce43:   0000        ITRAP0       
00ce44:   0000        ITRAP0       
00ce45:   0000        ITRAP0       
00ce46:   0000        ITRAP0       
00ce47:   0000        ITRAP0       
00ce48:   0000        ITRAP0       
00ce49:   0000        ITRAP0       
00ce4a:   0000        ITRAP0       
00ce4b:   0000        ITRAP0       
00ce4c:   0000        ITRAP0       
00ce4d:   0000        ITRAP0       
00ce4e:   0000        ITRAP0       
00ce4f:   0000        ITRAP0       
00ce50:   0000        ITRAP0       
00ce51:   0000        ITRAP0       
00ce52:   0000        ITRAP0       
00ce53:   0000        ITRAP0       
00ce54:   0000        ITRAP0       
00ce55:   0000        ITRAP0       
00ce56:   0000        ITRAP0       
00ce57:   0000        ITRAP0       
00ce58:   0000        ITRAP0       
00ce59:   0000        ITRAP0       
00ce5a:   0000        ITRAP0       
00ce5b:   0000        ITRAP0       
00ce5c:   0000        ITRAP0       
00ce5d:   0000        ITRAP0       
00ce5e:   0000        ITRAP0       
00ce5f:   0000        ITRAP0       

  • Steven,

    C2Prog does not support loading to RAM.  It can only load to Flash. 

    Debugger supports loading to RAM.  However, even debugger does not guarantee loading to RAM when some sections of the linker are mapped to Flash.  Any flash tools (TI or 3rd party) are developed to load a fully embedded flash application only - meaning all the initialized sections should be mapped to flash in the linker cmd file.  If you need something to be executed from RAM, your application has to copy it from flash to RAM at runtime before executing it.

    Please fix your linker cmd file to map all initialized sections to Flash.  Let us know if you have any questions.

    Thanks and regards,
    Vamsi 

  • Hello Vamsi,

    I guess I didn't make myself clear enough. I already understood that the program had to be in flash. 

    The application code is all in flash memory as can be seen by the map file.

    I didn't create any linker file for the project, so where is the linker command file that is supposedly created by the DSP/BIOS?

    I need some help on understanding the DSP/BIOS so I can make a necessary changes.

    Stephen

     

  • Stephen,

    Does this help: https://e2e.ti.com/support/legacy_forums/embedded/tirtos/f/355/t/272275?DSP-BIOS-TConf-creates-trace-and-args-as-Initialized- ?

    If not, I will loop in other experts to help you.

    Thanks and regards,
    Vamsi

  • Hello Vamsi,

    That might solve the trace section, but the initialize args section will still be there.  

    Has anyone found out how to solve both problems?  Also, is there a template file I can change so I won't have to change the auto generated command file each time?

    The post was in 2013, so I would think that someone would have solved it by now.

    Stephen

  • Stephen,

    You can use the '--args=0' linker option referenced in Table 2-27 of the Compiler User's Guide for the args section.

    I believe the template you are looking for is in your install directory here: "/bios_5_42_00_07/packages/ti/bios/config/cdb/c28xx.cdb". You will need to remove the 'fill=0' from the .trace directive in this template file. Let me know if this worked for you.

    Jas

  • Hello Jas,

    I removed all references to _traceString and _argsString and then tried to rebuild my project.

    The rebuild generated the following error:

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../tsk.tcf'
    'Invoking: TConf'
    "C:/ti/bios_5_42_00_07/xdctools/tconf" -b -Dconfig.importPath="C:/ti/bios_5_42_00_07/packages;" "../tsk.tcf"
    subdir_rules.mk:35: recipe for target 'build-930243615' failed
    js: "C:/MyProject//tsk.tcf", line 399: Failed to generate config files.
    gmake: *** [build-930243615] Error 1
    gmake: Target 'all' not remade because of errors.

    Line 399 is the last line in tsk.tcf file and it contains prog.gen();.

    It is interesting to note that the c28xx.cdb file contains the following information:  

    * Do not modify this file; it's generated from c28xx.cdb.h
    * via mkseed!

    Is it ok to modify c28xx_cdb.h? If so, how do I remove fill=0?

    Stephen

  • Stephen,

    The c28xx.cdb file does contain that warning, but you are able to modify it. You should keep the original though in case anything gets too out of whack.

    For example, to remove fill=0 from the .args section you would just remove the "fill=0" shown below in bold from line 2220 of c28xx.cdb:

    prop _argsString    :: ("%8t .args: fill=0 {%12t\n *(.args)\n . += 0x%1x;%8t\n }\0, _argsSize")

    You would do the same thing for the .trace section on line 11296:

    prop _traceString :: (
    "%8t .trace: fill = 0x0 {%12t\n_SYS_PUTCBEG = .;\n. += 0x%1x;\n_SYS_PUTCEND = . - 1;%8t\n }\0, _traceSize"
    )

    Jas

  • Hello Jas,

    I removed both of them, but args fill = 0 still shows up in the map file, i.e.

    .args 0 0000db6a 00000004
    0000db6a 00000004 --HOLE-- [fill = 0]

    Stephen

  • Stephen,

    Could you try passing the '--args=0' linker option explicitly on the command line for the .args section?

    Jas

  • Hello Jas,

    I tried to put --args=0 in the linker options and I think CCS replaces it with --arg_size=0 (see below).

    I deleted the build directory and rebuilt the project.  I can see the --arg_size=0 is in the console output when the compiler is linking.

    The args section is still in the map file:

    .args 0 0000db6a 00000004
    0000db6a 00000004 --HOLE-- [fill = 0]

    The project is using compiler version v6.2.11.  Rebuilding with compiler version v18.12.2LTS produced the errors shown below.

    Stephen

    Description Resource Path Location Type
    #10104 ./tskcfg.cmd undefined symbol "HWI_DLOG" used in MyProject line 108 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_ILLEGAL" used in MyProject line 112 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT1" used in MyProject line 94 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT10" used in MyProject line 103 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT11" used in MyProject line 104 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT12" used in MyProject line 105 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT13" used in MyProject line 106 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT2" used in MyProject line 95 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT3" used in MyProject line 96 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT4" used in MyProject line 97 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT5" used in MyProject line 98 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT6" used in MyProject line 99 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT7" used in MyProject line 100 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT8" used in MyProject line 101 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_INT9" used in MyProject line 102 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_NMI" used in MyProject line 111 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_RESERVED" used in MyProject line 110 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_RESET" used in MyProject line 93 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_RTOS" used in MyProject line 109 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_TINT" used in MyProject line 107 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER1" used in MyProject line 113 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER10" used in MyProject line 122 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER11" used in MyProject line 123 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER12" used in MyProject line 124 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER2" used in MyProject line 114 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER3" used in MyProject line 115 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER4" used in MyProject line 116 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER5" used in MyProject line 117 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER6" used in MyProject line 118 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER7" used in MyProject line 119 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER8" used in MyProject line 120 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "HWI_USER9" used in MyProject line 121 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_1" used in MyProject line 125 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_2" used in MyProject line 126 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_3" used in MyProject line 127 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_4" used in MyProject line 128 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_5" used in MyProject line 129 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_6" used in MyProject line 130 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_7" used in MyProject line 131 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT1_8" used in MyProject line 132 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_1" used in MyProject line 133 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_2" used in MyProject line 134 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_3" used in MyProject line 135 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_4" used in MyProject line 136 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_5" used in MyProject line 137 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_6" used in MyProject line 138 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_7" used in MyProject line 139 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT2_8" used in MyProject line 140 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_1" used in MyProject line 141 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_2" used in MyProject line 142 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_3" used in MyProject line 143 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_4" used in MyProject line 144 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_5" used in MyProject line 145 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_6" used in MyProject line 146 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_7" used in MyProject line 147 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT3_8" used in MyProject line 148 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_1" used in MyProject line 149 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_2" used in MyProject line 150 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_3" used in MyProject line 151 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_4" used in MyProject line 152 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_5" used in MyProject line 153 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_6" used in MyProject line 154 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_7" used in MyProject line 155 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT4_8" used in MyProject line 156 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_1" used in MyProject line 157 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_2" used in MyProject line 158 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_3" used in MyProject line 159 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_4" used in MyProject line 160 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_5" used in MyProject line 161 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_6" used in MyProject line 162 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_7" used in MyProject line 163 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT5_8" used in MyProject line 164 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_1" used in MyProject line 165 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_2" used in MyProject line 166 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_3" used in MyProject line 167 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_4" used in MyProject line 168 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_5" used in MyProject line 169 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_6" used in MyProject line 170 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_7" used in MyProject line 171 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT6_8" used in MyProject line 172 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_1" used in MyProject line 173 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_2" used in MyProject line 174 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_3" used in MyProject line 175 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_4" used in MyProject line 176 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_5" used in MyProject line 177 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_6" used in MyProject line 178 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_7" used in MyProject line 179 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT7_8" used in MyProject line 180 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_1" used in MyProject line 181 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_2" used in MyProject line 182 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_3" used in MyProject line 183 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_4" used in MyProject line 184 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_5" used in MyProject line 185 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_6" used in MyProject line 186 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_7" used in MyProject line 187 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT8_8" used in MyProject line 188 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT9_1" used in MyProject line 189 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT9_2" used in MyProject line 190 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT9_3" used in MyProject line 191 C/C++ Problem
    #10104 ./tskcfg.cmd undefined symbol "PIE_INT9_4" used in MyProject line 192 C/C++ Problem

  • Stephen,

    There is an ARGSSIZE configuration parameter on line 2771 in the c28xx.cdb template that you may also have to change:

    Could you try changing the '4' in bold below to a '0'. Could you also try removing the “if ($1 < 4)”  statement shown in strikethrough below:

        global ARGSSIZE :: 4 {              /* words */

            prop Type :: GCONF_NUMERIC

            prop Format :: "0x%04x"

            prop Style :: GCONF_SHORTSTYLE | GCONF_UNSIGNEDSTYLE

            prop Label :: "Argument Buffer Size"

            prop JSName :: "ARGSSIZE"

            prop Visible :: 1       /* no support in scope yet */

            prop Writable :: 1

            prop NoGen :: 1

            prop Set :: (

                if ($1 < 4) {

                    .error("The 'arguments' section must have at least 4 words.")

                }

                else {

                    .ARGSSIZE = $1,

                    "ok"

                }

            )

        }{

    Let me know if this works.

    Jas