Skip to content

New error raised with 1.2.1 while it should not #408

Open
@fpistm

Description

@fpistm

Describe the problem

Wtih 1.2.1 I got this:

Linting platform in STMicroelectronics\hardware\stm32\2.3.0
    ERROR: Missing upload.tool.<protocol_name> property for board ID(s) Nucleo_144, Nucleo_64, Nucleo_32, Disco, Eval,
           STM32MP1, GenF0, GenF1, GenF2, GenF3, GenF4, GenF7, GenG0, GenG4, GenH7, GenL0, GenL1, GenL4, GenL5, GenU5,
           GenWB, GenWL, 3dprinter, BluesW, Elecgator, ESC_board, Garatronic, GenFlight, LoRa, Midatronics
           See: https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration
           (Rule PF016)
    WARNING: Missing upload.maximum_size property for board ID(s) Nucleo_144, Nucleo_64, Nucleo_32, Disco, Eval, STM32MP1,
             GenF0, GenF1, GenF2, GenF3, GenF4, GenF7, GenG0, GenG4, GenH7, GenL0, GenL1, GenL4, GenL5, GenU5, GenWB, GenWL,
             3dprinter, BluesW, Elecgator, ESC_board, Garatronic, GenFlight, LoRa, Midatronics
             See: https://arduino.github.io/arduino-cli/latest/platform-specification/#recipes-to-compute-binary-sketch-size
             (Rule PF018)
    WARNING: Missing upload.maximum_data_size property for board ID(s) Nucleo_144, Nucleo_64, Nucleo_32, Disco, Eval,
             STM32MP1, GenF0, GenF1, GenF2, GenF3, GenF4, GenF7, GenG0, GenG4, GenH7, GenL0, GenL1, GenL4, GenL5, GenU5,
             GenWB, GenWL, 3dprinter, BluesW, Elecgator, ESC_board, Garatronic, GenFlight, LoRa, Midatronics
             See: https://arduino.github.io/arduino-cli/latest/platform-specification/#recipes-to-compute-binary-sketch-size
             (Rule PF020)
    
    Linter results for project: 1 ERRORS, 2 WARNINGS

It seems the linter check only one level in the boards.txt while it should go deeply as those value are well defined for each entries but at sub level (see: https://github.com/stm32duino/Arduino_Core_STM32/blob/main/boards.txt)
Ex:

Nucleo_144.menu.pnum.NUCLEO_F207ZG.upload.maximum_size=1048576
Nucleo_144.menu.pnum.NUCLEO_F207ZG.upload.maximum_data_size=131072

and:
Nucleo_144.menu.upload_method.MassStorage.upload.tool=massStorageCopy

I've made a fix but I think it should be great to handle those case (see stm32duino/Arduino_Core_STM32#1754)

To reproduce

Apply linter 1.21 on core version 2.3.0.

Expected behavior

No errors or warnings with default boards.txt

Arduino Lint version

1.2.1

Operating system

Windows

Operating system version

Win 10 but same on Linux Ubuntu 20.04

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions