1
0
mirror of https://github.com/Optiboot/optiboot.git synced 2025-07-31 07:44:19 +03:00
Commit Graph

270 Commits

Author SHA1 Message Date
85c26e8a5a Fix Markdown link 2020-04-08 16:25:07 +02:00
a3470cc0c5 Merge pull request #281 from inajob/osccal
change OSCCAL in bootloader
(manually, via command-line constant definition.)
Seems harmless enough; doesn't add any code unless you actually use it.
2020-03-15 01:00:14 -07:00
4e55b23002 change OSCCAL in bootloader 2020-03-14 10:55:33 +09:00
1810af8050 Better error handling for bad UARTTX settings.
Update copyright and license pointer.
2020-01-09 02:06:29 -08:00
eac5d189a4 Additional make targets for generic ATmega% and ATtiny%.
Also "make version" to report various tool and source versions.
Omit the application section from the final binary/hex file. (and explain why!)
2020-01-09 02:01:52 -08:00
4a5c0b09ba add some documentation, especially: something on compiling optiboot_x 2020-01-09 01:59:48 -08:00
d0cb6654f9 Add clarifying text and "Bootloader Exception" to license. 2020-01-06 22:43:17 -08:00
a2ac10d32d Merge branch 'master' of https://github.com/Optiboot/optiboot 2019-11-15 20:14:40 -08:00
baaa0b0504 Fix some link formats. 2019-11-15 20:12:54 -08:00
82cb98666c Merge pull request #277 from thisiskeithb/pr_add_license
Add LICENSE
2019-10-25 14:07:14 -07:00
1204b8dfc8 Change to GPL V2 License 2019-10-25 04:05:48 -07:00
a95d26fb41 Add LICENSE
Optiboot is already licensed under the GNU GPL, so I added the LICENSE file to make it easier to identify & read without digging through code.
2019-10-24 20:00:28 -07:00
1b8e4bce09 Always write PMUX register, even if the pin selection is the default. This may solve some problems if a new bootloader is run without a reset, somehow.
Also, it's a bad sign if your own code lokos confusing after only a month, so use better names for the PMUX-related values (MYPMUX_REG instead of MYPMUX, and MYUART_PMUX_VAL instead of MYUART_PMUX)  Also, use the enums for 4809/etc.
2019-10-13 00:13:45 -07:00
35ba394479 More support for mega-0 chips 2019-10-01 02:51:19 -07:00
a21d20fd63 Add some mention of optiboot_x 2019-10-01 02:49:14 -07:00
9fde01e634 Fix LED_INVERT option.
Add ATtiny817 to pin_defs_x.h
2019-09-23 01:55:49 -07:00
142c9f7c5f Dynamically derive the chip clock rate, so we no longer need AVR_FREQ, or separate binaries for different clockrates.
Dynamically read chip signature, which should permit quie a bit of sharing of single binaries between multiple chips (as long as LED and UARTTX are the same.)

Now that we have a slower clockrate, the LED delay only needs 16bits.

Update Makefile help text, and the options saved in flash with BIGBOOT.

Document fuse requirements/issues.
2019-09-20 19:43:18 -07:00
d4c67cdd36 Mostly, add help text to Makefile.mega0 2019-09-16 02:13:52 -07:00
c3344d7dfc Makefile now usable.
For example "make -f Makefile.mega0 drazzy3217"
Add LED_INVERT option to makefile option parser.
Clean up RSTPIN for chips with only two values.
Shave off a few bytes by writing PMUX instead of ORing, and using the default clock speed (20MHz/6) instead of turning off the divider.  (not that we need to save space yet.)
Implement something for the "do_spm" function.  This just writes "cmd" to NVMCTREL.CTRLA; I'm not sure whether an application can write to the page buffer to make that sufficient.  Needs testing.
2019-09-15 02:22:45 -07:00
74efdb6699 Mega0 Makefile in good enough shape for initial commit.
"make optiboot_<mcuname>.hex <options>" should build a .hex file for any of the "xmgea3" chips (mega0, tiny0, tiny1)
2019-09-13 18:26:38 -07:00
775cb1f6cd Implement TIMEOUT option.
ATtiny412 working.
add RSTPIN option to control the (internal) FUSE values.
More source code "prettyfication"

Observation: in MPLABX, if you set the project linker memory options
for ".postapp=0x200", MPLAB will happily double those values before
actually passing them to the linker, because you must have meant WORDS, right?

Observation 2: The ATmega4809 definition in avrdude.conf is diffrent in the Arduino distribution than in the latest avrdude, specifically WRT whether the flash is word-addressed or byte-addressed :-(
2019-09-11 02:21:14 -07:00
ad0f55574a Two important discoveries:
1) Changing the watchdog period (inc turning it on) requires paying
   attention to synchonization between the WDT clock and system clock.
2) "jmp 512" doesn't work.  I'm not sure exactly what happens, but it doesn't go where I expected.

For now, do away with the fancy reset-cause logic and revert to old-style bootloader behavior.  Don't even do the no-wait mod; at least this permits you to enter the bootloader by power-cycle.

Implement LED_INVERT for boards that have the blink LED between +5V and pin.

