Page 1 of 2

Error in building in the Linux version of TrueSTUDIO

Posted: Fri Jul 20, 2018 6:44 pm
by diamondjimkoehler
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?

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Thu Jul 26, 2018 8:19 am
by reference
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

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Thu Jul 26, 2018 2:50 pm
by diamondjimkoehler
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

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Mon Aug 27, 2018 4:04 pm
by foobar
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.

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Mon Aug 27, 2018 11:03 pm
by diamondjimkoehler
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.

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Thu Sep 06, 2018 9:00 am
by mehrob
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.

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Tue Sep 11, 2018 10:26 am
by Markus Girdland
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?

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Thu Sep 20, 2018 6:27 pm
by diamondjimkoehler
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.

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Thu Sep 20, 2018 6:34 pm
by diamondjimkoehler
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.

Re: Error in building in the Linux version of TrueSTUDIO

Posted: Fri Sep 21, 2018 6:59 am
by Markus Girdland
When you upgraded the STM32CubeMX, what version did you get?