Go Down

Topic: Custom board - using Upload feature (Read 178 times) previous topic - next topic

khariya

Hi,

I'm trying to add support for a new ARM-based Arduino board and it looks like I'm missing some configuration to use the "Upload" feature.

My board is capable of programming itself using the bootloader or use an external programmer.
Currently, I'm focusing on uploading using the bootloader.

Here's a snippet from board.txt, and platform.txt in order:

Code: [Select]

myboard.name=DISPLAY_BOARD_NAME(Native USB Port)
myboard.upload.tool=mytool


Code: [Select]

tools.mytool.path={runtime.tools.mytool.path}
tools.mytool.cmd=mytool_filename

tools.mytool.upload.params.verbose=-v
tools.mytool.upload.params.quiet=
tools.mytool.upload.pattern="{path}/{cmd}" arg1 arg2 {upload.verbose}



From Arduino IDE, I pick the right board, click "Upload" and I see the error:

Code: [Select]

java.lang.NullPointerException
 at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:314)
 at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:89)
 at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
 at processing.app.SketchController.upload(SketchController.java:713)
 at processing.app.SketchController.exportApplet(SketchController.java:686)
 at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
 at java.lang.Thread.run(Thread.java:748)




It seems to me like the IDE is trying to use a programmer but doesn't find any and complains about it.

Any hints are appreciated. Thanks in advance!

pert

When you don't define an upload.protocol property for the board, it causes the Arduino IDE's "Upload" to do the same thing as Sketch > Upload Using Programmer, thus the error (likely the programmer you have selected from the Tools > Programmer menu is not compatible with the board you have selected).

khariya

Thank you so much pert! I really appreciate it. :)

Adding the upload.protocol configuration did the job.

Go Up