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.

memory section definition in CCS5.2.1

Other Parts Discussed in Thread: LM3S8971, SYSBIOS, CCSTUDIO

Hello,

I added in the project M3 core of processor Concerto file F28M35x_generic_M3_FLASH.cmd.

File F28M35H52C1.cmd, which creates CCS by default, I deleted it.

The project was created with the use of the operating system SYS / BIOS.

And I had the following error:

C:\ti1\ccsv5\utils\bin\gmake -s -k all
'ARM Linker: AT24_NVSA_M3.out'
"./configPkg/linker.cmd", line 113: warning #10097: memory range not found:

>> Compilation failure
   C03SRAM on page 0
"./configPkg/linker.cmd", line 113: error #10265: no valid memory range(NULL)
   available for placement of ".flashfuncs"
"./configPkg/linker.cmd", line 113: error #10099-D: run placement fails for
   object ".flashfuncs", size 0x3c (page 0)
error #10010: errors encountered during linking; "AT24_NVSA_M3.out" not built
gmake: *** [AT24_NVSA_M3.out] Error 1
gmake: Target `all' not remade because of errors.

I use CCS5.2.1 with SYS / BIOS v6.33.6.50, the project uses the library "driverlib.lib".

Obviously, the memory section defined in the file F28M35x_generic_M3_FLASH.cmd do not match memory section created by default.

How to change the memory section the default definition?

Thank you,

Yuriy.

  • Did you possibly forget to add the command script file name to the compilers build properties dialog?

  • Hi Brett,

    I tryed add file F28M35x_generic_M3_FLASH.cmd to compilers build properties dialog and and got this error:

    >> WARNING: invalid compiler option --retain=g_pfnVectors (ignored)
    >> WARNING: invalid compiler option --retain=dcsm_z1_secvalues.obj(.z1secvalues,.z1_csm_rsvd) (ignored)
    >> WARNING: invalid compiler option --retain=dcsm_z2_secvalues.obj(.z2secvalues,.z2_csm_rsvd) (ignored)
    >> WARNING: more than one source file is specified; preprocessor output will be generated for last file only
    Fatal error #5: could not open source file "MEMORY"
    1 fatal error detected in the compilation of "MEMORY".

    Yuriy.

  • Its a cmd linker file so the compiler doesn't know how to execut it MEMORY is a Tag in the cmd file - saw the same messages from a make build that actully is characterized as an executable built with links to other projects in the solution explorer.

    The linker some how executes the cmd script possibly from $Command as it is doing in this multi project imported build I'm doing.

    Not sure of your exact situation but If this was an existing project and you manually copied it into the work space directory then used the import wizard with copy files option checked it incorrectly homes paths under Resourse linked resources.

    The work around is to not manually copy project files into WSD and have some of the project in other directories not associated with the CCS define work space directory.

    Example of cmd file being executed by the linker. Good luck :)

    'Building target: qs-bldc.out'

    'Invoking: TMS470 Linker'

    "C:/CCs/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7M3 --code_state=16 --abi=eabi -me -O2 -g --gcc --define=ccs --define=PART_LM3S8971 --diag_warning=225 --gen_func_subsections=on --ual -z --stack_size=4096 -m"qs-bldc_ccs.map" --heap_size=0 -i"C:/CCs/ccsv5/tools/compiler/tms470_4.9.5/lib" -i"C:/CCs/ccsv5/tools/compiler/tms470_4.9.5/include" --reread_libs --warn_sections --rom_model -o "qs-bldc.out"  "./utils/sine.obj" "./utils/lwiplib.obj" "./utils/flash_pb.obj" "./utils/cpu_usage.obj" "./ui_onboard.obj" "./ui_ethernet.obj" "./ui_can.obj" "./ui.obj" "./trapmod.obj" "./startup_ccs.obj" "./speed_sense.obj" "./sinemod.obj" "./pwm_ctrl.obj" "./main.obj" "./hall_ctrl.obj" "./brake.obj" "./adc_ctrl.obj" -l"libc.a" -l"C:/Software/StellarisWare/RDK-BLDC-9017/boards/rdk-bldc/qs-bldc/ccs/../../../../driverlib/ccs-cm3/Debug/driverlib-cm3.lib" "../qs-bldc_ccs.cmd"

    <Linking>

    'Finished building target: qs-bldc.out'

  • Yuriy Sikalov said:

    I added in the project M3 core of processor Concerto file F28M35x_generic_M3_FLASH.cmd.

    File F28M35H52C1.cmd, which creates CCS by default, I deleted it.

    Was there a particular reason for deleting the F28M35H52C1.cmd added by SYSBIOS by default and adding a different one? The errors you are seeing would depend on the linker command file you added and how it is different from the default.

    Yuriy Sikalov said:
    "./configPkg/linker.cmd", line 113: error #10265: no valid memory range(NULL)
       available for placement of ".flashfuncs"
    "./configPkg/linker.cmd", line 113: error #10099-D: run placement fails for
       object ".flashfuncs", size 0x3c (page 0)

    These errors seem to suggest that you have a custom section called .flashfuncs but there is no valid memory range available for its placement. Please check your linker command file to make sure there that .flashfuncs is being allocated to a valid memory region and that there is sufficient space in that region for it to fit.

  • AartiG said:
    Was there a particular reason for deleting the F28M35H52C1.cmd added by SYSBIOS by default and adding a different one? The errors you are seeing would depend on the linker command file you added and how it is different from the default.

    Yes of course, as defined necessary section for the library driver.lib in the file  F28M35x_generic_M3_FLASH.cmd 

    Yuriy

  • Are you able to add your custom section specification to the default linker command file rather than replacing it with a different linker command file? Does that generate an error as well?

    We may need a small reproducible test case to better understand what is happening, but we could probably start with the linker command file and link map file (.map). Could you attach those two files here for us to take a look at?

  • Hi AartiG,

    Sending to you a files with a test project.

    Yuriy

    000_work.zip
  • I can't get the project to build on this test project. Could you please check if you can and let me know the steps you take to import/build as well as what needs to be done to generate the error you initially reported?

    The errors I see look like this (this is only a sub-set of the full list):

    **** Build of configuration Debug for project test ****

    C:\CCStudio_v5.2.1.00018\ccsv5\utils\bin\gmake -k all
    making ../src/sysbios/sysbios.lib ...
    gmake[1]: *** No rule to make target `BIOS.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `hal/Hwi.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `hal/Hwi_stack.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `hal/Hwi_startup.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `hal/Timer.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `knl/Clock.c', needed by `BIOS.obj'.
    gmake[1]: *** No rule to make target `knl/Idle.c', needed by `BIOS.obj'.

  • HI AartiG,

    You are using a version of SYS / BIOS and XDCtool, which is installed by default with CCSv5.2.1.

    I installed a new version of SYS/BIOS 6.33.06.50, XDCtools 3.23.04.60, is that you can not successfully compile.

      The problem is that when you create a project processor memory allocated by default as described in the file F28M35H52C1.cmd, and I need the memory allocation as described in the file F28M35x_generic_M3_FLASH.cmd.

    Simply replace one file to the other generated errors that I described above.

    Yuriy

  • Yuriy; I took a look at both cmd files and they do differ quite much so. Especially in the Flash memory range address.

    The original: "Likely the 0x03c error message the linker is debugger posts" 

    FLASHLOAD (RX)  : origin = 0x0020003C, length = 0x2E00   /* For storing code in Flash to copy to RAM at runtime */

        FLASH (RWX)     : origin = 0x00202E3C, length = 0x7CF14

    Your replacement CMD:

        FLASH_BOOT (RWX): origin = 0x200030,   length = 0x4

        FLASH (RWX)     : origin = 0x200034,   length = 0x7FF9C

    Not only is the memory address different there are quite a few more labels that will cause issues unless a match is found to exist in the library files for the project. Flash memory start and end are typically hardware specific addresses built in when the die of the chip is made.

    You did add and then select the Concerto Processor into CCS from what I think you are attempting to explain - did you also select the matching Concerto  processor you got the CMD file replacement from in the drop down for the project properties.

    BTW: I also see were CCS put the reference to the Linker cmd file on the very same property page.

      

     

  • Yuriy Sikalov said:
    The problem is that when you create a project processor memory allocated by default as described in the file F28M35H52C1.cmd, and I need the memory allocation as described in the file F28M35x_generic_M3_FLASH.cmd.

    I still don't understand the reason why you need to use F28M35x_generic_M3_FLASH.cmd instead of F28M35H52C1.cmd. The default linker command file provided for M3 part of Concerto is F28M35H52C1.cmd and should satisfy most of your needs, but you are free to customize the linker command file to suit the needs of your project.

    I was able to reproduce the error after adding F28M35x_generic_M3_FLASH.cmd in place of F28M35H52C1.cmd. The reason for the error is that the BIOS RTSC package is creating a section named .flashfuncs which it is placing in memory region C03SRAM. You can see this by taking a look at the linker.cmd generated by SYSBIOS (it will be in the \Debug\configPkg directory). A memory region with this name is defined in F28M35H52C1.cmd but not in F28M35x_generic_M3_FLASH.cmd, hence the error.

    The easiest way to fix this would be to modify F28M35x_generic_M3_FLASH.cmd to rename the C0 memory region to C03SRAM and all the section allocations that go to that region as well.

    For example, under MEMORY directive, modify C0 to C03SRAM:

        C03SRAM (RWX)   : origin = 0x20000000, length = 0x2000

    and under SECTIONS directive, change all C0 allocations to C03SRAM:

        .vtable :   >  C03SRAM
        .data   :   >  C2 | C3 // Data
        .bss    :   >  C03SRAM | C1 // Task stack & SYSBIOS
        .sysmem :   >  C03SRAM
        .stack  :   >  C03SRAM      // System stack
        .cio        : > C03SRAM
        .neardata   : > C03SRAM
        .rodata     : > C03SRAM
        .args       : > C03SRAM

  • Hi AartiG,

    AartiG said:
    The easiest way to fix this would be to modify F28M35x_generic_M3_FLASH.cmd to rename the C0 memory region to C03SRAM and all the section allocations that go to that region as well.

    So I did as you say.

    However, in the previous version XDCtools this error was not generated. In my opinion this is a bug of the current version XDCtools.

    AartiG said:
    I still don't understand the reason why you need to use F28M35x_generic_M3_FLASH.cmd instead of F28M35H52C1.cmd. The default linker command file provided for M3 part of Concerto is F28M35H52C1.cmd and should satisfy most of your needs, but you are free to customize the linker command file to suit the needs of your project.

    Because necessary sections for the library driver.lib is defined in the file F28M35x_generic_M3_FLASH.cmd. For library driver.lib not enough sections defined in the file F28M35H52C1.cmd.

    Yuriy.

  • Yuriy Sikalov said:

    However, in the previous version XDCtools this error was not generated. In my opinion this is a bug of the current version XDCtools.

    When building with previous version of XDCtools the section .flashfuncs is not generated, hence there is no error regarding its placement. It looks like this is a new section introduced with the latest XDCtools and the default placement seems to be to a section named C03SRAM.

    I have created a post in the BIOS forum for the experts there to comment further on this behavior and/or if there is a better solution, so please follow their response on that thread.

  • Ok, thank you, AartiG!