log for c91302cb3518276f242f9f1b70b1e7bdf5941613
Commit c91302cb3518276f242f9f1b70b1e7bdf5941613
committer: Doug Goldstein [Sun, 27 Apr 2014 18:15:59 +0000 (13:15 -0500)]
author: Doug Goldstein [Sun, 27 Apr 2014 15:46:17 +0000 (10:46 -0500)]
Message:
Clean up outdated comment

This comment is no longer true for any of the listed platforms so its
best to adjust the wording to what might be relevant to users
Commit 80e2c23f70d80ef39f5e956a773d2de39b369026
committer: Doug Goldstein [Sun, 27 Apr 2014 18:15:51 +0000 (13:15 -0500)]
author: Doug Goldstein [Sun, 27 Apr 2014 15:43:17 +0000 (10:43 -0500)]
Message:
cores: Fix ADCH and ADCL to use defines for RFA1

No current release provides these defines however they are fixed in
avr-libc trunk and as such we should use them if they are available.
Commit 6aee2974d91d3bca636c4a278b6ff83c891e3d6d
author: Michel Pollet [Wed, 2 Apr 2014 11:36:40 +0000 (12:36 +0100)]
Message:
Merge pull request #67 from bsekisser/master-core-refactor-flags

sim_core: flag equations refactored.
Commit 409cf65b8fb17c9cbdfb0670f644fad4f5eeaa50
author: Michel Pollet [Wed, 2 Apr 2014 11:35:30 +0000 (12:35 +0100)]
Message:
Merge pull request #69 from bsekisser/master-core-ldi-labeling-misc

sim_core: add ldi, trace and labeling corrections.
Commit 28761a8287af19e9cddfdc65f5b388ba1a76d373
committer: bsekisser [Sun, 30 Mar 2014 22:59:20 +0000 (18:59 -0400)]
author: bsekisser [Fri, 21 Mar 2014 12:34:20 +0000 (08:34 -0400)]
Message:
sim_core: flag equations refactored.

Most flag equations have been refactored into flag group function
  blocks...  The core passes all provided tests in the tests folder
  and now most especially is able to pass the instruction test code.
  At the same time, the overall average cycles per instruction has
  ticked down.

modified:   sim/sim_core.c
Commit 8b80f3174e390828bce0c2d5351458cc92707797
committer: bsekisser [Sun, 30 Mar 2014 22:09:51 +0000 (18:09 -0400)]
author: bsekisser [Sun, 30 Mar 2014 21:59:46 +0000 (17:59 -0400)]
Message:
sim_core: add ldi, labeling corrections.

in moving the majority of instructions to follow use of register
 macros, ldi was missed.

get_h4_k16() was incorrectly labeled where get_h4_k8() was intended
 as k is an 8 bit quantity not 16.

get_o_12() was changed to get_o12() following the convention set
 forth with the other macros.

several trace statements were missed during the conversion and fixed.

ORI was incorrecly labeled as ANDI in the description and corrected.

modified:   sim/sim_core.c
Commit 5aca53635da8f6b09cc8e43cd4f43a3f32edc1e5
author: Michel Pollet [Mon, 24 Mar 2014 18:23:49 +0000 (18:23 +0000)]
Message:
Merge pull request #68 from bsekisser/master-core-fix-rcall-cycles

sim_core: fix rcall instruction cycles...
Commit ae52fb327a9b4a792f45760f407b6c7e69b3cf1d
committer: bsekisser [Sat, 22 Mar 2014 12:36:08 +0000 (08:36 -0400)]
author: bsekisser [Sat, 22 Mar 2014 12:13:06 +0000 (08:13 -0400)]
Message:
sim_core: fix rcall instruction cycles...

Based on the instrtiming.elf code and checking the Avr Instruction
 Manual, RCALL was found to be producing incorrect cycle counts.

Atmega; 3, 16-bit pc; 4, 22-bit pc.

Fixed accordingly.

modified:   sim/sim_core.c
Commit 75fcf0807e9666d4a7d1082ed5855b60252750bf
author: Michel Pollet [Tue, 18 Mar 2014 23:17:39 +0000 (23:17 +0000)]
Message:
Merge pull request #64 from bsekisser/master-core-regmacro-descript

sim_core: reworked register macros and descriptor lines
Commit 396c39776a60dd532e42eab69ce888d95ed08151
author: Michel Pollet [Tue, 18 Mar 2014 13:16:11 +0000 (13:16 +0000)]
Message:
Merge pull request #65 from cardoe/gdb-stub-update

Add some commands to the GDB stub
Commit ad47d913b54cef188269c4b75fdde51d27d6fe32
committer: Doug Goldstein [Tue, 18 Mar 2014 01:36:28 +0000 (20:36 -0500)]
author: Doug Goldstein [Sun, 16 Mar 2014 20:02:59 +0000 (15:02 -0500)]
Message:
gdb: support reporting memory map locations

