Not sure if should be posted here.
Using IDE 1.8.16 all compiles and uploads fine.
Using IDE 2 Beta 12 i get the following error when trying to upload to STM32F4 via STlink
I have defined Generic STM32F4 series at COM5 which is the STLink port.
Tools Upload Method STMCubeProgrammer (SWD)
Upload error: Error: 9 FAILED_PRECONDITION: Property 'upload.tool.serial' is undefined
Environment Win 10 Pro 64bit, Genuine STLink 3, Black Pill STM32F411CE
Any ideas please imk
PS Upload code size is 106116 IDE 1.8.16 and 36168 for IDE 2 Beta 12. With same Compile Option
Hi @imk123. This is caused by a known bug in the Arduino CLI tool used by the Arduino IDE to handle the non-GUI tasks. Arduino CLI is actually used by both Arduino IDE 1.8.16 and 2.x, but Arduino IDE 1.8.16 is using an older version of Arduino CLI from before the bug was introduced:
The real fix will need to be made inside the Arduino CLI code base. However, there is a workaround for the bug. It's a bit advanced, but if you are interested I'll be happy to provide instructions.
hello sterretje sorry for posting wrong place i thought it might be and thanks for moving.
ptillisch, many thanks for the reply, i though it maybe a bug in v2 as 1.8.16 was fine and v2 still being beta i am happy to make this minor contribution toward perfection
As for the fix i would be most interest in having a look at as i like V2 also would be interesting to see if the smaller code generated by V2 works
Again many thanks all imk
hello ptillisch and many thanks for the info, sorry for late replay but plumber here and now big clean up job. I'll try to find time to test it this evening, but more likely be tomorrow as this place needs lot of sorting to return life to normal.
Will let you know how i get on and many thanks, lots of little steps get big jobs done. imk
The first component of that property name ("GenF4" in the example) is the board ID, which is shown in this part of the verbose compilation output:
Using board 'GenF4' from platform in folder: C:\Users\<user name>\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.1.0
Once you have determined the board ID of the board you are using, find its definition in the boards.txt file. That will be the set of property=key format lines that are prefixed with the board ID.
Now you need to add an upload.tool.default property that matches the equivalent upload.tool property. You could do this by determining the option ID ("swdMethod" in the example) of the Tools > Upload Method IDE setting you are using, or you can just add equivalent upload.tool.default properties for every upload.tool property.
I'll provide a hypothetical scenario:
If your board ID was foo and your Upload Method option ID was bar, you would need to find a property in boards.txt that looks like this:
(where baz is the name of the upload tool this hypothetical board is using)
You would then add a new line to the file based on that property, which would look like this:
Is there a similar solution for the Maple Mini (with STM32F1xx)?
The upload with the old IDE (1.8.16) takes ...
... \ AppData \ Local \ Arduino15 \ packages \ STMicroelectronics \ tools \ STM32Tools \ 2.1.0 / win / maple_upload.bat COM12 1 1EAF: 0003
with the bin file as an additional parameter.
The upload with the new IDE does not work.
I have interpreted your statement like this and inserted the following line in board.txt:
It doesn't work! the error message is still
Upload error: Error: 9 FAILED_PRECONDITION: Property 'upload.tool.' is undefined"
Don't mess with any other part of the property definition. Copy it exactly and add ".default". That is all.
Did you remember to do these steps?
The platform configuration is only loaded on the startup of the Arduino IDE, so any changes you make to boards.txt while the IDE is running will not be recognized by the IDE until after you restart the IDE.
Thanks so much for your kind words @imk123. Best to you from the Arduino Tooling Team as well.
The reports of the slow operations often turn out to be caused by a severe throughput bottleneck in the Arduino IDE's "Output" view. The text is printed very slowly, so when you have a lot of output you will find that the compilation and upload finish long before the IDE finally gets through printing it all to the Output view. That gives the impression that the compilation/upload process is going slowly.
The Serial Monitor also had this problem in earlier IDE versions but the developers have improved the performance. So I hope they will do the same for the Output as well in an upcoming release.