Skip to content

Improvement request: add support for burning bootloader #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jantje opened this issue Nov 21, 2016 · 10 comments
Closed

Improvement request: add support for burning bootloader #585

jantje opened this issue Nov 21, 2016 · 10 comments

Comments

@jantje
Copy link
Member

jantje commented Nov 21, 2016

The bootloader burning is the only core functionality Arduino IDE has but Sloeber does not yet have.

@kgyrtkirk
Copy link

yes :) it would be awesome :D
anyway...sloeber is cool as is already...this feature is nowhere a showstopper :)
I'll just workaround this somehow :)

@wimjongman
Copy link
Member

This is needed to change the clock on the ATtiny, my new best friend. Any idea what we need to do here?

@jantje
Copy link
Member Author

jantje commented Feb 9, 2020

@wimjongman
I'm not sure what you are trying to do as there are already attiny packages.
But to add the bootloader is mainly finding the right environment variables to run the right comands in a console.
From what I see you need A.BOOTLOADER.TOOL to get the tool and
and A.TOOLS.[TOOLNAME].BOOTLOADER.PATTERN to get the command
I guess there is more to it but this is a good starting point

@wimjongman
Copy link
Member

wimjongman commented Feb 10, 2020

The clock speed of the ATtiny is factory set to 1MHZ. It can only be changed to 8/16mhz with burn bootloader.

I have used the Arduino IDE to do that and that does the trick but obviously I want Sloeber to do that.

You say it is a good starting point but I have no idea what you are talking about. :)

@jantje
Copy link
Member Author

jantje commented Feb 10, 2020

If you look at project properties->C/C++ variables->environment you will find a lot of environment variables starting with A. and some with JANTJE. and some others not from Sloeber
The A. are "arduino provided variables" these are from the boards.txt and platform.txt capitalized and A. put in front.
There are also some defaults from https://github.com/Sloeber/arduino-eclipse-plugin/tree/master/io.sloeber.core/config
The JANTJE. stuff is created by Sloeber mostly used to redirect.

In the list you should find A.BOOTLOADER.TOOL which below is avrdude
afbeelding

If I look for A.TOOLS.AVRDUDE.BOOTLOADER.PATTERN I get
afbeelding
Which is the command to run on the command line

It would be great if you could use this environment variable in a launch configuration but I havn't figured out a way to do so.

Code wise knowing the project and the environment name Common.getBuildEnvironmentVariable can return you the value

@wimjongman
Copy link
Member

Thanks, that makes a lot of sense.

@jantje
Copy link
Member Author

jantje commented Jul 27, 2021

I opened a issue on CDT to make these environment variables available in the "external tools" https://bugs.eclipse.org/bugs/show_bug.cgi?id=575037
I already implemented the functionality and I ran into a issue arduino/arduino-cli#1368

It seems the bootloader is a 2 step process https://arduino.github.io/arduino-cli/latest/platform-specification/#burn-bootloader
I'm not sure how to deal with that in "external tools"
I guess I should have a look at how to do this in make

@jantje
Copy link
Member Author

jantje commented Aug 11, 2021

The CDT thing is not going to fly so I implemented it in Sloeber #1367
I figured out the Arduino issue. Seems the programmer.txt is needed to burn a bootloader

I'm currently considering adding make targets to the makefile. This will not cater for all boards but it probably will for some. It does solve the 2 step process and will be easier than external tools to configure.

jantje pushed a commit that referenced this issue Aug 18, 2021
jantje pushed a commit that referenced this issue Aug 18, 2021
jantje pushed a commit that referenced this issue Aug 18, 2021
@jantje
Copy link
Member Author

jantje commented Aug 23, 2021

I'm implementing a disconnect from serial port if the build target is listed in a gui manageable list and if the project contains a com port and if the com port is connected in the serial monitor.

jantje pushed a commit that referenced this issue Aug 26, 2021
jantje pushed a commit that referenced this issue Aug 26, 2021
I get an error ion eclipse the class in not on the lib path :-(
jantje pushed a commit that referenced this issue Aug 26, 2021
jantje pushed a commit that referenced this issue Aug 26, 2021
Italian translation is still needed
jantje pushed a commit that referenced this issue Aug 26, 2021
@jantje
Copy link
Member Author

jantje commented Aug 26, 2021

Programming and burning bootloader are added to the arduino menu
afbeelding

This works for me without programmer 😞
Testers please test and report on success failure.
Notice you can make your own "targets" by adding a makefile.init to your project.
You can tell sloeber tell disconnect from serial when building a target by adding the target name to Arduino->preferences->Build targets

afbeelding

@jantje jantje added the Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. label Aug 27, 2021
@jantje jantje changed the title add support for burning bootloader Improvement request: add support for burning bootloader Aug 27, 2021
@jantje jantje added status: fixed in 4.4.1 and removed Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. labels Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants