Go Down

Topic: How computer reboot arduino leonardo in bootloader mode and other questions (Read 195 times) previous topic - next topic

xload

Hello,

I'm interested in know how the computer reboot an arduino leonardo in bootloaer mode, where is located at core source code.

Best regards and thanks in advance

pert

I'm interested in know how the computer reboot an arduino leonardo in bootloaer mode
It's explained here:
https://www.arduino.cc/en/Main/ArduinoBoardLeonardo
Quote
Automatic (Software) Reset and Bootloader Initiation
Rather than requiring a physical press of the reset button before an upload, the Leonardo is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the Leonardo's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds.
where is located at core source code.
https://github.com/arduino/Arduino/tree/1.8.2/hardware/arduino/avr/bootloaders/caterina

xload

A lot of thanks pert!

I'm trying to make working teensy core and funtions in an Arduino Leonardo clone (a CJMCU Beetle board), all worked fine with a custom boards.txt and platform.txt but I only can reprogram it if I reset it by hand and then It enters in bootloader mode.

Now is time for hard work! make the teensy core reboot in bootloader mode when serial port is opened at 1200 baud and then closed.


xload

I don't know anything about this subject but are you aware of this?:
https://github.com/adafruit/TeeOnArdu
A lot of thanks pert!

Unfortunately TeeOnArdu is not ready to reset with "1200bps touch":
Quote
To upload new sketches you just have to press the reset button each time you hit the upload button. Like in the old days of the first Arduino generations :)
:(

xload

I decided to start with teeny cli loader, because I only need restart in bootloader mode I replaced the main() code with:

Quote
printf("Teensy reboot\n");
   if (soft_reboot()) {
      printf("Soft reboot performed\n");
   }
   else {
      printf("Soft reboot _NOT_ performed\n");
   }
I obtain this answer:
Quote
Teensy reboot
entering soft_reboot
Soft reboot performed
But nothing occurred :(

Go Up