Skip to content

stm32: Error during Upload: Property 'upload.tool.serial' is undefined #1444

Closed
@cmaglie

Description

@cmaglie

Originally posted by @matthijskooijman in #1333 (comment)

I noticed a regression that I expect is caused by this PR. When using arduino-cli from git now, uploads using (our slightly customized version of) the STM32 core fail with:

Error during Upload: Property 'upload.tool.serial' is undefined

The board in question indeed does not define upload.tool.serial, but still uses the pre-pluggable syntax of defining upload.tool, which should be translated to upload.tool.default by convertUploadToolsToPluggableDiscovery(). However, this core does not define upload.tool on the board directly, but defines it in a board menu: https://github.com/stm32duino/Arduino_Core_STM32/blob/974b35690cbf4680ce5746c61c69fb20935bae2f/boards.txt#L522

To reproduce:

$ arduino-cli compile --fqbn STMicroelectronics:stm32:Nucleo_32:pnum=NUCLEO_F031K6,upload_method=serialMethod --upload --port /dev/ttyACM0 
Sketch uses 7612 bytes (23%) of program storage space. Maximum is 32768 bytes.
Global variables use 828 bytes (20%) of dynamic memory, leaving 3268 bytes for local variables. Maximum is 4096 bytes.
Error during Upload: Property 'upload.tool.serial' is undefined

I guess this is fairly easy to fix in the core, though (just define both upload.tool.default (or upload.tool.<protocol>) in addition to the legacy upload.tool, but it might be useful to fix compatibility here too. An obvious fix would be to implement the fallback when actually doing the upload, rather than when loading the boards).

@fpistm, you might find this interesting too :-)

Activity

self-assigned this
on Sep 10, 2021
fpistm

fpistm commented on Sep 10, 2021

@fpistm
Contributor

Thanks @matthijskooijman and @cmaglie
Let me know if I need to update the core.

maxdignan

maxdignan commented on Oct 13, 2021

@maxdignan

I guess this is fairly easy to fix in the core, though (just define both upload.tool.default (or upload.tool.<protocol>) in addition to the legacy upload.tool

@cmaglie @fpistm Can either of you help me figure out how to edit this? I'm struggling at finding the right files to edit. Thanks!

What is editing core? And what should I define those values as (eg: what should I set upload.tool.default to)?

per1234

per1234 commented on Oct 13, 2021

@per1234
Contributor

@maxdignan we should restrict the discussion here to the Arduino CLI code base. Please post support questions to the Arduino forum:
https://forum.arduino.cc/

I'm sure we'll be able to help you out over there.

24 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @cmaglie@fstasi@ubidefeo@silvanocerza@AlbyIanna

    Issue actions

      stm32: Error during Upload: Property 'upload.tool.serial' is undefined · Issue #1444 · arduino/arduino-cli