-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation of setting custom board options via FQBN #355
Comments
The thing is that myfirst.ino is not a sketch. The folder myfirst is the sketch and it is the path to that folder that you should specify as the argument to arduino-cli. That might seem silly if all you have in the folder is myfirst.ino, but sketches may consist of multiple files. All source files in the sketch folder are compiled. If you are running the command from inside the sketch folder, you can simply omit the path argument and arduino-cli will automatically assume the current folder is the sketch. Or you can specify the path to the sketch folder if you prefer. I could understand a user of the Arduino IDE assuming that the .ino file should work as the sketch path argument because in the Arduino IDE File > Open does require you to select one of the files of the sketch to open it, rather than the more correct behavior of having you select the sketch folder. To confuse matters more, Even though I think that specifying the path to the sketch file instead of folder is technically wrong, maybe the developers could consider making it so that arduino-cli automagically names the default output filename correctly if the path argument of |
Thanks for the very helpful explanation. That clears that part up for me. I do not know what the upload process is looking for. Adding the debug option to the upload command shows that it is not finding the tool required for Looking at the output from the upload command.... I have looked for a wiki but maybe this project is too new to have all documentation in place. |
I successfully uploaded to my board but it was not straightforward.
and on the CLI was:
I copied the fqbn text from the IDE
I could successfully upload using this command. One other issue I had was that the compile command does not copy the bin file from Is there any documentation available that lets me know how I can do this the correct way. As I said everything works from the IDE so things should be set up correctly. From what I can see there is only the readme file for documentation. |
@noweare1 unfortunately, you're correct: the README is the only source of documentation we have at the moment. I'll put this issue to the attention of the team, in your detailed report I see few major points we absolutely need to discuss and fix because your user experience was terrible and we want it to be the opposite. I'll follow up on this issue as I manage to schedule some work to fix at least some of the problems you encountered, thanks again for your report. |
Probably you don't need all of these parameters in the fqbn
the CLI automatically selects the default value for all of them, maybe you just need one or two to be set specifically for you?
|
This is the minimum upload command I can get to work:
Thanks for hearing me out : ) |
I connected the STM32F407 to the computer first ,then I turned on the arduino 1.8.10,I wrote a short blink program however It will not upload,I than installed st prg ,I tried the same thing and still no upload. The IDE sees the board but there is no port(its greyed out)but at the bottom of the ide it gives the port info PLEASE help or can someone explain what is wrong and how to correct it. |
Related to the this same original issue, I decided to post here to share some partial progress. I am using Ubuntu 18.04. I was trying to use stm32duino and CLI for a blue pill board. Then I tried to use arduino-cli (v0.9.0) with the same application. There were my steps once the sketch is created. Compilation of stm32duino with arduino-cliI managed to compile this app with arduino-cli, following these instructions in To compile the sketch, execute:
Uploading of stm32duino with arduino-cliOnce the sketch is compiled, the expected upload command was:
However, it will cause a error because there is no Blink.STM32.stm32.GenF1.bin in the current folder.
So, there are two alternatives. The first alternative is to find out the place in the /tmp where the project is being built and just copy the bin file
Now, repeat the upload, execute:
and hopefully you will see the LED blinking and no up errors. The issueSo, the issue is the the bin file is not created in the sketch folder for STM devices. Only the elf and hex were created. I believe that by generating the bin file the flow can be smother. |
I have exactly the same issue with the generation of the By removing of the file
The |
Issue raised here arduino/arduino-cli#355 Following the documentation https://arduino.github.io/arduino-cli/platform-specification/#recipes-to-export-compiled-binary Only one recipe.output.tmp_file and recipe.output.save_file should be defined. The ".bin" only should be copied. Now upload with arduino-cli works as "Export compiled Binary" Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Hi, |
I think this issue ended up being about three separate topics:
So I think the issue has mostly been resolved, but I guess we can leave it open as a reminder to improve the documentation of using custom options in the FQBN, since I couldn't find another open issue dedicated to that topic. |
Bug Report
I don't know if this is a bug or I just don't have the upload stuff set up correctly
Current behavior
I am confused about how the
upload
command is supposed to work with my board. I am using an stm32_core developed by ST. For sanity sake everything works fine in the arduino ide. Back to the CLI, I set up the tools as directed in the readme. Using the CLI and being IN the project directory I can compile if only if I include the ino extension. The compiler complains it can not find the file if I do not add the extension. The readme file shows the extension is omitted.When i use the upload command the the uploader can not find the file because it adds the project directory and I am IN the project directory. The error is shown below.
The uploader looks for a file name which is different from what the compiler created. The compiler had added on ".ino" after the file name. The uploader looks
for a file without the extension:
myfirst.STM32.stm32.Nucleo_64.hex vs myfirst.ino.STM32.stm32.Nucleo_64.hex
It was a real task to find the correct
--fqbn
for my board also.One question: Is the CLI use the
.arduino15
settings for the core or am I supposed to use thearduino-cli.yaml
file for setting things up for CLI?Expected behavior
A successful upload
Environment
CLI Version: 0.4.0 Commit: =98b7be9
Ubuntu, x86_64-linux
Additional context
I know this is still a work in progress and I am not being critical just trying to give you some feedback.
I really like the CLI. It will free me up to use my favorite text editor (Geany) which I use for everything.
The text was updated successfully, but these errors were encountered: