Error in building in the Linux version of TrueSTUDIO

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

diamondjimkoehler
Posts: 18
Joined: Fri Mar 10, 2017 5:32 am

Error in building in the Linux version of TrueSTUDIO

Postby diamondjimkoehler » Fri Jul 20, 2018 6:44 pm

Hi,
I am a newbie with TrueSTUDIO for STM32 and am having a problem with the Linux version 9.0.1. On my machine, I run the 64-bit version of Mint 18.3 which is based on Ubuntu 16.04. I have installed TrueSTUDIO for STM32 9.0.1 and STM32CubeMX on this machine and also on a Windows 7 virtual machine (VirtualBox) running on the same machine. I followed a tutorial on the Web showing how to use the USB port as a Communication Device on the STM32F103 "Blue Pill" board. I did it on both the Windows virtual machine and on the Linux machine. The Windows version compiles and links correctly as far as I can tell (I am waiting to get an actual BluePill from China) but on the Linux version, it comes up with an error when I try to build the project; the text below appears in the Console window:

Generate build reports...
Print size information
text data bss dec hex filename
20680 360 6296 27336 6ac8 USB_Test.elf
Print size information done
Generate listing file
Output sent to: USB_Test.list
Generate listing file done
Generate build reports done
arm-atollic-eabi-objcopy.exe -O ihex USB_Test.elf USB_Test.hex
Cannot run program "arm-atollic-eabi-objcopy.exe": Unknown reason

Error: Program "arm-atollic-eabi-objcopy.exe" not found in PATH
PATH=[/opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.0.1/ARMTools/bin:/opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.0.1/Tools:/home/jim/bin:/home/jim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games]

I have repeated this whole business several times and am sure that I went through the configuration in STM32MX the same way for for the Linux and the Windows versions. Does anyone know what is wrong?

reference
Posts: 9
Joined: Thu Jul 26, 2018 7:52 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby reference » Thu Jul 26, 2018 8:19 am

Well it's trying to execute arm-atollic-eabi-objcopy.exe and can't find it. The ".exe" suffix is a Windows thing, it is possible this is a TrueStudio bug which doesn't check in what platform it's running on (in this particular case) and trying to execute "arm-atollic-eabi-objcopy.exe" instead of "arm-atollic-eabi-objcopy".

I would go find the "arm-atollic-eabi-objcopy" binary in /opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.0.1/ARMTools/bin or maybe in /opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.0.1/Tools and create a soft link with ".exe" prefix next to it:

$ sudo ln -s arm-atollic-eabi-objcopy arm-atollic-eabi-objcopy.exe

diamondjimkoehler
Posts: 18
Joined: Fri Mar 10, 2017 5:32 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby diamondjimkoehler » Thu Jul 26, 2018 2:50 pm

The arm-atollic-eabi-XXX files are in the /bin folder where I did exactly as you suggested and, mirabile dictu, that solved the problem and it now builds without error! Thank you very much!
Jim

foobar
Posts: 2
Joined: Mon Jun 25, 2018 2:38 pm

Re: Error in building in the Linux version of TrueSTUDIO

Postby foobar » Mon Aug 27, 2018 4:04 pm

Another way is to remove the .exe part from the <Project properties>/"C/C++ Build"/Settings/Build steps/Post-build steps/Command in both the Debug and Release Configurations.

diamondjimkoehler
Posts: 18
Joined: Fri Mar 10, 2017 5:32 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby diamondjimkoehler » Mon Aug 27, 2018 11:03 pm

Thanks for the comment. I did delete the .exe part of the line as you suggested but it is then necessary to replace the deletion with arm-atollic-eabi-objcopy.

mehrob
Posts: 1
Joined: Thu Sep 06, 2018 8:58 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby mehrob » Thu Sep 06, 2018 9:00 am

Thank you for the solution!

In my case this problem appeared after updating CubeMX to version 4.26.1 so I would assume the bug is in CubeMX software rather than TrueStudio.

Markus Girdland
Posts: 149
Joined: Thu May 11, 2017 11:27 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby Markus Girdland » Tue Sep 11, 2018 10:26 am

I tried replicating this first by a fresh install of TrueSTUDIO, where I did not receive the same error. And then with a fresh install of CubeMX (which made it 4.27 version) but I never got the same error.

I've heard about this error from another source as well, though, where the solution was the same. Is there some configuration you make in CubeMX or some other factor you can think of to be able to reproduce this?

diamondjimkoehler
Posts: 18
Joined: Fri Mar 10, 2017 5:32 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby diamondjimkoehler » Thu Sep 20, 2018 6:27 pm

I reinstalled TrueStudio this morning with build version 9.0.1, build id 20180420-1214, and I still get the same error. I have not rebuilt STM32CubeMX.

diamondjimkoehler
Posts: 18
Joined: Fri Mar 10, 2017 5:32 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby diamondjimkoehler » Thu Sep 20, 2018 6:34 pm

Oops ... I then "upgraded" STM32CubeMX, redid the code generation for an existing project and the problem went away. It seems the error was in STM32CubeMX as suggested.

Markus Girdland
Posts: 149
Joined: Thu May 11, 2017 11:27 am

Re: Error in building in the Linux version of TrueSTUDIO

Postby Markus Girdland » Fri Sep 21, 2018 6:59 am

When you upgraded the STM32CubeMX, what version did you get?


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 3 guests