log for cb533ae28fd0e051e42bdeae43965ec6faf9ae1f
Commit cb533ae28fd0e051e42bdeae43965ec6faf9ae1f
author: Michel Pollet [Wed, 23 Dec 2009 22:17:46 +0000 (22:17 +0000)]
Message:
core: Added a new ELF tag with AVR->simavr command path

This new mode allow the AVR firmware to specify an (unused)
AVR IO register as a "command path" to send commands back to
simavr.
It allows for example the firmware to start/stop the VCD trace
dump, exactly where it should from the ooint of view of the
firmware being ran.

See atmega88_uart_echo.c for an example.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 5b4715f65f3f199bdff178dce139912ed64addb8
author: Michel Pollet [Wed, 23 Dec 2009 00:52:41 +0000 (00:52 +0000)]
Message:
comments: What don't you typo the comments, too ?

Fixed a few!

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 358619f222d2a3610168eb34a0db2c4b09e4e618
author: Michel Pollet [Tue, 22 Dec 2009 16:24:35 +0000 (16:24 +0000)]
Message:
timer: Implemented some of the ICR based timers

Also made a PWM and a Fast PWM mode. Fast pwm doesm't use the
interrupts, as most of the time it's never used. Aldo it kills
performanves when calling a timer every 400 cycles.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 31d6eeca16f2cbdfae2043f73f4b27001ec4b254
author: Michel Pollet [Tue, 22 Dec 2009 16:22:24 +0000 (16:22 +0000)]
Message:
misc: Disabled debug traces

No functionsl changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 63b8526237faa8e32e6753ec02150df668bced16
author: Michel Pollet [Tue, 22 Dec 2009 16:21:45 +0000 (16:21 +0000)]
Message:
cores: Also disable fuse macros

For silly ubuntu

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit e3a37a324adcd5db12fe8ee11384f9bd0f9081bb
author: Michel Pollet [Mon, 21 Dec 2009 21:08:45 +0000 (21:08 +0000)]
Message:
timers: Added TCNT reading/writing support

TCNT read/write is now working. It is recalculated at read time.
You can also write to it to reset the timer to a fixed value, this resets
the simavr timer base accordingly.
Note that some timer modes should /not/ let the AVR write to TCNT, this
is not handled right now.

Also added an example of AVR code that uses timers, change TCNT1 and
generates a nice trace file with all the changes.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 22055328357d8b6490c1d648f7ea1b39f8831a6d
author: Michel Pollet [Mon, 21 Dec 2009 21:07:42 +0000 (21:07 +0000)]
Message:
IRQ: Made the hook structure private

No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 32fc69660340c9251403ba07f7968265f3a0d20f
author: Michel Pollet [Mon, 21 Dec 2009 08:18:43 +0000 (08:18 +0000)]
Message:
cores: Disable signatures to help compile on ubuntu

Ubuntu and gento uses old avr toolchain, that lacks
the SIGNATURE defines.
So I disabled it in simavr, it was not used for
anything functional for now anyway

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 58396a3ec11232a967ba5aca3bf49ad8f859e091
author: Michel Pollet [Sun, 20 Dec 2009 23:08:31 +0000 (23:08 +0000)]
Message:
examples: Minor updates

New timers etc...

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit affaa58c85b0405ca77be949237dff1a105994a6
author: Michel Pollet [Sun, 20 Dec 2009 23:07:56 +0000 (23:07 +0000)]
Message:
cores: Added ATTiny2313

Another new core...

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit bf452d6df74162ae0621a1615b82f9ce4d0d39cc
author: Michel Pollet [Sun, 20 Dec 2009 23:07:29 +0000 (23:07 +0000)]
Message:
cores: Updated for 16 bits timers and ADCs

Also made a macro for EXTINT declarations.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit eee46acd8c68d2576d4851d3f24fa22ced608f1e
author: Michel Pollet [Sun, 20 Dec 2009 23:05:38 +0000 (23:05 +0000)]
Message:
ADC: Placeholder IO module

Not doing anything for now, but the IO blocks are filled
in the core definitiond already.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 501725d8c3dca6d908eb5c5c5e7d5831672fdb37
author: Michel Pollet [Sun, 20 Dec 2009 23:04:43 +0000 (23:04 +0000)]
Message:
timer: Masssive timer update. 8 & 16 bits

Re-massaged the timer code. It now works as 8 or 16 bits,
Also added a way to soecify the mode the timer run, and made
the TOV, COMPA and COMPB work as they should.
Now support the "Normal" timer mode too.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit f6ca3d424e173484953bb28b7c8f2911bf90ca3a
author: Michel Pollet [Sun, 20 Dec 2009 23:02:44 +0000 (23:02 +0000)]
Message:
README an Makefiles update

Makefiles for the examples should work in ubuntu

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4854e70c0ebf7fccc35fe0fd4b25b7bd6ce727e3
author: Michel Pollet [Thu, 17 Dec 2009 20:31:23 +0000 (20:31 +0000)]
Message:
timer_64led: Brand new example board, opengl display too

This example is a real board firmware that was built and
works. The firmware was adapted lightly and now runs
perfectly in simavr. It's a "stopwatch" timer with a lot
of features.
The "board" generates a very complete waveform for a LOT
of interesting signals, like the 74HC595 latches, intetupts,
SPI activity and the lot.

This example is the crown jewel of simavr development so far,
because simavr was design with the goal of being able to simulate
one's own project, for real.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 2467b8b7d75cf7d2adde82dac31f8ad3cc1a7f10
author: Michel Pollet [Thu, 17 Dec 2009 20:27:10 +0000 (20:27 +0000)]
Message:
ledramp: Use a larger VCD update window

No longer needs a 5usec window, the timer does the job

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 30f8bc4c3d81fb442a71ec6ce207559f25c2e940
author: Michel Pollet [Thu, 17 Dec 2009 20:25:54 +0000 (20:25 +0000)]
Message:
Makefiles: Small updates

For consistency only...

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 306786ccd14dde0bcc2c6378bc54d03ef9ad6e3a
author: Michel Pollet [Thu, 17 Dec 2009 20:25:01 +0000 (20:25 +0000)]
Message:
ELF: Use a much larger VCD flush window

With the new log VCD handling, a much larger timeout is
perfectly fine.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 64f4695fc0818cf29a3b762ef276c606281f0204
author: Michel Pollet [Thu, 17 Dec 2009 20:24:11 +0000 (20:24 +0000)]
Message:
VCD: Reworked

More or less re-did the VCD handling, now ues a "log" of signal
changes instead of a timeslice. The log is flushed at regular
interval using a timer.
The log also handles signal changes that are smaller than one usec
(the minimum time slice in our VCD).

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4db6cb7af34780c0028bd7b1228184ffe1ea831a
author: Michel Pollet [Thu, 17 Dec 2009 20:22:10 +0000 (20:22 +0000)]
Message:
interrupts: Added a "raised" IRQ

Added a "raise" IRQ that is set to 1 when the interrupt is
scheduled, and to 0 when the handler is called.
This allows the interrupts to be traced into a VCD file
waveform, amongst other things.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 9475768fbc5ceebb6b648909040e48c5de7efa03
author: Michel Pollet [Thu, 17 Dec 2009 19:56:01 +0000 (19:56 +0000)]
Message:
core: Reworked the cycle timers

Ensure that a timer when called does not continue to have a
"call next" that is smaller than the current cycle, bogging
down the rest of the core.
Also ensure the cycle is always incremented by at least one
when sleeping, even if a cycle callback is called.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 3cee361fbf6efd5b4fc76509efadc4a7aff977ce
author: Michel Pollet [Thu, 17 Dec 2009 19:53:42 +0000 (19:53 +0000)]
Message:
core: Added an avr_terminate() call