Now working on ATtiny416 Xplained Mini!
2019-09-10 01:17:13 -07:00
adafe79832 More 14/20 bit chip defintions.
Mostly, struggling with IDEs :-(
2019-09-06 01:06:24 -07:00
51b9eec272 Fix embarassing copy/paste errors in pin defs for 8pin tiny.
Try to add a dummy "application" for freshly programmed parts, that will keep running the bootloader instead of keep running the empty app.  (Doesn't work, though.  MPLAB won't program it!)
Clean up some obsolete comments.
2019-09-05 02:17:40 -07:00
58a71b130f Modifications for ATtiny4x2, at least as far as compilation.
Eliminate RTC-based LED flashing code in favor of busy loop, which is significantly shorter now that peripherals are not in range of quick IO instructions.
Minor formatting changes while the code is young (notably spaces after the function name at the spot where they're actually defined, which makes them easier to search for.  Ancient corporate coding style guideline...)
2019-09-04 01:21:27 -07:00
bb9ae67aee Day of testing and minor edits.
The RTC might be busy at startup.
This seems to be working - code successfully uploaded, after I got all the fuses right.
2019-09-03 02:57:51 -07:00
1d763359a7 Debugging. 2019-09-02 03:03:17 -07:00
4c12f27e66 New version of optiboot for Mega0 and xTiny AVRs. Uses NVMCTRL, and of course all of the peripherals have changed.
This is an initial commit of code that compiles.  There's no reaon to expect it to be working yet!  (but: only 430 bytes, with EEPROM support!)
2019-09-01 21:58:21 -07:00
5c67c2d688 Fix bug(s) in calculation of rjmp offset for virutal boot builds.
See https://github.com/Optiboot/optiboot/issues/275
2019-08-28 14:06:33 -07:00
abbe828f81 oops. Last commit had a bug or two, and while every .hex file tha built matched the prvious verion, some of them didn't build at all. 2019-08-27 23:39:25 -07:00
ba257540f8 restructure the Virtual Boot code so that it is easier to read.
These are preprocesing and commenting changes, and do not cause any changes in the binaries (tested for all of the bootloaders generated by the makeall.* scripts.)
2019-08-27 19:17:59 -07:00
b8b760546b Merge pull request #266 from justarandomgeek/master
Put BIGBOOT strings in flash so __do_copy_data doesn't get placed ahead of the jump table.
2019-02-03 01:55:31 -08:00
3f78f99745 Put BIGBOOT strings in flash so __do_copy_data doens't get placed ahead of the jump table. 2019-02-02 15:30:14 -05:00
0a6528d1fc optiboot.h needs to be part of the test_dospm example,
not (just) off as part of the MCUdud cores..
2018-10-11 15:10:22 -07:00
6ab10b545a Merge pull request #256 from SpenceKonde/master
Fix virtualboot for tiny841 and others
2018-10-09 21:51:49 -07:00
2bc6d71497 Merge branch 'master' into master 2018-10-09 21:51:31 -07:00
36a3271a1c Merge pull request #257 from majekw/travis-5
Travis-ci: use avr-gcc 5.4.0 from Arduino, update targets
2018-10-09 21:46:13 -07:00
7c5be22831 Merge pull request #259 from majekw/issue-258
Fix compilation of attiny828at8_5v, atmega168 BIGBOOT=1 and attiny84
2018-10-09 21:43:40 -07:00
e866cae9d7 Fix attiny84 and possible other chips without hardware UART 2018-10-09 23:42:35 +02:00
5d40a2afcc Fix compilation of attiny828at8_5v and atmega168 BIGBOOT=1 2018-10-08 23:35:30 +02:00
8fe96eac33 Travis-ci: use avr-gcc 5.4.0, update targets
- use avr-gcc 5.4.0 shipped with Arduino 1.8.7 as it's the only one
that supports PB chips
- added new targets (mostly ATtiny chips)
- generate comparison with emoji by default
- update allow_failures
2018-10-08 18:07:21 +02:00
d0c7d5c64c Fix led flash on tx5, tx61
Since these have weirdo timer1's
2018-10-08 01:14:56 -04:00
a5c9de3fd0 pin defs for more attiny 2018-10-08 01:14:16 -04:00
eea6dad0ae Fix ATtiny828; proper USART conditionals in pin_defs.h,
remove infinite recursion for "make attiny828at8"
2018-10-06 23:02:05 -07:00
46755bf49a fix last pull
This reverts commit 714a3f31ea. and recommits the changes to optiboot.c (sparing the changes to makefile.tiny which you may want to do differently)
2018-10-07 01:33:23 -04:00
1f9d9661c3 Revert "Generalize virtualboot fix"
This reverts commit 714a3f31ea.
2018-10-07 01:31:20 -04:00
714a3f31ea Generalize virtualboot fix
and extend to devices with 4-byte vectors
2018-10-07 01:29:33 -04:00
0722a8fcfb Fix virtualboot for tiny841 and others
Fix virtualboot on ATTiny841 to use EE_RDY vector and handle vector on second page of flash.
2018-10-06 22:46:01 -04:00
b1b897766d Don't do the BRG divisor analysis for SOFT_UART targets.
(and improve the check that does happen for SOFT_UART.)
2018-10-06 17:25:59 -07:00
bd451cfa0e fix the windows omake.bat (maybe?)
get our own copy of https://github.com/WestfW/Arduino-avr-tools-install
and used that to set up the tool paths.  You still need to make "make"
installed in the path (or in the arduino tools bin directory.)
2018-09-27 01:03:46 -07:00