GDB wants to have knowledge of the RAM and flash regions of memory on
the chips. Since AVR is Harvard architecture, the RAM must begin at a
fake offset and per Atmel's docs that is 0x800000.
Commit cecb9440942182b2d57924d4b358e59d17c4337b
committer: Doug Goldstein [Tue, 18 Mar 2014 01:19:01 +0000 (20:19 -0500)]
author: Doug Goldstein [Mon, 17 Mar 2014 01:46:46 +0000 (20:46 -0500)]
Message:
gdb: support qOffsets command

GDB will ask what offsets should be applied to the the text and data
sections. Since AVR is Harvard architecture so we need to apply an
offset for one of the regions universally, Atmel documents and uses
0x800000 for RAM so this makes that happen.
Commit 6981970786d7de8e9507f0c02def6473efd76f56
committer: Doug Goldstein [Mon, 17 Mar 2014 02:00:04 +0000 (21:00 -0500)]
author: Doug Goldstein [Sun, 16 Mar 2014 15:47:39 +0000 (10:47 -0500)]
Message:
gdb: support qAttached command from debugger

When using avr-gdb on Ubuntu 12.04, this command is always sent
and we responded as if it was unsupported. Unfortunately avr-gdb on
Ubuntu 12.04 crashes when detaching from the process because it makes a
bad assumption somewhere, this will prevent the crash.
Commit 81a7f346c945ee9e47e2dcc36363b0113ea5b7f9
committer: bsekisser [Sun, 16 Mar 2014 22:07:24 +0000 (18:07 -0400)]
author: bsekisser [Sun, 16 Mar 2014 21:07:21 +0000 (17:07 -0400)]
Message:
sim_core: reworked register macros and descriptor lines

reworked register macros and instruction descriptor lines to more
 closely follow avr data sheet insruction (and avr instruction wiki)
 references. register macro usage (with few exceptions) have been worked
 throughout the core to be more uniform and consistent.  most notably d
 is used nearly uniform throught the avr instruction set references,
 prior the core intermixed the usage of the opcode registers d and r
 notation.

lpm & elpm, trace bug fixed... tracing would always show lpm Z+ regardless of
 the actual operation performed...  more importantly than that, looking
 at the instruction data sheet reference, the relevant bit is bit 1
 in the opcode...  prior op was equal to opcode & 3 similar to ld/st
 instructions...  the original lpm checked for op == 1 and the
 reworked elpm checked for op == 3.  this has been corrected for
 both opcode implimentations by setting op to opcode & 1 and just
 using op to flag for post increment.

modified:   sim/sim_core.c
Commit b1ab2fbfc770574d8791bbdf8342264198e37e02
author: Michel Pollet [Sat, 15 Mar 2014 20:05:33 +0000 (20:05 +0000)]
Message:
Merge pull request #63 from cardoe/flash-rampz-rww

Add support for a RWW section and fix problems with flashing and using RAMPZ
Commit af790c58090162607ebf2a7c5a202e93077e4abb
committer: Doug Goldstein [Sat, 15 Mar 2014 18:54:10 +0000 (13:54 -0500)]
author: Doug Goldstein [Fri, 7 Mar 2014 05:29:23 +0000 (23:29 -0600)]
Message:
flash: add support for RWWSRE/RWWSB bits in SPMCR

The Self Program Memory Control Register (SPMCR) has a bit for enabling
the read while write section (RWWSRE). This is also used for clearing
the temporary page buffer that is used for page writing (PGWRT). The
read while write section busy (RWWSB) allows the application developer
to know when the RWW section is accessible and when programming of it
has completed.

This commit does not wire up the behavior but just allows the flash
structure to understand that it supports a RWW section.
Commit 805168caa5f717e363cd265ea8fcb3d7beeeb7aa
committer: Doug Goldstein [Sat, 15 Mar 2014 18:40:02 +0000 (13:40 -0500)]
author: Doug Goldstein [Fri, 7 Mar 2014 04:55:20 +0000 (22:55 -0600)]
Message:
megax8: Add missing define before including AVR hdr

mega48, mega88, and mega168 all share a common header and rely on their
platform to be defined prior to their headers being included.
Commit 3fa972fc676cdeb2b6bb82f51d5ca29d1cc061e0
committer: Doug Goldstein [Sat, 15 Mar 2014 18:39:58 +0000 (13:39 -0500)]
author: Jonathan Creekmore [Thu, 6 Mar 2014 15:21:52 +0000 (09:21 -0600)]
Message:
16-bits is not large enough if using RAMPZ

The RAMPZ register allows the effective address to be up to 24-bit,
so a 16-bit variable is not large enough to hold it.
Commit e0749c147eabd317cb1496f0cf9257dd68bc681e
committer: Doug Goldstein [Sat, 15 Mar 2014 01:21:45 +0000 (20:21 -0500)]
author: Jonathan Creekmore [Thu, 30 Jan 2014 02:31:29 +0000 (20:31 -0600)]
Message:
Support looking up the AVR_ROOT in /usr/local/avr
Commit 38a09ebdb191569d0348d2c9d80e8b12203e841e
author: Michel Pollet [Tue, 11 Mar 2014 11:27:02 +0000 (11:27 +0000)]
Message:
Merge pull request #61 from cardoe/pc-crash

Don't crash if PC is past the end of the flash section
Commit f17ac8250980a575b2bc4d9e4968102075bd89d9
committer: Doug Goldstein [Tue, 11 Mar 2014 01:12:23 +0000 (20:12 -0500)]
author: Doug Goldstein [Mon, 10 Mar 2014 01:32:05 +0000 (20:32 -0500)]
Message:
core: set reasonably safe default for 'codeend'

Its reasonably safe to assume that 'codeend' can not be past 'flashend'
so that's a good default value.
Commit d9701a754e742fc3491d619fad928ac544b32b93
committer: Doug Goldstein [Mon, 10 Mar 2014 01:35:15 +0000 (20:35 -0500)]
author: Doug Goldstein [Mon, 10 Mar 2014 01:20:22 +0000 (20:20 -0500)]
Message:
core: don't crash if pc is past flash

If we somehow had bad code that pointed us past the end of the flash it
would segfault simavr rather than catching the bad case, this fixes and
that wraps the check in an unlikely() branch hint since its very
unlikely we will take that case.
Commit 663a5c215aecaad5ca9d921271a7f1af6449ca6e
committer: Doug Goldstein [Mon, 10 Mar 2014 01:24:56 +0000 (20:24 -0500)]
author: Doug Goldstein [Mon, 10 Mar 2014 01:18:49 +0000 (20:18 -0500)]
Message:
add likely/unlikely branch hint macros

Provide likely/unlikely branch hinting macros.
Commit 36ae8cdeed3b9f40a5e9a7c388a4eae9b9a024f5
committer: Michel Pollet [Sat, 8 Mar 2014 10:53:51 +0000 (10:53 +0000)]
author: lleroy [Thu, 16 Jan 2014 07:46:31 +0000 (08:46 +0100)]
Message:
cores: Added atmega169p
Commit 2c20fc90d2f8b32770e727c50b012e945d0e0f01
committer: Michel Pollet [Thu, 6 Mar 2014 16:36:57 +0000 (16:36 +0000)]
author: Michel Pollet [Thu, 6 Mar 2014 16:35:35 +0000 (16:35 +0000)]
Message:
vcd: Traces now start in 'X' state

"Floating" state, until they are explicitely set by the firmware or
emulator

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0192cc667e32614a283d208a76049f6e87ca9822
committer: Michel Pollet [Thu, 6 Mar 2014 16:36:57 +0000 (16:36 +0000)]
author: Michel Pollet [Thu, 6 Mar 2014 16:34:39 +0000 (16:34 +0000)]
Message:
ioport: Add a pair of IRQs

Allows easy tracking of the PORT/PIN (when read) and DDR values as they
are written by the firmware.
Also reformatted in '2014' narrow style

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit fde567e3803f69614948b937c14184e0b6a0f308
committer: Michel Pollet [Thu, 6 Mar 2014 16:36:57 +0000 (16:36 +0000)]
author: Michel Pollet [Thu, 6 Mar 2014 16:33:00 +0000 (16:33 +0000)]
Message:
ELF: Make sure the macro generater the correct value

You could pass constants over 8 bits in size, generating very confusing
values

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit e6b27161077bb38dc8c02cc3e95644b6d05bea9f
author: Michel Pollet [Thu, 6 Mar 2014 16:20:46 +0000 (16:20 +0000)]
Message:
Merge pull request #60 from bsekisser/avr-timer-cancel-timer-rollup

avr_timer: roll up cancelation of timers into single function.
Commit f1c09cc7d840b172958b5330c69e6c80d1db3f3e
author: bsekisser [Thu, 6 Mar 2014 12:41:46 +0000 (07:41 -0500)]
Message:
avr_timer: roll up cancelation of timers into single function.

modified:   sim/avr_timer.c
Commit 9904d53b9bdb939ace4cb2f914874eba876bfee8
author: Michel Pollet [Wed, 5 Mar 2014 16:25:57 +0000 (16:25 +0000)]
Message:
Merge pull request #59 from bsekisser/ld-st-rXYZ-bugfix

sim_core: Fix for issue #46, correction to ld {rXYZ}
Commit 69ade71a1c2ccc5b220045d44f6f3f58254886d8
author: Michel Pollet [Tue, 4 Mar 2014 08:54:10 +0000 (08:54 +0000)]
Message:
cores: Fix mega2560

Added EIND, as per nnayo's. Also renamed the file to match the other
cores

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 1518952330756db153df63e752c2964aab4aea7c
committer: Michel Pollet [Tue, 4 Mar 2014 08:51:54 +0000 (08:51 +0000)]
author: Michel Pollet [Tue, 4 Mar 2014 08:51:15 +0000 (08:51 +0000)]
Message:
test: Fix coroutine on old gcc

Removed traling colon. Fix issue #34

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 28bda0b248db6f5a506eb59cd7bc1720994a5709
committer: Michel Pollet [Tue, 4 Mar 2014 08:51:54 +0000 (08:51 +0000)]
author: Michel Pollet [Tue, 4 Mar 2014 08:50:17 +0000 (08:50 +0000)]
Message:
make: Allow override of root path

Allows inclusion of Makefile.common from out of tree.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 13d11ecf334643662ae5d4b15bbaeeb338292a8f
author: Michel Pollet [Tue, 4 Mar 2014 08:34:59 +0000 (08:34 +0000)]
Message:
Merge pull request #53 from nnayo/gdb_fault

fix gdb error message: Cannot remove breakpoints because program is no l...
Commit 82f917a8d4f3fde8fc131a58d17c871bf3a33256
author: Michel Pollet [Tue, 4 Mar 2014 08:30:33 +0000 (08:30 +0000)]
Message:
Merge pull request #45 from cardoe/prototype-warning

Fix avr_global_logger_get() decl  to not warn.
Commit e82f4851c4616164256fa974617a19abb5be9d3e
committer: Doug Goldstein [Tue, 4 Mar 2014 02:32:00 +0000 (20:32 -0600)]
author: Doug Goldstein [Sat, 22 Feb 2014 03:28:19 +0000 (21:28 -0600)]
Message:
Fix avr_global_logger_get() decl  to not warn

When using sim_avr.h with a project that uses -Wstrict-prototypes, you
will get a warning that the prototype for avr_global_logger_get() is not
valid. Functions that take no args must explicitly use void to not warn.
Commit 2d13e9efcd65567b90eb500cc4db6778fc3300e7
author: Michel Pollet [Mon, 3 Mar 2014 22:43:00 +0000 (22:43 +0000)]
Message:
Merge pull request #56 from bsekisser/avr-timer-comp-write-ocr

avr_timer: changed avr_timer_write_ocr as part of larger avr_timer refac...
Commit 85915dfa16407eb4e32940c88dbc2798ffa362de
author: bsekisser [Mon, 3 Mar 2014 22:14:36 +0000 (17:14 -0500)]
Message:
avr_timer: changed avr_timer_write_ocr as part of larger avr_timer refactor.

- changed avr_timer_write_ocr code to take pointer of relevant
   comparator structure rather than its parent timer.

- added _timer_get_comp_ocr which the modified avr_timer_write_ocr
function uses.

modified:   simavr/sim/avr_timer.c
modified:   simavr/sim/avr_timer.h
Commit cc54eda5e96867b724ffb9a6e3610fce557faad5
author: Michel Pollet [Mon, 3 Mar 2014 17:55:57 +0000 (17:55 +0000)]
Message:
Merge pull request #54 from bsekisser/uart-udr-write-changes

uart: refactor uart udr write operation outside generic uart write.
Commit cf715dc4a43daadd0128f882726213307da48070
committer: Michel Pollet [Mon, 3 Mar 2014 17:53:22 +0000 (17:53 +0000)]
author: nnayo [Mon, 3 Mar 2014 14:52:01 +0000 (15:52 +0100)]
Message:
cores: Add atmega2560
Commit 06c0981b53018ff1b28f10793f20fb70a56aa626
committer: Michel Pollet [Mon, 3 Mar 2014 17:52:45 +0000 (17:52 +0000)]
author: Michel Pollet [Mon, 3 Mar 2014 17:49:56 +0000 (17:49 +0000)]
Message:
core: Handle EIND register

Parts with more than 128KB of flash need an extra byte on the stack
Rework from nnayo branch for the atmega2560

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3bbf09b417802da42f30f5f81cdfa7297f643665
committer: Michel Pollet [Mon, 3 Mar 2014 17:50:49 +0000 (17:50 +0000)]
author: Michel Pollet [Mon, 3 Mar 2014 17:49:05 +0000 (17:49 +0000)]
Message:
core: Removed trace crash macro

Made it a function instead.

Reworked from nnayo's commit
Commit b0d3d5ec3136d4742f1ac15a214f046e79705c84
author: bsekisser [Mon, 3 Mar 2014 17:00:21 +0000 (12:00 -0500)]
Message:
uart: refactor uart udr write operation outside generic uart write.

modified:   simavr/sim/avr_uart.c
Commit d226e2a99f2f3deb655a2e32d36878f9504c68aa
author: nnayo [Mon, 3 Mar 2014 13:55:19 +0000 (14:55 +0100)]
Message:
fix gdb error message: Cannot remove breakpoints because program is no longer writable.
Commit 84174b518f4d5b1b2f10e50951c240f7808e3782
author: Michel Pollet [Mon, 3 Mar 2014 13:23:49 +0000 (13:23 +0000)]
Message:
Merge pull request #50 from cardoe/atmega128rfa1

cores: add ATmega128RFA1 core
Commit 9219cc984147de5c59d4a3f63c522f031b3a90fa
author: Michel Pollet [Mon, 3 Mar 2014 13:14:13 +0000 (13:14 +0000)]
Message:
timers: Reformat

Cleanup the macros

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit c3db03ac5b2552b174a2dddc5576392fd4cc7d90
committer: Doug Goldstein [Sat, 1 Mar 2014 20:42:21 +0000 (14:42 -0600)]
author: Doug Goldstein [Sun, 2 Feb 2014 20:33:52 +0000 (14:33 -0600)]
Message:
cores: add ATmega128RFA1 core

This core is based on the ATmega1281 core per Atmel's documentation so
that was used as a starting point. No guarentees that the radio is wired
up correctly.
Commit e6cd1e0ff5d62d247078083312a6e3551a8078c6
author: Michel Pollet [Sat, 1 Mar 2014 13:46:34 +0000 (13:46 +0000)]
Message:
timers: Real fix

There were a couple of logic error in the previous commit, fixed,
hopefully.
Commit fd880504f3178e2f31eeced535306ce4eee7287a
author: Michel Pollet [Fri, 28 Feb 2014 01:06:17 +0000 (01:06 +0000)]
Message:
simduino: Small fix

Not sure how this got commited, it was not compiling.
Commit 2eb70dde7189e59cb24fd58420ca0577f9cb3559
committer: Michel Pollet [Fri, 28 Feb 2014 01:02:14 +0000 (01:02 +0000)]
author: Michel Pollet [Fri, 28 Feb 2014 00:54:15 +0000 (00:54 +0000)]
Message:
timers: New, faster implementation

Bullied by bsekisser into making this one ;-)

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit c3d8a2902c53c2adfb912d0f3368bb8ca29edf27
committer: Michel Pollet [Fri, 28 Feb 2014 01:02:14 +0000 (01:02 +0000)]
author: Michel Pollet [Tue, 18 Feb 2014 18:24:59 +0000 (18:24 +0000)]
Message:
gdb: cleanup

Formatting, nothing functional.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 30556d908634083b610e08f55d3665fdd19c4cb3
author: Michel Pollet [Wed, 26 Feb 2014 17:44:30 +0000 (17:44 +0000)]
Message:
Merge pull request #39 from ppd1990/makefile-threaded

Make Makefile safe for parallel compilation.
Commit 086afbd2985c121280df62b9d9f47e8a6ac4a564
author: bsekisser [Mon, 24 Feb 2014 00:26:01 +0000 (19:26 -0500)]
Message:
sim_core: correction to ld {rXYZ}

User supplied test seems to indicate that the avr writes data to
 the destination register AFTER updating the index register.
  whereas the core originally read the index register and
  immediately stored the result into the register and then wrote
  back the index register.

If the code used: LD XH, X test indicated XH would return the
 value loaded from the indirect load operation versus the updated
 XH:XL value as the core originally assumed.

modified:   sim/sim_core.c
Commit 8331c58225d850c3a5e07f17869e2cbd0715746c
author: Michel Pollet [Wed, 19 Feb 2014 10:25:59 +0000 (10:25 +0000)]
Message:
Merge pull request #43 from cardoe/special-init-api

Extend special_init/special_deinit API
Commit 83cff2f9a69cf6ca87d51f235031618afc5009e5
committer: Doug Goldstein [Wed, 19 Feb 2014 02:27:24 +0000 (20:27 -0600)]
author: Doug Goldstein [Wed, 19 Feb 2014 02:06:31 +0000 (20:06 -0600)]
Message:
Extend special_init/special_deinit API

Its pretty common for callback style APIs to include a private pointer
to allow the user to pass in contextual data through the callback API
(see pthread_create for an example). This change adds that for
special_init() and special_deinit() which are designed as callbacks.
Effectively this behavior was used in the only two examples that used
those callbacks by having global variables, however globals are of
limited use for programs that might instantiate multiple avr cores.
Commit 24b2befe8cb30ff5592081c2cb64210761c9be78
author: Michel Pollet [Wed, 12 Feb 2014 12:26:05 +0000 (12:26 +0000)]
Message:
Merge pull request #41 from nnayo/segfault

correct a segfault
Commit 01df079331dc0ff266f73ae5e55deb91228907c9
author: Michel Pollet [Wed, 12 Feb 2014 12:25:49 +0000 (12:25 +0000)]
Message:
Merge pull request #42 from nnayo/typo

fix typo
Commit ab4b6b04c4fa7059f21e03a0b3a4cbc1dd167385
author: nnayo [Wed, 12 Feb 2014 12:19:21 +0000 (13:19 +0100)]
Message:
fix typo
Commit c898381059b0ffee9d14e7cb634226a3b3ec8d2c
author: nnayo [Wed, 12 Feb 2014 10:14:51 +0000 (11:14 +0100)]
Message:
correct a segfault
Commit 406473da4e5ec7cd9fa9377f44b6e0bedf9afbb0
author: Maximilian [Wed, 12 Feb 2014 00:52:36 +0000 (01:52 +0100)]
Message:
Make Makefile safe for parallel compilation.
Commit 78703df7cf56207c5ddc982beb8819393894eb14
author: Michel Pollet [Wed, 12 Feb 2014 00:39:30 +0000 (00:39 +0000)]
Message:
Merge pull request #38 from ppd1990/megax-timer