This allow the VCD file to be flushed and closed properly.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit ff9ccdb6a1ad827c6d8c719f40c783b8e225d34c
author: Michel Pollet [Thu, 17 Dec 2009 19:50:37 +0000 (19:50 +0000)]
Message:
uart: Register the interupt vectors

This has no functiinal change, apart to keep the table of
"handled" interupts in the avr_t structure complete.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 913f8d42d0a150f8696a51b675ff6db51997fc33
author: Michel Pollet [Thu, 17 Dec 2009 19:49:17 +0000 (19:49 +0000)]
Message:
timer8: Implements "fast PWM" mode

Added IRQs that outputs the PWM duty cycle when changed
by the AVR code.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 2826ca4e314fb3e4efcd0541099f377772bd3a1a
author: Michel Pollet [Thu, 17 Dec 2009 19:48:14 +0000 (19:48 +0000)]
Message:
spi: Use a timer to send the bytes out, when master

No longer output the bytes too fast, that could create collisions
with the SPI in IRQ.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 2b3fa0405f06adcf414e4014e0da9af5d280033e
author: Michel Pollet [Thu, 17 Dec 2009 19:46:25 +0000 (19:46 +0000)]
Message:
cores: Add a few more mega cores

Added mega164, mega324, mega328

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit ed76382b2f6abe7742c95825fb29b38167efcee9
author: Michel Pollet [Wed, 16 Dec 2009 00:16:55 +0000 (00:16 +0000)]
Message:
Fixed 'ledramp' example to reflect new loader

No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 91732f87fc955cf93ab83f8fc955b97986e53ff2
author: Michel Pollet [Tue, 15 Dec 2009 21:42:25 +0000 (21:42 +0000)]
Message:
ELF: Updated example firmware to generate new traces

Example firmware declares two traces that will generate a
trace file automaticaly when run with run_avr. The file is
created at load time using the .mmcu declarations.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 51d5f4b07034798845f5d975c6d4df1cc3d0b79f
author: Michel Pollet [Tue, 15 Dec 2009 21:39:49 +0000 (21:39 +0000)]
Message:
ELF: Redone the .mmcu section

The section now uses :tags: that can be parsed regardless
of order, size, alignment and so on.
Also added tags to allow a firmware to register VCD traces
directly from macros placed in the firmware itself.

This allows very quick and painless trace generation of any IO
register/bit without having to know the real values for the
addresses.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 8d56964c56a3269be707316382dd36c11ed9ea2f
author: Michel Pollet [Tue, 15 Dec 2009 21:38:43 +0000 (21:38 +0000)]
Message:
VCD: Traces now have the correct timestamps

Traces in multiple of the "period" and use the
correct stamps for value changes.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 50176cc716e54b91ab9226c0f33b5234d2b58f40
author: Michel Pollet [Tue, 15 Dec 2009 21:37:53 +0000 (21:37 +0000)]
Message:
UART: Delay TX interupt a few cycles

Also clear the "buffer empty" flag when UDR is written

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit eab7a03e7ab811e50497f1316f6dac1b622d007f
author: Michel Pollet [Tue, 15 Dec 2009 21:35:02 +0000 (21:35 +0000)]
Message:
Added support for IRQ triggers on any IO register

Each IO address has it's own IRQ list now, dynamicaly
allocated when needed. It allows any code to register
an IRQ callback for any change made to any register.

Even registers that have no IO drivers (yet?) can be
monitored.

As a silver lining, this means any register or register bit
can be traced in a VCD file and displayed in gtkwave.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit f49e7379d136ee4d72d44ec1527deb1fbb5c7a69
author: Michel Pollet [Tue, 15 Dec 2009 21:32:03 +0000 (21:32 +0000)]
Message:
Added support for external interrupts (ie INT0 etc)

