log for dbcd8541fdbdd487a0839c8bb8d5ebf387b9c9dd
Commit dbcd8541fdbdd487a0839c8bb8d5ebf387b9c9dd
author: Michel Pollet [Wed, 10 Jun 2015 20:00:02 +0000 (21:00 +0100)]
Message:
adc: Removed spurious trace

Accidentally commited this earlier

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 043f79cc556f6e523bbe33d434947e1c83a4dd74
author: Michel Pollet [Wed, 10 Jun 2015 16:03:44 +0000 (17:03 +0100)]
Message:
arduidiot: Further pinout tweaks for 256's

Endless tweaks

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit ddafbdb1e74ac6f7e8a3137482bf955cff354115
author: Michel Pollet [Tue, 9 Jun 2015 13:56:37 +0000 (14:56 +0100)]
Message:
twi: Always release STOP bit

Seems some libraries assume this bit will autoclear, even if
the stop condition was not really called for.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 2115307075df8d8079521121563192028a64f4ee
author: Michel Pollet [Tue, 2 Jun 2015 20:21:08 +0000 (21:21 +0100)]
Message:
adc: bit of reformating

No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit f16e6f7f04100cd91425d23b264e9622c7e12e3f
author: Michel Pollet [Tue, 2 Jun 2015 15:36:37 +0000 (16:36 +0100)]
Message:
shared: Some more tweaks to arduidiot_pins

Added remaining 2560 pins

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit df49c4044949ebff93a6f5c0b1a8be9abfb3d35b
author: Michel Pollet [Sat, 30 May 2015 09:16:26 +0000 (10:16 +0100)]
Message:
Small reformat of long lines

New screen format..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit cfb35b24edf684232d1773e30a8e49d42df46195
author: Michel Pollet [Sat, 30 May 2015 09:15:41 +0000 (10:15 +0100)]
Message:
simavr: Fixed mega250 pinouts for arduidiots

Referenced their headers

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 217a697ebfd99e5b871bcd0bf4b209ec268d7829
author: Michel Pollet [Fri, 29 May 2015 20:40:57 +0000 (21:40 +0100)]
Message:
uart_pty: Added a flush timer

Makes sure the FIFO gets a chance to be cleared after a XOFF

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4a84ef4f00c9dc9d9fffd09f0ea41b7d3bcc2d4f
author: Michel Pollet [Fri, 29 May 2015 20:40:19 +0000 (21:40 +0100)]
Message:
arduidiot_pins: Added mega2560

And added a few utilitarian macros.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit a738c10be7af55ceab73a4ad0367194549af7356
author: Michel Pollet [Tue, 14 Apr 2015 20:02:57 +0000 (21:02 +0100)]
Message:
Merge commit '74a05db0b65e1f2e583b8f015814976572f332a5'
Commit 74a05db0b65e1f2e583b8f015814976572f332a5
author: Michel Pollet [Thu, 9 Apr 2015 20:29:19 +0000 (21:29 +0100)]
Message:
lin: Don't reset regs at init time

the reset handler does it

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3c2839b50928e0abe64db218b5b077b799624fd1
author: Michel Pollet [Thu, 9 Apr 2015 20:28:51 +0000 (21:28 +0100)]
Message:
lin: Checked a divide by zero condition

As it turn out, static analizer doesn't know lbt is >= 8. Added a
comment there all same for anyon else reading this.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit e86d9e52075e2edd37fe497b0d11a2df3fd1df31
author: Michel Pollet [Thu, 9 Apr 2015 20:27:56 +0000 (21:27 +0100)]
Message:
ioport: Don't deref NULL on bad param

that ioctl requires a parameter, but doesn't check it. Static analyzer
doesn't like that at all.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0f6f5c45078ead21ae142b034f09f1efaee37817
author: Michel Pollet [Wed, 8 Apr 2015 08:51:18 +0000 (09:51 +0100)]
Message:
Merge pull request #96 from bsekisser/bsekisser-master-core-remove-bclr-bset

core: Removal of duplicate code...
Commit 33c47992026357e1c48540f6009a904e4da0f363
author: Michel Pollet [Mon, 16 Feb 2015 21:05:33 +0000 (21:05 +0000)]
Message:
Merge pull request #110 from cskarai/fix-optiboot-watchdog

Optiboot bootloader unintentionally enables watchdog
Commit f73a44a589953482ad704f3e8dd5d08599e47c4e
author: Michel Pollet [Mon, 16 Feb 2015 21:05:04 +0000 (21:05 +0000)]
Message:
Merge pull request #114 from xqms/atmega2560_uart3

Support IO register addresses >= 256
Commit dfd97a7a7d9f8d1de1716f84174212c3760493e4
committer: Max Schwarz [Fri, 6 Feb 2015 00:06:04 +0000 (01:06 +0100)]
author: Max Schwarz [Thu, 5 Feb 2015 22:26:45 +0000 (23:26 +0100)]
Message:
sim_avr.h: increase MAX_IOs by one to 280

ATmega2560 has UDR0 at 0x136 = 310
Commit f4d247822cc09a3be6e4b5ac032313f23372128a
committer: Max Schwarz [Fri, 6 Feb 2015 00:06:04 +0000 (01:06 +0100)]
author: Max Schwarz [Thu, 5 Feb 2015 22:18:26 +0000 (23:18 +0100)]
Message:
sim_core + sim_regbit: use 16 bit integers for IO addresses

This is necessary on the larger ATmegas (e.g. ATmega2560).
Commit 62db05d8ec93d990209b1595b427e2f0dc208ead
committer: Max Schwarz [Thu, 5 Feb 2015 23:57:41 +0000 (00:57 +0100)]
author: Max Schwarz [Thu, 5 Feb 2015 22:17:25 +0000 (23:17 +0100)]
Message:
sim_core: don't hardcode max io register address, use MAX_IOs
Commit 7d47dbc73f68ad413fe661a0e88f19c0e8e5df70
committer: Max Schwarz [Thu, 5 Feb 2015 23:57:41 +0000 (00:57 +0100)]
author: Max Schwarz [Thu, 5 Feb 2015 23:56:56 +0000 (00:56 +0100)]
Message:
add unit test for UART3 echo on ATmega2560

This fails currently because IO addresses >= 256 are not handled correctly
in the core.
Commit 1e50f3c6d6bd381602bf3e72b986c3454a1f0d43
author: Michel Pollet [Mon, 19 Jan 2015 18:33:17 +0000 (18:33 +0000)]
Message:
Merge pull request #112 from cskarai/fix-timer-ocra-top

Reconfigure fast pwm timer at OCRA write  if OCRA is the top
Commit 275353445c0a16086db9c66cfe8f55b97c6f0cdc
author: Michel Pollet [Mon, 19 Jan 2015 18:32:40 +0000 (18:32 +0000)]
Message:
Merge pull request #111 from cskarai/fix-adc-adate

Implemented: ADC free running mode
Commit 948bbf97657d91dfac0a8d899e378f29abcdf9b5
author: cskarai [Wed, 7 Jan 2015 22:21:23 +0000 (23:21 +0100)]
Message:
Reconfigure fast pwm timer at OCRA write  if OCRA is the top
Commit 37ce96c3d2d68b1216179fe5e5466c920faef1fd
author: cskarai [Wed, 7 Jan 2015 19:39:47 +0000 (20:39 +0100)]
Message:
Fixed: issue with indentation
Commit 70cd616a05fe8333827d569cd5843c81105b8559
author: cskarai [Tue, 6 Jan 2015 21:13:40 +0000 (22:13 +0100)]
Message:
Added: free_running autotrigger mode
Commit 8636d5ec8b8c66a1d46dc87681e66df5e5b452d9
author: cskarai [Tue, 6 Jan 2015 20:32:01 +0000 (21:32 +0100)]
Message:
Added: ADC trigger sources
Commit 91259f9096689f9caac0faa4c23ca132082b12b6
committer: cskarai [Mon, 5 Jan 2015 18:36:36 +0000 (19:36 +0100)]
author: Karai Csaba [Sun, 4 Jan 2015 09:15:35 +0000 (10:15 +0100)]
Message:
Fixed: optiboot issue, watchdog is unintentionally enabled
Commit 81b78e08b96c795fa8bce83523526c6b09f822b5
author: Michel Pollet [Wed, 19 Nov 2014 09:23:43 +0000 (09:23 +0000)]
Message:
Merge pull request #101 from dougszumski/mx_core_add_extint

cores: Adds missing external interrupt for m16/m32
Commit 89763e57eb96b72be486b0db6fb37730329b9bbc
author: Michel Pollet [Wed, 5 Nov 2014 08:04:14 +0000 (08:04 +0000)]
Message:
Merge pull request #103 from distributed/dispatch

sim_io: do not overwrite _avr_io_mux_write in avr_register_io_write
Commit 495d2a92b956618bc17e7844d4643e6b6c177dcc
author: Michael Meier [Mon, 3 Nov 2014 20:37:22 +0000 (21:37 +0100)]
Message:
do not overwrite _avr_io_mux_write in avr_register_io_write
Commit d964ebc6a7fe5bc43c1b83daff2246c97632b220
author: Michel Pollet [Fri, 31 Oct 2014 20:44:46 +0000 (20:44 +0000)]
Message:
Merge pull request #98 from bsekisser/bsekisser-watchdog-software-reset

watchdog: reworked to add support for software reset.
Commit a10d508fb1a7d9394fbab16082be56eead3ad81b
committer: bsekisser [Fri, 31 Oct 2014 12:47:23 +0000 (08:47 -0400)]
author: bsekisser [Mon, 20 Oct 2014 07:48:55 +0000 (03:48 -0400)]
Message:
watchdog: reworked to add support for software reset.

support for software reset due to watchdog timeout...
based on watchdog documentation.

modified:   sim/sim_avr.c
modifications to avr_reset and avr_init to support software
reset.

modified:   sim/sim_avr.h
added type avr_run_t...
avr_t.run updated accordingly.

modified:   sim/avr_watchdog.c
largely rewritten to support software reset.

modified:   sim/avr_watchdog.h
data record 'reset_context' added to support software reset

modified:   sim/sim_regbit.h
added: avr_regbit_from_value
for checking flags before commiting register value.
added: avr_regbit_set_array_from_value
reverse operation of avr_regbit_get_array
Commit d85051ad32b13e26be2e5813c657147ca1a36eba
author: Michel Pollet [Thu, 30 Oct 2014 15:12:41 +0000 (15:12 +0000)]
Message:
Merge pull request #95 from bsekisser/master-core-run-many-limited-interrupt-state

interrupts: modify handling of interrupt state
Commit f9cb085cd1f9a96405971a909ffa29d6b534d026
committer: Doug Szumski [Fri, 24 Oct 2014 09:18:12 +0000 (11:18 +0200)]
author: Doug Szumski [Tue, 21 Oct 2014 20:14:48 +0000 (22:14 +0200)]
Message:
cores: Adds missing external interrupt for m16/m32

 > Async external interrupt (INT2) was missing on m16/32. Since unlike the others
   this interrupt uses only 1 bit for sense control avr_extint.* were modified to
   support this new mode.
Commit 5e6256ae3c88c2a672d570ff1baf22d7142f5740
committer: bsekisser [Wed, 22 Oct 2014 22:47:27 +0000 (18:47 -0400)]
author: bsekisser [Wed, 17 Sep 2014 19:31:38 +0000 (15:31 -0400)]
Message:
interrupts: modify handling of interrupt state

Interrupt state edge detection and wait states combined into multi
function variable, enabling the removal of edge detection
code in the run loop and simplifying need to service interrupts
by placing the burden on code directly influencing the interrupt
handling state.

modified:   simavr/sim/sim_avr.c
edge detection code removed from both run loops.
raw (non-gdb) loop does precheck of interrupt state, while not
necessary, potentially saving a few cycles.

modified:   simavr/sim/sim_avr.h
uint8_t i_shadow changed to int8_t interrupt_state.

modified:   simavr/sim/sim_core.c
flag changes which may impact interrupt state are routed
through avr_sreg_set().
multi-cycle loop simplified to check avr->interrupt_state.

modified:   simavr/sim/sim_core.h
static inline avr_sreg_set() - handles changes to global
interrupt state and ensures wait states if I
flag changes from 0 -> 1.  superfluous 1 -> 1
states are ignored, should they occur. and
disabling interrupts clears avr->interrupt_state.
flag changes from SET_SREG_FROM routed to avr_sreg_set();

modified:   simavr/sim/sim_interrupts.c
avr_interrupt_reset()
interrupt_state cleared during reset.
avr_raise_intrrupt()
check interrupts enabled and no pending
interrupt_state before marking pending interrupt state.
avr_service_interrupts()
servicing code changed to tick pending wait state then
mark for any pending interrupts or set to zero
if none waiting.
on interrupt, direct interrupt state change to
avr_sreg_set();

modified:   simavr/sim/sim_interrupts.h
remove pending_wait.

modified:   tests/tests.c
interrupt edge dectection code removed from test run loop.
no further modifications required.

modified:   simavr/sim/sim_avr.c
modified:   simavr/sim/sim_avr.h
modified:   simavr/sim/sim_core.c
modified:   simavr/sim/sim_core.h
modified:   simavr/sim/sim_interrupts.c
modified:   simavr/sim/sim_interrupts.h
modified:   tests/tests.c
Commit 0428233dbfec25fe56a8189b2e8f7e6fb61189ff
author: Michel Pollet [Mon, 20 Oct 2014 20:54:13 +0000 (21:54 +0100)]
Message:
Merge pull request #100 from bsekisser/bsekisser-cores-spi-declare

cores: add spi declaration
Commit 4025318a43375f03600d12582bf451c02213ffa9
author: Michel Pollet [Mon, 20 Oct 2014 20:53:53 +0000 (21:53 +0100)]
Message:
Merge pull request #99 from bsekisser/bsekisser-cores-ioport-declare

cores: AVR_IOPORT_DECLARE
Commit e175b0fd73521fd7acea6267bfe023a407f31da4
committer: bsekisser [Mon, 20 Oct 2014 18:29:00 +0000 (14:29 -0400)]
author: bsekisser [Mon, 20 Oct 2014 18:06:49 +0000 (14:06 -0400)]
Message:
cores: add spi declaration

convert spi structure definitions to AVR_SPI_DECLARE

modified:   simavr/cores/sim_90usb162.c
modified:   simavr/cores/sim_mega128.c
modified:   simavr/cores/sim_mega1280.c
modified:   simavr/cores/sim_mega1281.c
modified:   simavr/cores/sim_mega128rfr2.c
modified:   simavr/cores/sim_mega169.c
modified:   simavr/cores/sim_mega2560.c
modified:   simavr/cores/sim_megax.h
modified:   simavr/cores/sim_megax4.h
modified:   simavr/cores/sim_megax8.h
modified:   simavr/cores/sim_megaxm1.h
modified:   simavr/sim/avr_spi.h
Commit 4bcb2928292b02f41ce989b113bd97d8c0b5d861
author: bsekisser [Mon, 20 Oct 2014 15:34:16 +0000 (11:34 -0400)]
Message:
cores: AVR_IOPORT_DECLARE

convert port sructure declarations to macro AVR_IOPORT_DECLARE.

modified:   simavr/cores/sim_90usb162.c
modified:   simavr/cores/sim_mega128.c
modified:   simavr/cores/sim_mega1280.c
modified:   simavr/cores/sim_mega1281.c
modified:   simavr/cores/sim_mega128rfa1.c
modified:   simavr/cores/sim_mega128rfr2.c
modified:   simavr/cores/sim_mega169.c
modified:   simavr/cores/sim_mega2560.c
modified:   simavr/cores/sim_megax.h
modified:   simavr/cores/sim_tiny2313.c
modified:   simavr/sim/avr_ioport.h
Commit 709a87bb91ba11c52ad83de3554522664f928d02
author: bsekisser [Fri, 17 Oct 2014 12:29:55 +0000 (08:29 -0400)]
Message:
core: Removal of duplicate code...

core contains two functionally equivalent blocks of code...  implimenting
cl?, se? and bclr, bset.   During operation the case code for
bclr and bset never get called, but as stated does not matter since
code at the top of the block performs the EXACT same function.
technically... using the case code SHOULD be the better performing
option...  at the moment though, neither one seems to exhibiting
any advantage over the other.

modified:   simavr/sim/sim_core.c
Commit 1a503bdcd0cc22a4f6b1149f6d63d1dc895fd5d4
author: Michel Pollet [Tue, 14 Oct 2014 17:53:10 +0000 (18:53 +0100)]
Message:
tests: Fix makefile

