cancel
Showing results for 
Search instead for 
Did you mean: 

Error "mode armelf" on GNU Tools for STM32 9-2020-q2-update

marbel
Associate II

I have gotten a new error on a 1.5.0 that i have to seen anyware else before.

Fresh install of 1.5.0

Migrate 1.4.0 project

Open project properties

Open Toolchain manager

Installl gnu tools for stm32 9-2020-q2-update

restart cubeide

Switch to fixed selected toolchain in settings and select the newly installed one

Apply and build

Get one error "mode armelf"

If i switch back to the other installed toolchain, it works fine.

(I do also btw get a waring about having assert redefined, but i hope that these issues are unrelated)

Best regards

Martin

1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

Hi Martin,

There is no problem with the toolchain itself. It just seems to be a change with respect to log output when building with verbose flag.

gcc-7

==================================================
attempt to open c:/st/stm32cubeide_1.5.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o succeeded

gcc-9

==================================================
c:\st\stm32cubeide_1.5.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: mode armelf
attempt to open c:/st/stm32cubeide_1.5.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crti.o succeeded

With gcc.9 you get an additional log output (with verbose), see line 2 above. Linker is called in mode armelf. Nothing wrong here...

So why do you get an error in the "Problems view" and why is the line highlighted as red in the Console view?

This is because of the console error parser having a regexp that is not explicit enough.

So, if you want to get rid of the error you have two options:

  • Turn off verbose
  • Or ignore this console output pattern with a new error parser pattern that takes priority
    • Window --> Preferences --> C/C++ --> Build --> Settings --> Error Parsers --> GNU Linker error parser
      • Find the pattern which is "Error":"(.*[/\\])?ld(\.exe)?: (.*)". Copy it.
      • Add a new pattern Set Severity=Ignore. Paste the above pattern and then modify like this "(.*[/\\])?ld(\.exe)?: mode armelf"
      • On the new pattern click Move up so that it has higher rank to match instead of the other error.
      • Apply and Close
    • Re-build - done!

Hope that solves the issue? Will fix for next version. Sharing the work-around here in case other users find the same issue.

Kind regards, Mattias

View solution in original post

6 REPLIES 6
mattias norlander
ST Employee

Hi,

We have not seen this issue before.

  • Do you have a project we could analyze where this is reproducible?
  • Which OS platform are you using?

Kind regards, Mattias

marbel
Associate II

Im on windows 10 on a x64 multicore.

Ill see if i can strip down the code tomorrow,

// Martin

I have sent you a DM

// Martin

mattias norlander
ST Employee

Thanks - received the DM including the zip-file.

I can reproduce it on at least one win10 machine... Will get back with more info.

mattias norlander
ST Employee

Hi Martin,

There is no problem with the toolchain itself. It just seems to be a change with respect to log output when building with verbose flag.

gcc-7

==================================================
attempt to open c:/st/stm32cubeide_1.5.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o succeeded

gcc-9

==================================================
c:\st\stm32cubeide_1.5.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: mode armelf
attempt to open c:/st/stm32cubeide_1.5.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7e-m+fp/hard/crti.o succeeded

With gcc.9 you get an additional log output (with verbose), see line 2 above. Linker is called in mode armelf. Nothing wrong here...

So why do you get an error in the "Problems view" and why is the line highlighted as red in the Console view?

This is because of the console error parser having a regexp that is not explicit enough.

So, if you want to get rid of the error you have two options:

  • Turn off verbose
  • Or ignore this console output pattern with a new error parser pattern that takes priority
    • Window --> Preferences --> C/C++ --> Build --> Settings --> Error Parsers --> GNU Linker error parser
      • Find the pattern which is "Error":"(.*[/\\])?ld(\.exe)?: (.*)". Copy it.
      • Add a new pattern Set Severity=Ignore. Paste the above pattern and then modify like this "(.*[/\\])?ld(\.exe)?: mode armelf"
      • On the new pattern click Move up so that it has higher rank to match instead of the other error.
      • Apply and Close
    • Re-build - done!

Hope that solves the issue? Will fix for next version. Sharing the work-around here in case other users find the same issue.

Kind regards, Mattias

SMAKR.11
Associate

This "linker error" wasted 3 of hours of my time!

This is issue still exists in version 1.6.1. Maybe it should be best for all of us to be included in next version.

Thank you so much Mattias.