Small module to implement the INT0 .. INT3 interrupts.
These hook up in ioport pin IRQs to trigger the
vectors.
Added vectors for the existing cores.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 09a568486c9d386621e0fd6638abed590b74c3f2
author: Michel Pollet [Tue, 15 Dec 2009 00:06:16 +0000 (00:06 +0000)]
Message:
Missing bits from previous commit...

Key maps etc..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 51db2fae30b0fa6b9d5f2f9760fd16edd64640e2
author: Michel Pollet [Mon, 14 Dec 2009 21:03:18 +0000 (21:03 +0000)]
Message:
Updated "ledramp" to demo the VCD gtkwave traces

This patch is all that is needed to allow the demo "board"
to dump a file that will display graphicaly in gtkwave.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit e198c93ab297f763a18a77c64dbdfc0adc7ee4bb
author: Michel Pollet [Mon, 14 Dec 2009 21:00:04 +0000 (21:00 +0000)]
Message:
Adds VCD (Value Change Dump) file output support (gtkwave)

This subsystem is not called by the core itself, it is
an utility available to other "boards".

Allows the simulator to dump graphical traces readable
in gtkwave.
The subsystem allows any number of trace files in parallel,
any sampling periods, and a maximum of 32 traces per file.

See updated "ledramp.c" example for a very simple way to use
the code.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 7d859a4b1eb18a3ef13636587ba051a54d7a69b3
author: Michel Pollet [Mon, 14 Dec 2009 20:57:55 +0000 (20:57 +0000)]
Message:
Streamlined avr_irq subsystem

Made the IRQ subsytem even more generic, allows
IRQs to be directly connected to other IRQ without
the glue callback.
Also added flags to allow changing IRQ polarity, and
to enable/disable a "filter" that won't trigger the
callbacks when the IRQ value is the same as before.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 1828d61a7a1b5751ddc70f93bd16bd9b0d4b2c6e
author: Michel Pollet [Mon, 14 Dec 2009 20:55:48 +0000 (20:55 +0000)]
Message:
Disable the debugging traces

Added a (Disabled by default) compile flag for the
heavy-duty debugger that helped debug the core. No
longer needed in full builds since 1) it works
2) gdb works for user code..

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 5f2fe2466b5a69ca24dee3a3ca99742f412bf8fc
author: Michel Pollet [Mon, 14 Dec 2009 20:54:27 +0000 (20:54 +0000)]
Message:
Cleanup of the Makefiles

General cleanup, updated comments

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0bfce45007c162fa3f98f4369f7069f3da372502
author: Michel Pollet [Mon, 7 Dec 2009 19:45:17 +0000 (19:45 +0000)]
Message:
Added a real example on how to integrate simavr, etc

+ OpenGL app loads, runs a firmware and interacts with it.
  See the README in examples/ledramp
+ Updated Makefiles & Readme
  Streamlined the makefiles, so they use the Makefile.common
  rules and so on.  Also updated README to bring it up to date.
+ Adding TWI - work in progress
  Non working implementation skeleton. Defines a "slave" and a "bus"
  And the AVR twi interface that has one of each

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 024a09bbfa3065b99b2e7309dd157987b788c7fd
author: Michel Pollet [Sun, 6 Dec 2009 23:12:23 +0000 (23:12 +0000)]
Message:
Added a typedef for IO addresses

Used to be 8 bits only in the code, but bit megas use 9 bits,
so the new type is uint16_t.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 48920c7ff8859847e7befe65c4d663782f056bd5
author: Michel Pollet [Sun, 6 Dec 2009 10:41:23 +0000 (10:41 +0000)]
Message:
Added tiny13

And macros to declare eeprom with 8 bits address.

Signed-off-by: Jon Escombe <lists@dresco.co.uk>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 1898613e4ff3926250bc98e9917fc57b078f48f0
author: Michel Pollet [Fri, 4 Dec 2009 22:27:46 +0000 (22:27 +0000)]
Message:
Many more changes, timed callbacks etc

Now have functions to convert from/to cycles & usecs, use them for
implementing the new "one shot" timer callbacks.
IO modules now use "one shots" to implement "call later" subsystems,
like eeprom, uart, timers and so on.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4acd890a940f5f0cc5a028017aa6b6d3136c33c8
author: Michel Pollet [Thu, 3 Dec 2009 23:56:57 +0000 (23:56 +0000)]
Message:
tiny25/45 cores added

Same method as the mega48/88/168...

Signed-off-by: Jon Escombe <lists@dresco.co.uk>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 4ebde35337d05315c5170390377ef3a0f9dde53c
author: Michel Pollet [Thu, 3 Dec 2009 23:31:42 +0000 (23:31 +0000)]
Message:
Polished gdb support, etc

GDB handler re-done, removed the thread, removed the pauses,
Now as fast as possible for stepping trhu code.
Note you /need/ the dwarf-2 debug symbols for gdb to work
properly, a simple '-g' will not work.

Also added a mode that starts the gdb server and waits if the
AVR core detects a "crash". Added a piece if test unit to
test just that.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 24c5c6069017010fd7d27eda7585e38b5fff7a4b
committer: Michel Pollet [Wed, 2 Dec 2009 21:52:53 +0000 (21:52 +0000)]
author: Michel Pollet [Wed, 2 Dec 2009 21:50:09 +0000 (21:50 +0000)]
Message:
GDB working, some more source massaging

Big news is gdb support, you can trace, breakpoint,
resume, inspect (including eeprom addresses!).
You can't modify variables on the fly yet.
It's not very fast rignt now, but some very obvious
changes will help that a lot.

Other changes are more moving, shuffling. "simavr"
is gone, replaced by a simple "run_avr" that does
the same, but no longer has any emulation specific
code.

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit b2cf6bdf2b6443199a36526915b4486efe3d7b0f
committer: Michel Pollet [Wed, 2 Dec 2009 00:16:45 +0000 (00:16 +0000)]
author: Michel [Wed, 2 Dec 2009 00:02:16 +0000 (00:02 +0000)]
Message:
Build works on Snow Leopard, using Arduino toolchain

Tried the make system on Snow Leopard with a change in the
Makefiles to go and get avr-gcc and such in the Arduino.app
bundle.
Also fixed the .mmcu ELF header to be compatible with x86_64

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 0b698ce0c4148375fba91ab0295e5624067f3cac
author: Michel Pollet [Tue, 1 Dec 2009 21:47:48 +0000 (21:47 +0000)]
Message:
uart, ioports, etc. Many more changes

+ Reorganized source, split simavr.c
+ IRQ support added to IO modules
+ timer8: fixed a bug related to disabling clock
+ uart:
  - Added support for txen/rxen flags
  - Added a receive fifo, and the rx interupt
  - added a "atmega88_uart_echo" test case
+ simavr: hook rx & tx irqs on first uart, for tests

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit 6dc37c42aa8c60ee6e41f20718c858e1374dd2c6
author: Michel Pollet [Mon, 30 Nov 2009 21:36:55 +0000 (21:36 +0000)]
Message:
Cores, decoder, uart, ioports - lots of changes

+ Cores now use eeprom declare macro
+ Cores now use the "TXCE" etc bits
+ Uart now raise TXC interupt/flag
+ ioports now use new internal IRQ system
+ New command line options for mcu, freq and trace
+ Decoder updates:
  - Fixed the last known "crash" bug.
  - Added cycles to most multi-cycle opcodes.
  - Added optional stack frame watcher
  - Skip instruction now handle 32 bits skips

Signed-off-by: Michel Pollet <buserror@gmail.com>
Commit d8e5774323d5408e119b5fa3cce1c73c7345e8f7
committer: Michel Pollet [Tue, 24 Nov 2009 13:14:03 +0000 (13:14 +0000)]
author: Michel Pollet [Tue, 24 Nov 2009 13:11:54 +0000 (13:11 +0000)]
Message:
Initial Commit

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