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.

ARM-CGT: armcl.exe can not recognize "-" symbol in path

Part Number: ARM-CGT

Hi:

    when I use armcl.exe to link "application\output\davinci-generated\rte.o", it can not recognize "-" symbol in "davinci-generated", so I can't find rte.o, what should I do?

  • Please let me know if surrounding the full path with "quotes" resolves the problem.  If not, I need more details.  Show the full invocation of armcl.  Please copy and paste the text, and do not use a screen shot.   It is likely that command refers to one or more command files.  Please put those files in a zip and attach that to your next post.

    Thanks and regards,

    -George

  • Hi:

       I will try to describe it in as much detail as possible, I will show part of code relevant below, but I can't send complete file to you, because it is in vLinkGen_Template.ld, sorry

    problem description:

        1.vLinkGen_Template.ld is a link file about memory allocation, it is generated by vector. I put some content in it to link, as below:

              .USER_AUTOSAR_CODE_GROUP :
              {
                    C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o (.MSR_CODE)
              } > MSRAM_VAR_INIT_ZERO,
              RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
              RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

         2.then I use armcl to to link vLinkGen_Template.ld, the command is below:

                 ../../../tools/application-build/compiler/ti-cgt-arm_20.2.4.LTS/bin/armcl -z -stack 0x400 -heap 0x10 -e=brsStartupEntry -i ../../../tools/application-build/compiler/ti-cgt-arm_20.2.4.LTS/lib -m StartApplication.map -o StartApplication.out -a --warn_sections --unused_section_elimination=on --cinit_compression=rle --compress_dwarf=on --copy_compression=rle --reread_libs --display_error_number --diag_suppress=10068 ../linker/vLinkGen_Template.ld

          3.finally, after the compilation is complete, the linking process fails,it can't recognize "-", so can't find Com_Lcfg.o

                "../linker/vLinkGen_Template.ld", line 83: error #10008-D: cannot find file  "C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci"
                "../linker/vLinkGen_Template.ld", line 83: error #10032-D: -l must specify a filename
                "../linker/vLinkGen_Template.ld", line 83: error #10008-D: cannot find file  "generated\Com_Lcfg.o"

    questions:

           1.what should I do to let armcl to find the file, or is there any transition symbols I can add to identify "-" symbol(I try "\-",but it can't work)?

           2.if i just write file name in vLinkGen_Template.ld as below, do you know how to fild the file by armcl?

                    .USER_AUTOSAR_CODE_GROUP :
                     {
                             Com_Lcfg.o (.MSR_CODE)
                     } > MSRAM_VAR_INIT_ZERO,
                     RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
                     RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

  • If you can change the linker command file, then change this line ...

          C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o (.MSR_CODE)

    to ...

    "C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE)

    Note the addition of the "quotes".

           2.if i just write file name in vLinkGen_Template.ld as below, do you know how to fild the file by armcl?

    It doesn't work exactly like that.  One possibility that is similar is:  Add this linker option ...

    --search_path="C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated"

    Then write it ...

    --library=Com_Lcfg.o (.MSR_CODE)

    Please let me know if these suggestions resolve the problem.

    Thanks and regards,

    -George

  • Hi:

    1."C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE) , this doesn't work

    2.If write like this:

                    .USER_AUTOSAR_CODE_GROUP :
                     {
                            --library=Com_Lcfg.o (.MSR_CODE)
                     } > MSRAM_VAR_INIT_ZERO,
                     RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
                     RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

          what does --library mean?

  • Hi!

    '"C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE) , this doesn't work'

    It will allow the '-' symbol to be recognized as part of the path -- what error message do you see?

    "what does --library mean?"

    For further reference, this is described in this Linker Command File Primer that may be useful. "The --library= syntax tells the linker this file is not in the current directory, and to look for it in the directories collected in the library search path."

    Note that when using this, you must also use the "--search_path=" option as George indicated in the previous response so that the linker can find the library in the proper location.

  • Hi,

    '"C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE) , this doesn't work,the error log is the same,

                "../linker/vLinkGen_Template.ld", line 83: error #10008-D: cannot find file  "C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci"
                "../linker/vLinkGen_Template.ld", line 83: error #10032-D: -l must specify a filename
                "../linker/vLinkGen_Template.ld", line 83: error #10008-D: cannot find file  "generated\Com_Lcfg.o"

  • Does using the "--library=" option with "--search_path=" enable it to work? If so, go with that.

    Can you post the pertinent section of your linker command file vLinkGen_Template.ld?

  • OK, I will try and tell you the result.

     I had stick some relevent code above, but i can't send the whole  code, sorry

             .USER_AUTOSAR_CODE_GROUP :
              {
                    C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o (.MSR_CODE)
              } > MSRAM_VAR_INIT_ZERO,
              RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
              RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

  • Hi Pengfei - I don't see C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o wrapped in quotation marks as George suggested above.  I want to verify that you attempted doing that and are still seeing the same error. 

    So it would look like this:

             .USER_AUTOSAR_CODE_GROUP :
              {
                    "C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE)
              } > MSRAM_VAR_INIT_ZERO,
              RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
              RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

    Otherwise, I suggest going with the "--library=" with "--search_path=" approach.

  • Hi:

    1.write like this  

              .USER_AUTOSAR_CODE_GROUP :
              {
                    "C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated\Com_Lcfg.o" (.MSR_CODE)
              } > MSRAM_VAR_INIT_ZERO,
              RUN_START(_USER_AUTOSAR_CODE_GROUP_RUN_START),
              RUN_END(_USER_AUTOSAR_CODE_GROUP_RUN_LIMIT) 

         I have done this, it doesn't work , 

    2. i write like this, it doesn't work too

    .MSR_VAR_INIT : ALIGN(4)
      {
        --library=Com_Lcfg.o (.MSR_CODE)
        *ipc_baremetal.aer5f (.data)
        *(CDD_IPC_DATA_INIT_32_SECTION)
        *(.MSR_VAR_FAST_INIT)
        *(.MSR_VAR_INIT)
        . = ALIGN(4);
      } > DDR0_APP, RUN > MSRAM_LOAD_RW

        ../../../tools/application-build/compiler/ti-cgt-arm_20.2.4.LTS/bin/armcl -z -stack 0x400 -heap 0x10 -e=brsStartupEntry -i ../../../tools/application-build/compiler/ti-cgt-arm_20.2.4.LTS/lib -m StartApplication.map -o StartApplication.out -a --warn_sections --unused_section_elimination=on --cinit_compression=rle --compress_dwarf=on --copy_compression=rle --reread_libs --display_error_number --diag_suppress=10068 

       --search_path="C:\Project\TDA4\TDA4Code\application\output\build\obj\output\davinci-generated"  ../linker/vLinkGen_Template.ld

       then it error, the error information is the same :  "../linker/vLinkGen_Template.ld", line 385: error #10008-D: cannot find file "Com_Lcfg.o"

  • OK thanks. So at this point, I'm going to have to echo what George asked for at the beginning and that is to put all of the files referenced by your link-step (Com_Lcfg.o, *ipc_baremetal.aer5f, etc)  in a ZIP file, along with your linker command file, and attach that to your next post. Based on what you've posted, it isn't clear why the options we've suggested do not work for you, so we need to be able to reproduce your environment. The only workaround I can suggest is to avoid using the hyphen in "davinci-generated" in the directory name -- is that possible?

  • Thank you very much!

    1.sorry, I can't send all the code 

    2.not use "-" in path is good to work, I will use this method finally

    3.this issue can be closed, thank you very much