#85 archver not defined ?

Next release
closed
None
5
2015-02-28
2014-02-15
diabolo38
No

Versions
Eclipse Kepler SR1
Eclipse IDE for C/C++ Developers 2.0.1.20130919-0803 epp.package.cpp null
GNU ARM C/C++ Development Support (End of life) 0.5.5.201310221100 org.eclipse.cdt.cross.arm.gnu.feature.group SourceForge Project
GNU ARM C/C++ Cross Compiler Support 1.8.1.201402140758 ilg.gnuarmeclipse.managedbuild.cross.feature.group Liviu Ionescu
Win7
GNU Tools ARM Embedded\4.8 2013q4

I started from empty CrossArmGcc project, added my files (stm32f4 discovery utility lib) , build => all fine
i then decided to make a library out of the project so i changed the build artifact from executable to static library
It fail to build, error message show clearly that archiver is not defined

"arm-none-eabi- -r libSTM32F4-Discovery.a stm32f4_discovery_lis302dl.o stm32f4_discovery_audio_codec.o stm32f4_discovery.o
Cannot run program "arm-none-eabi-": Launching failed
Error: Program "arm-none-eabi-" not found in PATH"

Obviously putting ar in project->prorerties->C/C++ Build->Setting-> toolchains->Archiver edit fix it .

