Skip to content

Please harden upload.tool property reading code for boards.txt #1464

Closed
@kenyee

Description

@kenyee

Found out why I was getting a null pointerexception in 1.5 (now a RunnerException w/ the nightlies) when trying to integrate a different board type from 1.0 code:
processing.app.debug.RunnerException
at processing.app.debug.BasicUploader.uploadUsingPreferences(BasicUploader.java:127)
at processing.app.Sketch.upload(Sketch.java:1670)

The boards.txt file was missing some new parameters for 1.5. In particular, if the upload tool entry is not there, you'll get the runnerexception above because it tries using the BasicUploader which is now invalid because you have to use the sam one or the avrdude one:
xxx.upload.tool=avrdude
xxx.bootloader.tool=avrdude

To reproduce, take these lines out for the board you're using and try an upload to it.
It should never happen w/ a correctly specified boards.txt file, but hardening will help if people add a new board and forget all the parameters...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions