log for f4a6e39f66bc52db512cdb8fc9541251d43e0346
Commit f4a6e39f66bc52db512cdb8fc9541251d43e0346
author: TheCrazyT [Mon, 17 Aug 2015 16:21:47 +0000 (18:21 +0200)]
Message:
Merge pull request #1 from dougszumski/twi_delay_fix

twi: Remove start condition delay
Commit 6e6a04b2fa2c16099b8eb6365fa6915340dfb2a6
author: Michel Pollet [Tue, 28 Jul 2015 08:26:58 +0000 (09:26 +0100)]
Message:
Merge pull request #126 from ddaygold/typo

Fixed a typo in the manual
Commit 508c2ad011511cd128c51bad743c75a071abddf6
author: Peter Chinetti [Sun, 26 Jul 2015 21:45:58 +0000 (17:45 -0400)]
Message:
Fixed a typo in the manual
Commit 870409e33a54c13a6f79b6dc57e53852cf94440f
author: Michel Pollet [Wed, 22 Jul 2015 07:06:55 +0000 (08:06 +0100)]
Message:
Merge pull request #124 from frej/enable-adc-for-atiny13

cores: Add ADC to the ATtiny13
Commit e181f0e2b94c9c352100aa7a6aa851d66072a86e
committer: Frej Drejhammar [Sun, 19 Jul 2015 13:01:48 +0000 (15:01 +0200)]
author: Frej Drejhammar [Sun, 19 Jul 2015 12:58:31 +0000 (14:58 +0200)]
Message:
cores: Add ADC to the ATtiny13
Commit 2f88e72135a66727ff51e7bc5f93f87c8096cf9c
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 09:43:45 +0000 (10:43 +0100)]
Message:
gdb: Cleanup

Also make sure we mask of only 24 bits of the address, newer gdb use one
somehow..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit b64300059875cfd053f321226348b340c5de97dc
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 09:42:50 +0000 (10:42 +0100)]
Message:
cores: Added TIMER2_COMPB to m2560

This was commented out, dunno why..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 95638c32fb24c716668443dcfa17454355ef3708
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Tue, 16 Jun 2015 18:06:10 +0000 (19:06 +0100)]
Message:
ihex: Streamlined implementation

Use ihex_read_chunk to implement ihex_read_file, and add a
ihex_free_chuncks for consistency sake

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit a865759ce131dd4829e77416a9f08c008f85aa0c
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Tue, 16 Jun 2015 18:05:21 +0000 (19:05 +0100)]
Message:
avr: Add a 'reset pc' that can be nonzero

This allows the AVR to soft reset into the bootloader for example.

A watchdog reset will re-run the bootloader with the correct flag.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit f4f3b71bb02d6a0c6755f392ed2c4fa3b6eb6d99
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Tue, 16 Jun 2015 18:04:19 +0000 (19:04 +0100)]
Message:
watchdog: Some cleanup

No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4a03f8606671e904845194ebf2edfc69b536820b
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 12:23:10 +0000 (13:23 +0100)]
Message:
hex: Supports offsets larger then 64/128KB

New segemnt type for loading atmega2560 bootloaders

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0eefa6bf3c57f71257d85813241aac994297a19c
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 10:50:00 +0000 (11:50 +0100)]
Message:
simduino: Simplified, made compatible with m2560

Allow testing on atmega256 bootloader too.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 9ad0d2655a71a0292f0c92e3060ddc5e4f327af1
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 10:48:54 +0000 (11:48 +0100)]
Message:
avr: Renamed special_* core fields

Added a 'custom' sub struct

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit b702ace2e408e2ace0b2ae61ba17eb06840cf038
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sun, 14 Jun 2015 10:42:10 +0000 (11:42 +0100)]
Message:
Whitespaces at end of line removed..

Dunno how these came to be..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 49ccc009a9fe0eddee01a3df4eec89d426bede3c
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sat, 13 Jun 2015 20:27:35 +0000 (21:27 +0100)]
Message:
elf: Detect start address (for bootloaders)

Allows loading a bootloader ELF as well as .hex with the right starting
PC

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 6b0218ffb89bcba0e31fcfab73d5170eef794c1e
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Sat, 13 Jun 2015 20:26:50 +0000 (21:26 +0100)]
Message:
vcd: Prevent crash when close() is called twice

flahs() wasn't checking for a valid file pointer

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3a4fab8b693e4afca6e3b83ff7afc9e15bc56358
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Wed, 10 Jun 2015 20:06:15 +0000 (21:06 +0100)]
Message:
interrupts: Redone the logic of delivery

Simplified a few expressions

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit e4b36b58d22d22da62a0bcd95755f7454df411cb
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Wed, 10 Jun 2015 20:05:50 +0000 (21:05 +0100)]
Message:
interrupts: Now track pending and running states

Introduced two new IRQs  per vector; one to track pending, and one to
track running state. So you can see any latency issues.
Also introduced a global pending/running IRQ, so you can track issues if
your interrupts overrun etc.

It is reasonably transparent, and seems to have had little impact on the
rest of the code... Hooray for nice clean APIs!

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 02257499e62b4b5b5eb7a1652489910caf166e7b
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Wed, 10 Jun 2015 20:01:26 +0000 (21:01 +0100)]
Message:
vcd: Increased limits

Turns out it's easy to reach 32 if you try hard enough!

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 871d22206df3a9aa47d888f88edc7dc784f12ad6
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
author: Michel Pollet [Wed, 10 Jun 2015 20:00:38 +0000 (21:00 +0100)]
Message:
twi: Revert to NO_STATE after a stop

Otherwise the interrupt might get re-triggered

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 01956ebee35cb81f4814003a3bf981c46ed6f93a
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 400f588b041787347d2cb97e7026774d709ea35f
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 6d4c0283ee49a724d3294b142b671fdf6978c564
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 cb020ec7c820dfafea3026f6146e8b95d05d540c
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 e6a640f340dd07f3e34002f8efea3c1ffb280026
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 05dd87406cd48e83227a53a6ccaa24476e22c27a
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 fb4bcf5bebaefa7e2c1b5ee6d1ce4d3fc5afe828
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 34fa73c4851fe59dc165aceafc36b2e791274e1a
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:54 +0000 (19:02 +0100)]
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 99e7355f60a14e413d5d9c2e8f9b7f6735737911
committer: Michel Pollet [Thu, 2 Jul 2015 18:02:53 +0000 (19:02 +0100)]
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 41e6de82039367d9accff3e53948f40752c07163
author: Michel Pollet [Fri, 29 May 2015 20:36:26 +0000 (21:36 +0100)]
Message:
Merge pull request #121 from guyzmo/improved_osx_support

added support for MacOSX homebrew
Commit acd6232d387d87a39f10143f819d0106c0020b6e
committer: Bernard `Guyzmo` Pratz [Fri, 29 May 2015 20:26:59 +0000 (21:26 +0100)]
author: Bernard `Guyzmo` Pratz [Fri, 29 May 2015 19:46:33 +0000 (20:46 +0100)]
Message:
added support for MacOSX homebrew

Signed-off-by: Bernard `Guyzmo` Pratz <guyzmo+github@m0g.net>
Commit 8075bc3a89bd1eec23a913ffe0c14b715f870251
author: Michel Pollet [Mon, 18 May 2015 09:20:13 +0000 (10:20 +0100)]
Message:
Merge pull request #120 from frej/avoid-buffer-overrun

Avoid buffer overrun on smaller AVRs
Commit f4a289091ee226cb9a323e2b2796ba706c2fc149
committer: Frej Drejhammar [Sun, 17 May 2015 15:10:22 +0000 (17:10 +0200)]
author: Frej Drejhammar [Sun, 17 May 2015 14:34:49 +0000 (16:34 +0200)]
Message:
Avoid buffer overrun on smaller AVRs

On smaller AVRs, such as the attiny13, MAX_IOs will be larger than the
size of SRAM which will lead to out of range writes to a malloc
allocated buffer. Therefore limit the number of bytes cleared to the
size of SRAM.
Commit f1e25444a7b407f46107320953fc85048b744d31
author: Michel Pollet [Mon, 27 Apr 2015 07:45:27 +0000 (08:45 +0100)]
Message:
Merge pull request #119 from bsekisser/bsekisser-adc-initfix

adc: check r_adcsrb is valid before init
Commit f65ac1a207cc940757cd33dc05346adb7a9c60b9
committer: bsekisser [Sun, 26 Apr 2015 12:42:30 +0000 (08:42 -0400)]
author: bsekisser [Sun, 26 Apr 2015 12:34:36 +0000 (08:34 -0400)]
Message:
adc: check r_adcsrb is valid before init

fix issue #118

modified:   simavr/sim/avr_adc.c
Commit 1f3f065461e974584be4d42f33f5a2789cf0d3d4
author: Michel Pollet [Wed, 22 Apr 2015 08:35:36 +0000 (09:35 +0100)]
Message:
Merge pull request #117 from bsekisser/bsekisser-flash-writefix

flash: be sure to use current page for writing
Commit 77e3f7846e0ff3c1e1f61f20bcda39a29c671b10
committer: bsekisser [Sat, 18 Apr 2015 12:18:18 +0000 (08:18 -0400)]
author: bsekisser [Sat, 18 Apr 2015 12:11:22 +0000 (08:11 -0400)]
Message:
flash: be sure to use current page for writing

bound z to ~(page size - 1), otherwise write may start at anywhere in page to write and fail.

also corrected log line to previous state as was missleading/inacurate.

modified:   simavr/sim/avr_flash.c
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 6c6b0835db5a29f7083e8e582711a684f18ae5c6
author: Doug Szumski [Mon, 27 Oct 2014 20:45:44 +0000 (21:45 +0100)]
Message:
twi: Remove start condition delay

  > This corrects a problem where a non-interrupt driven twi driver
    functions on the target (m32) but not in simavr.
  > This also fixes ../examples/board_i2ctest so that it functions as
    expected.
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.