Was using ${OBJ} before it was declared.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 93b1468d25acc10a3409a75a8aaaca22302e0d52
author: Michel Pollet [Tue, 14 Oct 2014 17:51:26 +0000 (18:51 +0100)]
Message:
build: fix build of libsimavr.so

Was being linked with itself. Newer gcc are not amused.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit b5cdf931f2305dbddc4008879f81e1a3cb4c74ed
committer: Michel Pollet [Tue, 14 Oct 2014 17:44:48 +0000 (18:44 +0100)]
author: Michel Pollet [Tue, 14 Oct 2014 17:44:24 +0000 (18:44 +0100)]
Message:
build: re-accelerated the build

Simavr used to build pretty quick, and it's been crawling for a while
now, turns out some of the enhancements we added to the SIMAVR path
detection were being evaluated a LOT.
So went to the makefile and made sure most of the static variables are
evaluated once only.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit eb45f55a54cdd31cb12a778d7b6baebe032287a2
author: Michel Pollet [Tue, 14 Oct 2014 17:39:22 +0000 (18:39 +0100)]
Message:
Merge pull request #94 from hedrok/master

Timer simulation fixes and improvements
Commit 59720c375151cc4cedd3487bb826f47b19b59e58
author: Michel Pollet [Tue, 14 Oct 2014 17:37:10 +0000 (18:37 +0100)]
Message:
Merge pull request #92 from cyrozap/master

Fix the issue where Intel HEX files with hex strings longer than 32 bytes would be truncated
Commit aba71d87d60b9d94456da63f8e1c2f98d526f01a
author: Michel Pollet [Tue, 14 Oct 2014 17:35:41 +0000 (18:35 +0100)]
Message:
Merge pull request #83 from bsekisser/master-core-run-many-limited

Changes to allow for free run in core between cycle timers
Commit acdad6ef0a02b502f286a3f2995b1b8b4aba0628
author: Michel Pollet [Tue, 14 Oct 2014 17:34:22 +0000 (18:34 +0100)]
Message:
Merge pull request #82 from dougszumski/i2c_test_extension

examples: Extends i2ctest to include a second TWI driver
Commit a8c5b5a9e3b3461e04c793c56359c358e8efd607
committer: Kyrylo Yatsenko [Tue, 14 Oct 2014 16:43:59 +0000 (19:43 +0300)]
author: Kyrylo Yatsenko [Tue, 14 Oct 2014 13:49:12 +0000 (16:49 +0300)]
Message:
Enhance emulation of PWM mode

- Clear/set output pin on TOP when OCRnX is in clear/set mode,
  previously it was changed only on TCNT=OCRnX
- Call PWM irq for OCRnB even when TOP is OCRnA
Commit 72048849474c59a70f1148dd41c6f4be9a36a02d
committer: Kyrylo Yatsenko [Tue, 14 Oct 2014 13:47:25 +0000 (16:47 +0300)]
author: Kyrylo Yatsenko [Tue, 14 Oct 2014 13:35:38 +0000 (16:35 +0300)]
Message:
Fixes in avr_timer_reconfigure after refactoring

Several fixes after fcce7868a2fe2ef028b7f6c1741a12380b82a9cc:
- Remove zeroing of mode in which erased mode
  seleced in avr_timer_write
- Fix wrong brackets in ?: in avr_timer_wgm_pwm mode
Commit 22bcf1c3ea1eb2879d8f2271bb372acc8b14adda
author: cyrozap [Tue, 14 Oct 2014 04:57:11 +0000 (00:57 -0400)]
Message:
sim_hex: Only decrement maxlen in read_hex_string when a byte is added to the array

Without this fix, the output to the buffer would be limited to maxlen/2 bytes
instead of maxlen. It is obvious from the implementation that the latter
behavior is the expected one, so the function has been altered to reflect that.
Commit a8765fece3c681fb7fc8f00869c4f3c9993beaf7
author: Michel Pollet [Tue, 23 Sep 2014 13:05:33 +0000 (14:05 +0100)]
Message:
Merge pull request #88 from anthony-morel/master

fifo: prevent potential misuse of _get_write_size()
Commit d627c8d7a179684fed0ce0e34684fa4e2f9a8806
author: Anthony Morel [Thu, 18 Sep 2014 18:39:53 +0000 (19:39 +0100)]
Message:
fifo: prevent potential misuse of _get_write_size()

Using the number obtained from _get_write_size() and writing that many
items to the fifo yields to _isempty() becoming true and not to
_isfull() becoming true.

I got caught assuming the latter.

To avoid thinking about edge cases and prevent potential misuse of
_get_write_size(), I suggest that it returns one unit less, thus, a
number between 0 and (fifo_size-1).  E.g., if there is only one place
left in the fifo, i.e., _isfull() is true, it then returns 0, preventing
us to fill that place and get into a wrap overflow situation.

(Michel: Thanks for the great architecture you laid out and the great
code.)
Commit 3c5e1ae3f560ba1568da247f4e835206ff12a264
committer: bsekisser [Mon, 15 Sep 2014 20:22:24 +0000 (16:22 -0400)]
author: bsekisser [Tue, 9 Sep 2014 21:53:56 +0000 (17:53 -0400)]
Message:
Changes to allow for free run in core between cycle timers
 with per interval limiting.

Average cycle times drop by about upwards of 50-60+ cycles per emulated cycle,
dependant on usage.

sim_avr.h: struct avr_t changed.
added members run_cycle_count and run_cycle_limit.
run_cycle_count is number of cycles till next cycle timer.
run_cycle_limit is maximum number of cycles to run per interval.

sim_core.c: avr_run_one
* run_one_again label added at top.
* clause added at end which loops to run_one_again given that the core
is still in a cpu_Running state, run_cycle_count is greater than
cycles, and no interrups are pending.

sim_cycle_timers.c:
* static avr_cycle_timer_return_sleep_run_cycles_limited() added.
run_cycle_count is bounded to run_cycle_limit.
returns sleep count unbounded, preserving original behavior.

* static avr_cycle_timer_reset_sleep_run_cycles_limited() added.
sets new run_cycle_count based on present list of cycle timers.

* avr_cycle_timer_reset() changed.
run_cycle_count and run_cycle_limit is set to default values.

* avr_cycle_timer_register() changed.
* avr_cycle_timer_cancel() changed.
* avr_cycle_timer_process() changed.
call the relevant function to set/maintain run_cycle_count.

modified:   simavr/sim/sim_avr.c
modified:   simavr/sim/sim_avr.h
modified:   simavr/sim/sim_cycle_timers.c
Commit 2190f69580c71bc715a9dd24c27ebcd81d53b29b
committer: Doug Szumski [Thu, 4 Sep 2014 21:55:11 +0000 (23:55 +0200)]
author: Doug Szumski [Thu, 4 Sep 2014 20:54:25 +0000 (22:54 +0200)]
Message:
examples: Extends i2ctest to include a second TWI driver

Adds a commonly used alternative to the Atmel TWI driver. This
particular driver is choosen because it covers a non-interrupt
driven approach to using the TWI module.
Commit a0f2f927ea96cc951d2cf4e54f16059d9271f53f
author: Michel Pollet [Sat, 23 Aug 2014 11:46:40 +0000 (12:46 +0100)]
Message:
Merge pull request #81 from dougszumski/ssd1306_demo

examples: Removed unused code in ssd1306 demo
Commit 9cea3eddd8fbc0f2212f8902e9ffaf25385424b1
author: Michel Pollet [Sat, 23 Aug 2014 11:46:13 +0000 (12:46 +0100)]
Message:
Merge pull request #80 from dougszumski/avr_twi_bugfix

twi: Clear TWSTO bit after STOP condition transmitted
Commit cae609394fbae4427956a1a3a16f0e5ed032f24b
author: Doug Szumski [Tue, 19 Aug 2014 19:26:00 +0000 (21:26 +0200)]
Message:
examples: Removed unused code in ssd1306 demo
Commit 301121cce45e4db4c1d0e66d16dc42cb1246e36b
author: Doug Szumski [Sat, 16 Aug 2014 13:15:58 +0000 (15:15 +0200)]
Message:
twi: Clear TWSTO bit after STOP condition transmitted

> This change fixes a problem where a TWI driver polling the
  TWSTO bit would run on the real device but not simavr.

> More detail in for example p188 of the ATMega32A datasheet
  (rev 815D-AVR-10/2013).
Commit 0303c2421894209a56859b95b3dbcd20467d3f75
author: Michel Pollet [Thu, 14 Aug 2014 15:01:27 +0000 (16:01 +0100)]
Message:
Merge pull request #78 from dougszumski/i2c_eeprom_bugfix