Fix timer0 on megax MCUs. Stick to lowest common denominator (atmega8) i...
Commit 376af03b1deb99615632f42065f73ad80b211cd0
author: Maximilian [Wed, 12 Feb 2014 00:12:53 +0000 (01:12 +0100)]
Message:
Fix timer0 on megax MCUs. Stick to lowest common denominator (atmega8) in terms of functionality.
Commit a78509036d10061b0dce694af5dfe0f592b62ab6
author: Michel Pollet [Tue, 11 Feb 2014 18:48:52 +0000 (18:48 +0000)]
Message:
Merge pull request #37 from ppd1990/atmega-icp

Correctly set timer1's ICP on atmega8, atmega16 and atmega32.
Commit 8e02e6fc02136472f4bad8415a6005438258daa5
author: Maximilian [Tue, 11 Feb 2014 16:57:50 +0000 (17:57 +0100)]
Message:
Correctly set timer1's ICP on atmega8, atmega16 and atmega32.
Commit 6c2879d4c25c143ca72d3fa7d5247fe695d8177f
author: Michel Pollet [Sun, 9 Feb 2014 23:12:11 +0000 (23:12 +0000)]
Message:
cores: m16 and m32 fix

Core struct declaration had a problem when the 'porta' was not declared.
Now declare it last, so it doesnt clash anymore.
Commit 0a6a6164d0f6f93dd9b6643b699c6def72214e6a
author: Michel Pollet [Sun, 9 Feb 2014 23:08:58 +0000 (23:08 +0000)]
Message:
core: renamed MCU section variable name

This was clashing with the command register

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 29bcde7ad8ee7b1ae4595f85fdfb03065f433089
author: Michel Pollet [Thu, 9 Jan 2014 13:29:42 +0000 (13:29 +0000)]
Message:
uart_pty: Fix the race condition

There had been a race condition in there for a rather long while,
I've finaly tracked it down to a small idiotic change of trying to
flush a buffer from the wrong thread.
Removing that flush makes it works properly as intended, without the
mutex.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 32f385e94fe16415d96f667efeaa9615aca930a3
author: Michel Pollet [Thu, 9 Jan 2014 13:28:17 +0000 (13:28 +0000)]
Message:
twi: Fix a clang error

clang doesn't like unused static functions at all.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 24ed7a6fcd008cabd5b4efcd39befe4815028bff
author: Michel Pollet [Thu, 9 Jan 2014 13:27:21 +0000 (13:27 +0000)]
Message:
fifo: cleaned warnings and removed volatile

Should not need the volatile declaration anymore.
Also use the "unused" designation to prevent clang to complain
about unused static functions.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 77f5a3f5ed0f2c9f4053119a895f75f5213ccc73
author: Michel Pollet [Thu, 9 Jan 2014 10:55:39 +0000 (10:55 +0000)]
Message:
Merge remote-tracking branch 'thomasa88/feature/detect_avr_root' into dev-home
Commit c46982ae87ef5e3f1541002e4017291ded86a27c
author: Michel Pollet [Thu, 9 Jan 2014 10:49:26 +0000 (10:49 +0000)]
Message:
cores: Added atmega1284.c

That one has an extra timer, it seems.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit a7d538ddb31a6cc7f0511c4d4a15d1ff5e42871b
committer: Michel Pollet [Thu, 9 Jan 2014 08:57:32 +0000 (08:57 +0000)]
author: Philip Withnall [Sat, 1 Dec 2012 10:00:20 +0000 (10:00 +0000)]
Message:
spi: Clear SPIF when writing to SPDR

The manual says the SPIF bit is cleared when accessing (i.e. reading _or_
writing) the SPDR register after an interrupt is raised. By clearing SPIF
on a write to SPDR, the following code starts to work:

   SPDR = 0xff; loop_until_bit_is_set (SPSR, SPIF);
   SPDR = 0x00; loop_until_bit_is_set (SPSR, SPIF);

(where the bytes are arbitrarily chosen). This didn’t work before as the
SPIF bit wasn’t cleared by the second write to SPDR, so the second loop
turned into a no-op. This caused the write timer for the first byte to be
overwritten by the write timer for the second. Consequently, the first byte
never got transmitted.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 26ebc9917ec7b343165121b8675c12f6373481ea
author: Michel Pollet [Thu, 9 Jan 2014 08:55:38 +0000 (08:55 +0000)]
Message:
Merge remote-tracking branch 'pwithnalls/warning-fixes' into dev-home
Commit c39ae55bae12aab4c2d6b9f973beb714c921a43b
committer: Michel Pollet [Thu, 9 Jan 2014 08:54:59 +0000 (08:54 +0000)]
author: Michel Pollet [Thu, 9 Jan 2014 08:54:49 +0000 (08:54 +0000)]
Message:
core: Declare avr_pending_sleep_usec

This was meant to be declared for 'boards' to use

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3232ce764c7f9815a49f7a6a6239cf80bff489c2
author: Michel Pollet [Thu, 9 Jan 2014 08:54:07 +0000 (08:54 +0000)]
Message:
timer: Tweak traces

Display the period in uS as well as cycles

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 6a8222ebf5e9739ce01dfbddc3ab512376d0b88a
committer: Thomas Axelsson [Wed, 8 Jan 2014 21:31:32 +0000 (22:31 +0100)]
author: Thomas Axelsson [Wed, 8 Jan 2014 21:29:55 +0000 (22:29 +0100)]
Message:
Makefile: Test multiple AVR roots for Linux and error out if none found

Inspired by thors@github.

This should find correct paths for at least Arch, Debian, Fedora, Gentoo, OpenSUSE, Ubuntu.
Commit b66ed500234bfcac1387742f2e7e07c6ac471db5
author: Michel Pollet [Fri, 29 Nov 2013 16:25:52 +0000 (16:25 +0000)]
Message:
avr: Make vector trace work

Somehow the vector list was erased at avr_reset time, luckily only the
trace code in run_avr was using it.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 270166e66646ce916f091abb980e59303a042dc5
author: Michel Pollet [Wed, 27 Nov 2013 21:16:36 +0000 (21:16 +0000)]
Message:
simavr: Removed the avr_global_logger global

It was not very clean; Instead there is a new accessor for
setting/getting a global logging function pointer.
Also made sure it is not compiled for the cores, since they use AVR
headers and have no stdarg.h anyway

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit f87c0ca090b1227bc3940b9381e9736114547c3c
author: Michel Pollet [Wed, 27 Nov 2013 16:50:46 +0000 (16:50 +0000)]
Message:
core: Fix a possible buffer overrun

From bsekisser@github

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit ef9ffe72c131ac1ab8bb28569f1ad50c59e2dff2
author: Michel Pollet [Wed, 27 Nov 2013 16:42:45 +0000 (16:42 +0000)]
Message:
cores: Added mega16

No idea why it wasn't there already. Uncommon part.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0911e508388637f7c1a2fcae6ff18184561c966f
author: Michel Pollet [Wed, 27 Nov 2013 16:42:19 +0000 (16:42 +0000)]
Message:
cores: Added PORTA to atmega32

Inspired by sealibora@github

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 42b507c547e485dddf9fb6e43512d8e4a6800787
author: Michel Pollet [Wed, 20 Nov 2013 17:28:42 +0000 (09:28 -0800)]
Message:
Merge pull request #33 from bsekisser/uart-u2x-bugfix

avr_uart.c: fix to prevent overwriting readonly flags when setting u2x.
Commit a29ada2d37fed04f6c4f568d99f3538f29fbc8f5
author: bsekisser [Wed, 20 Nov 2013 16:37:49 +0000 (11:37 -0500)]
Message:
avr_uart.c: fix to prevent overwriting readonly flags when setting u2x.

modified:   simavr/sim/avr_uart.c
Commit f35aeb7ff472734567fbe15cdf5b89ad71007b04
committer: Michel Pollet [Wed, 6 Nov 2013 14:53:07 +0000 (14:53 +0000)]
author: Michel Pollet [Wed, 6 Nov 2013 14:53:00 +0000 (14:53 +0000)]
Message:
tests: Added a coroutine example

Slapped together test, but demonstrates a nice trick that works
on AVR for havbing multiple tasks concurently (coorperatively)

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit a995fb77749ff034464353533253ca2ac54ac08c
committer: Michel Pollet [Wed, 6 Nov 2013 14:53:07 +0000 (14:53 +0000)]
author: Michel Pollet [Wed, 6 Nov 2013 14:50:32 +0000 (14:50 +0000)]
Message:
mmcu: Tweak to the macros to allow multiple declarations

This trick adds the line number in the declaration of the fake
'variable' to allows multiple declarations to coexists, it is used
for the pullup/down declaration in particular

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0996a663c8dcdcf3e13aa96bcc38b5d9e20d8f10
author: Michel Pollet [Mon, 21 Oct 2013 21:44:01 +0000 (14:44 -0700)]
Message:
Merge pull request #30 from bsekisser/sim-core-muls-bugfix

sim_core.c: fix implimentation of muls instruction
Commit 350bd851fe0a5718de9faa23d47a2ed45fdb1938 v1.1
author: Michel Pollet [Tue, 15 Oct 2013 12:26:14 +0000 (05:26 -0700)]
Message:
Merge pull request #29 from bsekisser/sim-core-ror-bugfix

sim_core.c: fix implimentation of ror instruction
Commit ab15a28670bdf1bf9277642c08deb435f5f762d2
author: Michel Pollet [Tue, 15 Oct 2013 12:26:08 +0000 (05:26 -0700)]
Message:
Merge pull request #28 from bsekisser/sim-core-bld-bugfix

sim_core.c: fix implimentation of bld instruction
Commit 2ac4d1e8cea12c53783fd98cee2521861811008e
author: Michel Pollet [Tue, 15 Oct 2013 12:25:58 +0000 (05:25 -0700)]
Message:
Merge pull request #27 from bsekisser/sim-core-inc-dec-bugfix

sim_core.c: fix implimentation of inc/dec to match specification
Commit 382900645b1f7244d1b29cc851314c3e194c84e3
author: bsekisser [Sun, 13 Oct 2013 20:01:07 +0000 (16:01 -0400)]
Message:
sim_core.c: fix implimentation of muls instruction

specification for muls insruction states 2 cycles, not one as implimented.

bug find credit goes to: Shay Green <gblargg@gmail.com>

modified:   sim_core.c
Commit c7a4f0ed2b24d36d13c80af60ce536e3d44b7e0c
author: bsekisser [Sun, 13 Oct 2013 17:09:53 +0000 (13:09 -0400)]
Message:
sim_core.c: fix implimentation of ror instruction

prior implimentation just cleared n flag while specification states n should be set or cleared according to the most significant bit of the result.

bug find credit goes to: Shay Green <gblargg@gmail.com>

modified:   simavr/sim/sim_core.c
Commit b6422516ec0af6bd7af3b9d502d682ca9ca6e3a5
author: bsekisser [Sun, 13 Oct 2013 16:28:18 +0000 (12:28 -0400)]
Message:
sim_core.c: fix implimentation of bld instruction

prior implimentation of the bld insruction was ORing bit with T, rather than replacing.

bug find credit goes to: Shay Green <gblargg@gmail.com>
Commit 0fbfaac3e606728c816dd56fbb8a19201619190c
author: bsekisser [Sun, 13 Oct 2013 15:26:17 +0000 (11:26 -0400)]
Message:
sim_core.c: fix implimentation of inc/dec to match specification

the avr instruction manual states that overflow be set _before_ the operation takes place, however the core tests based on the result.  values checked adjusted accordingly.

bug find credit goes to: Shay Green <gblargg@gmail.com>
Commit 2c407d6d22473809a431a55b1c6877015c3c9814
author: Michel Pollet [Thu, 10 Oct 2013 14:14:17 +0000 (15:14 +0100)]
Message:
elf: Added support for external pullup/down

Added a new "mmcu" section to allow firmwares to specify what
IRQ value should be set when a pin is marked as input

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 6d60bfd4145136b1e9d21083034fd44aa1c09822
author: Michel Pollet [Thu, 10 Oct 2013 14:12:31 +0000 (15:12 +0100)]
Message:
ioports: Redid the DDR handling logic

Now supports an "external" simulation of a pullup/down, this
resets the outgoing IRQ for pins to a default that can be
specified.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3e8655cc49f9b30e73ee54283f0316bbcee74cd2
committer: Michel Pollet [Tue, 8 Oct 2013 17:34:23 +0000 (18:34 +0100)]
author: Michel Pollet [Tue, 8 Oct 2013 17:32:21 +0000 (18:32 +0100)]
Message:
fifo: Updated to latest version

This version was lagging quite a bit; this one has memory barriers, and
an updated write()

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 29006a10a93cfa5ed466b70b2f4875d7784176f6
author: Michel Pollet [Sun, 8 Sep 2013 17:44:29 +0000 (10:44 -0700)]
Message:
Merge pull request #24 from sealibora/master

cores: Added atmega32
Commit f3ea05cd7e5b5c3f48e2a27394d8fc2d5acadaf2
author: Tanel Külaots [Thu, 5 Sep 2013 18:54:44 +0000 (21:54 +0300)]
Message:
cores: Added atmega32
Commit 3bb82a30b8eaa3a6abc868b7ad5c1dbcd6ae7d88
committer: Michel Pollet [Thu, 5 Sep 2013 12:58:31 +0000 (13:58 +0100)]
author: Michel Pollet [Mon, 12 Aug 2013 10:32:55 +0000 (11:32 +0100)]
Message:
twi: Prototype support for slave mode

This is not working fully right now.

Also changed the MOSI/MISO names for the IRQ, as they make no sense when
using the master/slave TWI.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit ccb3592f51c9333b9332c59102c11eae61c973c0
committer: Michel Pollet [Thu, 5 Sep 2013 12:58:31 +0000 (13:58 +0100)]
author: Michel Pollet [Mon, 12 Aug 2013 10:31:57 +0000 (11:31 +0100)]
Message:
elf: Redone the symbol loader

Old symbol loader had been geared for the 'trace' functionality, and was
partitularly bad since it didnt know the size of the code it was
loading.

New version loads a (sorted) array of symbols, and let the firmware
loader code deal with the old 'codeline' array. The new loaded symbol
table can be used separately (board code can look into it).

Also changed the avr_symbol_t to inline the symbol name, instead of
using a separate pointer.

Signed-off-by: Michel Pollet <buserror@gmail.com>