Hi,
I've tested compilation and upload with Arduino IDE, but when I use arduino-cli and want to upload thanks to "upload_method=MassStorage" argument I have the message "File not found - tmp.STM32.stm32.Nucleo_64.bin".
In 'tmp' directory I don't have the bin file, I thought it was fixed.
Do you have any idea to help me ?
Many thanks.
[arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
This is a known issue which is fixed in the master and will be available in the 1.9.0.
https://github.com/stm32duino/Arduino_C ... /pull/1018
Mainly this commit:
https://github.com/stm32duino/Arduino_C ... 436e13215d
https://github.com/stm32duino/Arduino_C ... /pull/1018
Mainly this commit:
https://github.com/stm32duino/Arduino_C ... 436e13215d
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
Yes, I saw it, thanks for answering.
But how can I update ? Wait for release 1.9.0 ?
But how can I update ? Wait for release 1.9.0 ?
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
Wait the 1.9.0 or simply update your platform.txt in your installation.
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
Hi again,
I tried but when I change platform.txt with the latest version, I cannot compile anymore:
sh: can't open 'Y:\...\packages\STM32\hardware\stm32\1.8.0\system/extras/prebuild.sh': No such file or directory Error during build: exit status 2
So upload is impossible of course.
Is there another file to change?
Many thanks.
I tried but when I change platform.txt with the latest version, I cannot compile anymore:
sh: can't open 'Y:\...\packages\STM32\hardware\stm32\1.8.0\system/extras/prebuild.sh': No such file or directory Error during build: exit status 2
So upload is impossible of course.
Is there another file to change?
Many thanks.
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
In fact you should not copy the entire file, only to change the line like it is done in the commit I gave you:
Code: Select all
@@ -133,16 +133,14 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.f
## Create output (.bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
- ## Save bin
- recipe.output.tmp_file={build.project_name}.bin
-recipe.output.save_file={build.project_name}.{build.variant}.bin
-
## Create output (.hex file)
recipe.objcopy.hex.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
- ## Save hex
- recipe.output.tmp_file={build.project_name}.hex
- recipe.output.save_file={build.project_name}.{build.variant}.hex
+ build.preferred_out_format=bin
+
+ ## Save binary
+ recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
+ recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
Re: [arduino-cli] upload_method=MassStorage does not work for NucleoL476RG
Ok, thanks, now it works! Well done.