GithubHelp home page GithubHelp logo

lowpowerlab / dualoptiboot Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 49.0 70 KB

Custom Optiboot to add wireless programming capability to Moteino

License: GNU General Public License v3.0

C 74.59% Makefile 25.41%

dualoptiboot's People

Contributors

lowpowerlab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dualoptiboot's Issues

SPI hardware enable

I just encountered a bug on a project that I traced to DualOptiboot.

The issue was that raw writes to the SPI pins (SK, MO, MI) were not working as expected in the main code. This only occurred on firmware reloads, not during normal power ons making it a particularly devious bug.

I think the issue is that in some situations DualOptiboot exits after loading new firmware but does not disable the SPI pins.

I fixed the problems by adding this line to my code. Perhaps you should check the codepaths and make sure this is done before the bootloader exits.

SPCR &= ~_BV(SPE);

WDRF bit is not cleared when the watchdog is turned off

Hi!

While troubleshooting some reset loops occurring when doing soft restarts, I noticed that WDRF is not cleared when turning off the watchdog. WDE is always set when WDRF is set causing a reset loop. Clearing it fixed my problem.

Many thanks for the great code!

void watchdogConfig(uint8_t x) {
  if (x == WATCHDOG_OFF)
	MCUSR &= ~(_BV(WDRF));
  WDTCSR = _BV(WDCE) | _BV(WDE);
  WDTCSR = x;
}

SAMD21 Support

Does this support the SAMD21?

This line suggests that it doesn't, but I've read that the Moteino M0 supports OTA updating?

Thanks!

Image size is 2 bytes but should be 4 bytes

The README refers to the image size as a 4-byte value. However, it is implemented in Optiboot.c as a 2-byte value. This means that images can be no larger than 64KiB, which is smaller than the 128KiB program memory of a MoteinoMEGA. In order to support larger programs, at least one more image size byte should be added.

DualOptiboot fails on arduino pro mini 8 MHz

I burned the Dualoptiboot_v5.0_atmega328_8mhz_57600baud_BlinkD9.hex to an Arduino pro mini (8MHz) using Sparkfun's pocket AVR programmer with AVRDude.

I changed the fuse values according to this diagram:
https://www.flickr.com/photos/15304611@N03/10585364014

Then I tried to program the board within Arduino IDE version 1.8.13, using an FTDI USB-to-Serial adaptor, with the Blink program.

Arduino terminal gets stuck at the synchronization stage. It seems that the STK-500 emulator cannot communicate with the board.

Am I doing something wrong? Is there any solution to this problem?

Thank you very much!

Header description of size bytes

The header bytes are described as:

"FLXIMG:9999:XXXXXXXXXXX where: ... -'9999' are 4 size bytes indicating how long the new flash image is (how many bytes to read)"

Should these four size bytes be in big or little endian format? Neither of them seem to work on my setup, so I assume that I'm doing something else wrong, but I would like to eliminate this as an issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.