parts: Bug fix for i2c_eeprom part
Commit 7704ffecff6cb223aff0d309260e12cc73f8dbda
committer: Michel Pollet [Wed, 13 Aug 2014 22:13:39 +0000 (23:13 +0100)]
author: Michel Pollet [Wed, 13 Aug 2014 22:13:04 +0000 (23:13 +0100)]
Message:
cores; 128rfr2, tiny84 and megax8, temp fix for bad arv-libc headers

Temporary, to make the build work. Seems the latest avr-libc in debian
is rather mangled.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 242ec6c14416147e73b95ebc17ed0a67f934fa1c
committer: Michel Pollet [Wed, 13 Aug 2014 22:13:39 +0000 (23:13 +0100)]
author: Michel Pollet [Wed, 13 Aug 2014 22:11:26 +0000 (23:11 +0100)]
Message:
Makefile: fix for OSX bash variable substitution

This was generating a bad config file

Signed-off-by: Michel Pollet <buserror@gmail.com>
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 2c267cdb38b6adf013df65cf1ecb6fc623c75879
author: Michel Pollet [Thu, 7 Aug 2014 11:31:43 +0000 (12:31 +0100)]
Message:
Merge pull request #57 from bsekisser/avr-timer-as2-cs-mode

avr_timer: refactor avr_timer_write and avr_timer_reconfigure
Commit 5fb87ee82abcc31d9bb5f657cd39c30245b7c5dc
author: Michel Pollet [Tue, 5 Aug 2014 12:05:51 +0000 (13:05 +0100)]
Message:
Merge pull request #77 from dougszumski/ssd1306_demo

New part & example for a SSD1306 OLED driver
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 fcce7868a2fe2ef028b7f6c1741a12380b82a9cc
committer: bsekisser [Sat, 2 Aug 2014 21:07:57 +0000 (17:07 -0400)]
author: bsekisser [Tue, 4 Mar 2014 21:50:20 +0000 (16:50 -0500)]
Message:
avr_timer: refactor avr_timer_write and avr_timer_reconfigure

avr_timer_reconfigure: calculations moved back in call chain to
 avr_timer_write.

avr_timer_configure: use data processed in avr_timer_write.

avr_timer_init: changed to fully trap writes going to as2,
 clock select bits and waveform generation mode bits.

modified:   ../../simavr/sim/avr_timer.c
modified:   ../../simavr/sim/avr_timer.h

avr_timer: remove as2 timer check.

modified:   avr_timer.c
Commit bdeef1ca24ac3df5f43b11fceac4557e9053eec2
author: Michel Pollet [Sat, 2 Aug 2014 08:15:06 +0000 (09:15 +0100)]
Message:
Merge pull request #70 from cardoe/flash-fix

flash: Add support for TEMPPAGE writing.
Commit 81a4e18cc00700a34243907ddd08d79b682f174e
author: Michel Pollet [Sat, 7 Jun 2014 19:40:31 +0000 (20:40 +0100)]
Message:
Update README.md

Lots of cores were missing in the readme
Commit 1be487742be6b9f811f032611ddde54a5de53883 v1.2
author: Jakob Gruber [Tue, 20 May 2014 08:38:04 +0000 (10:38 +0200)]
Message:
make: Link libelf in libsimavr.so.1 target

The build (sometimes) fails if libsimavr.so.1 is not linked with
libelf (see https://bugs.archlinux.org/task/40309).
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 e6476edb26cb403eed6365601b8a33abcfe41b9d
committer: Doug Goldstein [Sun, 27 Apr 2014 19:35:18 +0000 (14:35 -0500)]
author: Jonathan Creekmore [Thu, 6 Mar 2014 15:41:40 +0000 (09:41 -0600)]
Message:
flash: Add support for TEMPPAGE writing.

The proper way to write to flash on the AVR is to write
to the temp page and then write that temp page to flash.
This allows cancellation with the RWWSRE bit for clearing
out the temp page without writing it to flash.

This fixed a bug where the RWWSRE bit was being set in a
command, but the flash driver was improperly writing whatever
was in r0/r1 to the first address in the page, overwriting
what was already there. In reality, the code running on the
core was trying to just flush the temp page or unlock the read
while write section.
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.