Setting visible as executable
(https://drive.google.com/file/d/0B82iqg_RUSVlRW0yMmlRTzJrSjQ/edit?usp=sharing
setting as library
https://drive.google.com/file/d/0B82iqg_RUSVlZG1naFhJWTVzVEE/edit?usp=sharing

I Tried starting from default stm32f4 std periph project (to build a lib) and find the same issue

I've change builder to "CDT internal" instead of default gnu make so don't know if that can arm/conflict or if it's project template that is missing cross_ar definition ?

Discussion

  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Liviu Ionescu (ilg)

    will investigate

     
  • Liviu Ionescu (ilg)

    a new beta version is available from

    http://gnuarmeclipse.sourceforge.net/updates-test

    could you try it?

    it still has an update problem, i.e. after you change the artefact type, the Toolchains tab still shows the old configuration, but if you close it and reopen, it should be ok.

     
  • diabolo38

    diabolo38 - 2014-02-18

    still the same archiver is empty after artificats is changed

     
  • Liviu Ionescu (ilg)

    did you create a new project? the fix affects only new projects.

     
  • diabolo38

    diabolo38 - 2014-02-18

    yes tried several time with different builder (gnu make, cdt internal)
    I'm actualy settinp up things to test the same under linux.

     
  • Liviu Ionescu (ilg)

    you are missing something. do the following:

    • create a new workspace
    • create a new executable project (for example with the F4 template)
    • build the project; it results an elf
    • change artefact type to lib
    • without changing any tabs, views, etc, click OK
    • build the new project; it results a lib
     
  • diabolo38

    diabolo38 - 2014-02-18

    even in a fresh new workspace .. same?

    22:28:59 * Incremental Build of configuration Debug for project NewTest *
    make all
    'Building target: libNewTest.a'
    'Invoking: Cross ARM GNU Archiver'
    arm-none-eabi- -r "libNewTest.a" ./src/main.o ./libs/misc/src/_sbrk.o ./libs/misc/src/src/startup_cm.o ./libs/CMSIS/src/startup_stm32f4xx.o ./libs/CMSIS/src/system_stm32f4xx.o ./libs/CMSIS/src/vectors_stm32f4xx.o
    'arm-none-eabi-' "n'est pas reconnu en tant que commande interne ... " => not reconized as as a internal command ....

    tested re-starting from fresh new eclipse ... same

    Is the test zip containing the fix ?

     
  • Liviu Ionescu (ilg)

    it looks like either you did not perform the update (you need to select install new software from the updates-test url), or you are systematically doing something wrong.

    the plug-in should be

    ilg.gnuarmeclipse.managedbuild.cross_1.8.2.201402181437.jar

    if it is not, perform the update.

     
  • Liviu Ionescu (ilg)

    I fixed the GUI update.

    the new version is available from updates-test.

    please give it a try and let me know if it works for you.

     
  • diabolo38

    diabolo38 - 2014-02-19

    The error was to peak the plugin from wrong site "update" instead of "update-test"
    So "ar" is fixed also i confirm tool chains tab get updated without re-opening

    I had some issue on my second system due to several arm tool-chains installed.
    It seam for new project you always peak 1st arm-none-eabi-gcc on the path even if a toolchains path was provided during project creation. yet another issue ? should i enter a ticket for it ?

    Do you have some suggestion how to manage multi toolhcains? I was thinking in starting eclipse from a batch that will update path first a bit like suggested here
    http://superuser.com/questions/424001/launch-windows-program-with-custom-environment-variable

     
  • Liviu Ionescu (ilg)

    It seam for new project you always peak 1st arm-none-eabi-gcc on the path

    hmmm... please read the documentation pages carefully and you'll find the answer to how to handle the toolchain path.

     
  • diabolo38

    diabolo38 - 2014-02-20

    i believe i did what the docs says
    i have set the global path in the project toolchain setting page and global path check box enabled
    i also added a pre build step that invoke the exact same gcc

    ${cross_prefix}${cross_c}${cross_suffix} --version

    build give

    16:07:28 * Incremental Build of configuration Debug for project F4WithPath *
    make pre-build main-build
    arm-none-eabi-gcc --version
    arm-none-eabi-gcc (Sourcery G++ Lite 2011.03-42) 4.5.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    'Building file: ../src/main.c'
    'Invoking: Cross ARM C Compiler'
    arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -DSTM32F40_41xxx -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -DDEBUG -I"../include" -I"../libs/CMSIS/include" -I"../libs/StdPeriph/include" -I"../libs/misc/include" -std=gnu11 -MMD -MP -MF"src/main.d" -MT"src/main.d" -c -o "src/main.o" "../src/main.c"
    cc1.exe: error: unrecognized command line option "-std=gnu11"

    So the gcc invoked is the one for fx3 arm926 an older code sourcery.
    it is not the one i set the path too and that is that is

    C:\Windows\system32>"C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\bi
    n\"arm-none-eabi-gcc --version
    arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20131129 (releas
    e) [ARM/embedded-4_8-branch revision 205641]
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    In the doc i read do not to add toolchain path to the system path
    that is what done on that system by an installer (FX3 SDK) without any notification.
    An in such case the global path seam to be ignored what is quite confusing.

    Not a big deal it was fast/easy to spot and solve ;)

     
    • Liviu Ionescu (ilg)

      arm-none-eabi-gcc (Sourcery G++ Lite 2011.03-42) 4.5.2
      cc1.exe: error: unrecognized command line option "-std=gnu11"

      gcc 4.5.2 is prehistoric, it does not know C11, if you want to use it you have to update the compile options for it.

      In the doc i read do not to add toolchain path to the system path
      that is what done on that system by an installer (FX3 SDK) without any notification.

      if the installer did it without notification, you have to manually remove it from the system path.

      in almost every documentation page it is expressly stated not to use the system path.

      An in such case the global path seam to be ignored what is quite confusing.

      can you check the dynamically generated PATH in the project C/C++ Build -> Environment? do you see the 4.8 path prepended to the system path? does it point to the 4.8.../bin folder?

       
  • diabolo38

    diabolo38 - 2014-02-21

    environment path show 4.8 Prepended
    In same dialog below is see the "Append variables to native enviroment" and "replace native just below"

    i tried both same

    An invalid command on pre buil give

    Error: Program "xxx" not found in PATH
    PATH=[C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\arm-none-eabi\bin;C:\Program Files\Common Files ....
    So it seam eclipse PATH is ok but not the oen use for final command execution ?
    Very strange anwyay that a lot of effort i'll modify the system path or with some start batch

     
    • Liviu Ionescu (ilg)

      environment path show 4.8 Prepended

      then everything should be fine

      with so many tests, you probably messed something.

      I suggest you start with a fresh workspace, no longer use the old Sourcery toolchain, create a test project using one of the STM32Fx templates, configure toolchain path properly and you'll see the build finish without problems.

      then bring your own projects in and configure them similarly.

       
  • diabolo38

    diabolo38 - 2014-02-21

    yes i miss the correct path
    C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\arm-none-eabi\bin

    It started to work after i removed the over gcc from path and change it to
    C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\bin

    Maybe to obvious to be spoted

     
  • Liviu Ionescu (ilg)

    ok, great!

    probably reading the documentation more carefully would have saved both of us a lot of time.

    can we close this ticket?

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks