Topics

Linux build: unsubstantiated error message on upload


Dan Sawyer
 

Sketch uploading is resulting in an error message that is not supported by the data:

Arduino: 1.8.5 (Linux), Board: "Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), Serial, 72Mhz (Normal), Smallest (default)"

Archiving built core (caching) in: /tmp/arduino_cache_906576/core/core_Arduino_STM32_STM32F1_genericSTM32F103C_device_variant_STM32F103CB,upload_method_serialMethod,cpu_speed_speed_72mhz,opt_osstd_cd9ba7d2851dc8d18dce0f7e8fa709da.a
Sketch uses 115160 bytes (87%) of program storage space. Maximum is 131072 bytes.
Global variables use 12448 bytes (60%) of dynamic memory, leaving 8032 bytes for local variables. Maximum is 20480 bytes.
/home/dan/Arduino/hardware/Arduino_STM32/tools/linux/serial_upload: line 2: /home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash: No such file or directory
An error occurred while uploading the sketch

--- yet clearly both the files are present.

ls -altr /home/dan/Arduino/hardware/Arduino_STM32/tools/linux/serial_upload
-rwxr-xr-x. 1 dan dan 90 Aug  8 07:15 /home/dan/Arduino/hardware/Arduino_STM32/tools/linux/serial_upload

ls -altr /home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash
-rwxr-xr-x. 1 dan dan 88981 Aug  8 07:15 /home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash

The cause and solution to this is not obvious. Has anyone seen this?

Thanks, Dan


Khalid Baheyeldin
 

On Tue, Sep 15, 2020 at 10:15 PM, Dan Sawyer wrote:
/home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash: No such file or directory
I have seen this, and know why it happens (sort of).

The correct path should be ../Arduino_STM32/tools/linux64/stm32flash/stm32flash

But I have no idea how to fix it in the deep bowls of Arduino_STM32, so instead, I worked around it.

What I do is install stm32flash

sudo apt install stm32flash

Then manually run the stm32flash using the binary that was just compiled.

Alternatively, use the bld script from the Linux Tools section, and forget the IDE altogether.
Compiles the Blue Pill STM32duino, Blue Pill Arduino_STM32, S6, WeMos and ESP32 SHC.


Dan Sawyer
 

Thanks. That is what I did. I was able to load it manually.

Your description makes sense. I will look into the script and see if it is editable. I will let you know if I am able to fix it.

Dan

On 9/15/20 7:22 PM, Khalid Baheyeldin wrote:
On Tue, Sep 15, 2020 at 10:15 PM, Dan Sawyer wrote:
/home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash: No such file or directory
I have seen this, and know why it happens (sort of).

The correct path should be ../Arduino_STM32/tools/linux64/stm32flash/stm32flash

But I have no idea how to fix it in the deep bowls of Arduino_STM32, so instead, I worked around it.

What I do is install stm32flash

sudo apt install stm32flash

Then manually run the stm32flash using the binary that was just compiled.

Alternatively, use the bld script from the Linux Tools section, and forget the IDE altogether.
Compiles the Blue Pill STM32duino, Blue Pill Arduino_STM32, S6, WeMos and ESP32 SHC.


Dan Sawyer
 

The following seems to work:

cd to the ~/Arduino/hardware/Arduino_STM32/tools/ directory

mv linux to bak.linux.bak

ln -s linux64 linux

Either the script has an error and should be generating a linux64 reference or there is an install script that is not creating links. I haven't tried a full load based on the above, but it got past the error to an expected port error.

I will test it later and let you know if there is a subsequent issue.

Dan

On 9/16/20 2:29 PM, Dan Sawyer wrote:

Thanks. That is what I did. I was able to load it manually.

Your description makes sense. I will look into the script and see if it is editable. I will let you know if I am able to fix it.

Dan

On 9/15/20 7:22 PM, Khalid Baheyeldin wrote:
On Tue, Sep 15, 2020 at 10:15 PM, Dan Sawyer wrote:
/home/dan/Arduino/hardware/Arduino_STM32/tools/linux/stm32flash/stm32flash: No such file or directory
I have seen this, and know why it happens (sort of).

The correct path should be ../Arduino_STM32/tools/linux64/stm32flash/stm32flash

But I have no idea how to fix it in the deep bowls of Arduino_STM32, so instead, I worked around it.

What I do is install stm32flash

sudo apt install stm32flash

Then manually run the stm32flash using the binary that was just compiled.

Alternatively, use the bld script from the Linux Tools section, and forget the IDE altogether.
Compiles the Blue Pill STM32duino, Blue Pill Arduino_STM32, S6, WeMos and ESP32 SHC.


Khalid Baheyeldin
 

I didn't bother debugging it since my bld script handles everything: compile, and flash in one go.
And since I prefer a command line interface for certain tasks, it works quite well
It also has the added benefit that I can avoid the IDE and switching boards, and remembering what options are there for each ... etc.


Helmut Fritz
 

I have often found that when something is ported to/released for 64 bit, the tools are not necessarily modified to use 64 bit instantiations on the host.  It is frustrating to say the least and often leads to custom/personal scripts.


Khalid Baheyeldin
 

On Thu, Sep 17, 2020 at 12:38 PM, Helmut Fritz wrote:
often leads to custom/personal scripts.
And that is not a bad thing. It is actually a good thing, since it allows automation
of certain tasks, reducing the manual steps needed, avoiding a myriad of options
to remember, and so on ...


Helmut Fritz
 

Khalid,
perhaps!  It depends upon ones scripting abilities.  ;)  Unfortunately mine are lacking.  I gravitate more towards hardware and integration rather than software.