log for f50fd384283ace5fc343ac6de39573b898dc346f
Commit f50fd384283ace5fc343ac6de39573b898dc346f
author: Doug Szumski [Sun, 10 Aug 2014 15:47:43 +0000 (17:47 +0200)]
Message:
parts: Bug fix for i2c_eeprom part

    Fixes:

    > Part address and mask weren't set in i2c_eeprom_init. The
      virtual part responded to all addresses.
    > Mask required inverting to function as per the description in
      i2c_eeprom.h
Commit 318d3ab8ea77206a97a46c740716d083cc5e149e
committer: Doug Szumski [Tue, 5 Aug 2014 11:01:12 +0000 (12:01 +0100)]
author: Doug Szumski [Tue, 5 Aug 2014 10:49:30 +0000 (11:49 +0100)]
Message:
examples: Added SSD1306 example board

atmega32_ssd1306.c  Example avr firmware
ssd1306.* SSD1306 avr driver
images.* simavr logo used in example firmware
ssd1306demo.c simavr demo for ssd1306 part
Commit b59997c36d5cec94732c17c04ab858c279731eaa
committer: Doug Szumski [Tue, 5 Aug 2014 10:59:45 +0000 (11:59 +0100)]
author: Doug Szumski [Tue, 5 Aug 2014 10:43:25 +0000 (11:43 +0100)]
Message:
parts: Added SSD1306 OLED driver virtual part
Commit d521cd88299123a15c143db5107c5f1fbf1d5272
author: Michel Pollet [Tue, 29 Apr 2014 09:22:56 +0000 (10:22 +0100)]
Message:
Merge pull request #73 from cardoe/rfa1-rfr2-pcint8

cores: Fix PCINT8 for ATmega128RFA1 and ATmega128RFR2
Commit bffb2e8ccbd919d058ed408ba67fbe441c17a70e
committer: Doug Goldstein [Sun, 27 Apr 2014 19:38:06 +0000 (14:38 -0500)]
author: Doug Goldstein [Sun, 27 Apr 2014 19:32:33 +0000 (14:32 -0500)]
Message:
cores: Fix PCINT8 for ATmega128RFA1 and ATmega128RFR2

PCINT8 was previously not setup. Per the spec sheet it is on Port E pin
0.
Commit 040a61240c8f1f337f9e4ffe588b2f3c03ee7287
author: Michel Pollet [Sun, 27 Apr 2014 18:34:48 +0000 (19:34 +0100)]
Message:
Merge pull request #72 from cardoe/rfr2

Support for ATmega128RFR2
Commit 0c791f0926afb12bdbfd7623b5058f8dd3e07167
committer: Doug Goldstein [Sun, 27 Apr 2014 18:15:59 +0000 (13:15 -0500)]
author: Doug Goldstein [Sun, 27 Apr 2014 16:00:10 +0000 (11:00 -0500)]
Message:
cores: RFA1/RFR2 don't have Port A and Port C

The ATmega128RFA1 and ATmega128RFR2 don't actually have Port A and Port
C as IO pins.
Commit 746051f3ef2dfc1b29541a6b763409209a025bd1
committer: Doug Goldstein [Sun, 27 Apr 2014 18:15:59 +0000 (13:15 -0500)]
author: Doug Goldstein [Sun, 27 Apr 2014 15:49:49 +0000 (10:49 -0500)]
Message:
cores: Add initial support for ATmega128RFR2

Add initial support for the ATmega128RFR2 which according to Atmel is a
drop in replacement for the ATmega128RFA1 however in real world testing
I have found this to not be entirely true. All of the changes (new
features) added to the R2 are not exposed with current simavr
peripherals so this file is identical to the A1 in simavr.
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 b0f3a7a4dfec451111884756ced67e1212ce0803
author: Michel Pollet [Sun, 27 Apr 2014 17:06:04 +0000 (18:06 +0100)]
Message:
Merge pull request #71 from bsekisser/master-core-fixes-reductions

sim_core: fixes and reductions
Commit 84e3bc67340c31113d30d29c30af09fe1d6eceb0
committer: bsekisser [Sat, 19 Apr 2014 13:13:08 +0000 (09:13 -0400)]
author: bsekisser [Sat, 19 Apr 2014 12:16:49 +0000 (08:16 -0400)]
Message:
sim_core: fixes and reductions

correct a few goofed up opcode descriptions.

get_d5 and get_r5: remove trailing slash on last macro line

add get_vd5: get_vd5 pulls in from get_d5 plus loads from register...
removes one definate instance of a possible double load, also
potentially removes double loads during tracing.

get_d5_b3 changed to get_vd5_b3: as all instances use the value of
reg d.  get_vd5_b3 pulls in from get_vd5.  reduces one definate
instance for potential of double loads and possibly reducing
the potential during tracing.

add get_vd5_b3_mask: two instances use b3 as a mask, get_vd5_b3_mask
pulls in from get_vd5_b3.

add get vh4_k8: get_vh4_k8 pulls in from get_h4_k8, removes the extra
line to pull in from the register...  removes possible double
load during tracing.

get_p2_k6 changed to get_vp2_k6: register load was moved into the macro
as both instances need the value loaded from the register pair.

add get_io5 and get_io5_b3mask: get io5_b3 and get_io5_b3mask pulls in
from get_io5...  most instances using get_io5_b3 take bit
number and use it as a mask, get_io5_b3mask does that by default.

get_o12: rcall and rjmp both left shift the value back before using
the offset...  the macro just calls for one less bit to be
shifted...  during trace we then make the extra shift as needed.

modified:   sim/sim_core.c
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