1
0
mirror of https://github.com/Optiboot/optiboot.git synced 2025-07-29 20:21:11 +03:00
Commit Graph

241 Commits

Author SHA1 Message Date
2c558a3f7d Better (?) example of flash write from an Arduino sketch 2020-11-05 00:20:24 -08:00
6aa5871762 oops. Finish the test_nmvctrl filename changes.
add symbolic values for memory regions (sigrow fuses userrow eeprom) and nvmctrl->ctla command ("copy", write, wp, erase, ep, erwp, pbc, cher, eeer)
2020-09-30 23:44:14 -07:00
4c564c2b17 rename test_reset --> demo_reset 2020-09-30 01:36:43 -07:00
2f3cf2887e rename some of the test_* examples to demo_* to reflect that they're closer to actual examples, as opposed to some of the other test_* code, which is more like optiboot devlopment testing.
add a readme file to the examples directory.
2020-09-30 01:29:32 -07:00
c4ad0a8349 add missing example comments for do_nvmctrl 2020-09-30 01:07:54 -07:00
13b1e70478 convert to simpleParser; a proper C++ version of cli 2020-09-30 01:05:52 -07:00
f07ad4feec Fix some whitespace-at-end-of-line issues. 2020-09-28 13:04:05 -07:00
aa46aa0db8 Bump version for fixed do_nvmctrl 2020-09-28 03:31:05 -07:00
eb4416a5f0 Add optiboot_x nvmctrl support to optiboot.h
minor fixes in test_dospm itself.
test_dospm (which uses only the "high level" calls to read and
write pages) now works the same (I think) on both traditional
AVR and new mega0/xTiny chips.
2020-09-28 02:57:14 -07:00
7975070bdc Fix do_nvmctrl() (probably)
add a test_nvmctrl.ino sketch in examples that allows one to poke at it.
(the test sketch needs additional work; most of optiboo_x.h is commented out, and it should be merged with optiboot.x)
2020-09-27 01:30:17 -07:00
bb15a13779 Merge branch 'master' of https://github.com/Optiboot/optiboot 2020-09-27 01:12:31 -07:00
6323176f4c Fix some comments. 2020-09-27 01:12:11 -07:00
bb2d5bd060 Merge pull request #290 from petersmythe/master
Fix spelling mistakes & grammar
2020-08-16 02:00:37 -07:00
66958d6a12 Fix spelling mistakes & grammar 2020-08-16 08:03:23 +02:00
6f98751c6d Change the compile option symbols to be true/false instead of sometimes defined/undefined, so that specifying "LED_START_ON=0" doesn't actually cause the same behvaior as "LED_START_ON=1" 2020-06-18 00:48:08 -07:00
243ee94ffa Add EIND setting for chips with more than 128k flash.
Untabify and fix some comment formatting.
2020-05-29 18:20:26 -07:00
345955996d Merge branch 'master' of https://github.com/Optiboot/optiboot 2020-05-29 02:39:33 -07:00
ca5ef0a5c9 Fix incorrect reference to "pro micro" (which is a 32u4 board) 2020-05-29 02:38:54 -07:00
85d08800b1 Merge pull request #282 from enekochan/patch-1
Fix Markdown link
2020-05-29 02:31:00 -07:00
27f6adf44a Fix "make help", at least on unixy systems. Remove the UARTTX option, which is only relevant for mega0 targets.
Remove mega0 targets from the Makefile.extras, where they slipped in accidentallly.  They never worked, and caused confusing since a "make atmega4809" would generate compile errors instead of "unknown target" errors.
2020-05-29 02:17:56 -07:00
0b9a50d4e6 Add TIMEOUT option to Makefile. Implement this in optiboot.c
Fix comments so that TIMEOUT is in seconds (compatible with optiboot_x)
Check for illegal timeouts on older chips (4s and 8s are impossible on ATmega8) by checking whether the extra bit is defined in the ioxxx.h file.

Update the .hex and .lst files (binaries don't change from this edit, but I never updated them last time.)
2020-05-29 01:03:18 -07:00
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