Michel Pollet [Wed, 23 Feb 2011 13:53:19 +0000 (13:53 +0000)]
Updated gitignore
Added obj-* and *.vcd
Signed-off-by: Michel Pollet <buserror@gmail.com>
Sami Liedes [Wed, 23 Feb 2011 02:14:29 +0000 (04:14 +0200)]
Remove unused variable from avr_service_interrupts().
The done flag is nowadays redundant as it's never read after it's set.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Sat, 19 Feb 2011 03:35:57 +0000 (05:35 +0200)]
Fix LD, ST, LPM, STS, MUL to take the correct number of cycles.
They are now the ATMega timings. Need to figure out how to take
ATTiny into account. Before this change they weren't correct for
either.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Wed, 2 Feb 2011 17:20:31 +0000 (19:20 +0200)]
fix typos in comments.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Sat, 5 Feb 2011 13:56:33 +0000 (15:56 +0200)]
Silence gcc warnings by using PRIu64 in CRASH() printf().
Actually we define a PRI_avr_cycle_count preprocessor macro in
sim_avr.h in the style of PRI* in inttypes.h.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Wed, 23 Feb 2011 00:13:24 +0000 (02:13 +0200)]
Fix compilation with TRACE on.
The MOV instruction's TRACE() used the undefined variable vd.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Wed, 23 Feb 2011 00:03:13 +0000 (02:03 +0200)]
Fix compilation on non-32-bit platforms.
The addition of -Werror to the compilation flags broke building on
64-bit hosts because casts between pointers and integers of different
sizes cause warnings on gcc -Wall. Fix this by always casting the
pointers to intptr_t first.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Michel Pollet [Tue, 22 Feb 2011 23:20:36 +0000 (23:20 +0000)]
irq: Add names to most io module external irqs
Nothing to be shown for this work so far, the cool stuff hopefully
will come later...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:27:45 +0000 (17:27 +0000)]
doc: Updated callgraph .pdf
Just a minor update
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:26:40 +0000 (17:26 +0000)]
examples: Updated to new part prototypes
Followup on previous checkin, the board examples now use
"names" when possible.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:25:43 +0000 (17:25 +0000)]
parts: Updated to name their IRQs
First bits of the system that provide names for the IRQs
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:24:52 +0000 (17:24 +0000)]
simavr: Updare simavr core to new IRQ prototypes
Mostly prototypes changes and some gratuitous reformatting
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:23:54 +0000 (17:23 +0000)]
irq: Introduce a "irq pool"
The goal is to be able to name IRQs, so a couple fields are
added.
It is not functional for now, as the task is to first convert
all the code to the new prototype.
Also introduce a 2011 way of formatting prototypes
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 17:21:54 +0000 (17:21 +0000)]
simavr: Added -Werror and fixed warnings
Added -Werror to compilation to make sure the next wave of changes
can't easily break things
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 12:50:51 +0000 (12:50 +0000)]
core: Add a muxer for IO writes
It turns out that some core (tiny85 at the very least) are competing
for IO writes on some register.
This patch introduces a muxer callback that can call multiple clients
without impacting performance for the rest of the cores.
The system could be extended for IO read if it proves necessary.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 22 Feb 2011 12:48:31 +0000 (12:48 +0000)]
core: Introduce run() and sleep() callbacks
It seems that the default 'run_avr' function was penalized by
some tests made that were only useful when gdb was active.
This patch introduces two version of the critical run_avr, one for
"raw" running, and one for gdb.
It also introduces a sleep() callback for similar reasons. Ir can
also be used to run unit testing at 100% speed instead of having
random sleep code during execution.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Sami Liedes [Sun, 20 Feb 2011 16:52:32 +0000 (18:52 +0200)]
Fix SBIS etc trace output.
SBIS used to print the io register wrong. The other fixes add spaces
in the correct places in "Will branch" and "Will not branch" messages.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Sat, 19 Feb 2011 03:25:53 +0000 (05:25 +0200)]
avr_loadcode(): If too much code, bail out instead of crashing.
Check that the code to be loaded actually fits in the flash.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Fri, 18 Feb 2011 20:09:24 +0000 (22:09 +0200)]
avr_register_io_[read,write](): fail if overriding earlier registration.
The avr_register_io_*() functions do not maintain a chain of
callbacks. This can be confusing if someone like me tries to use them
to listen to some I/O events (for which you should use the avr_irq_*
stuff).
Make this more explicit by checking in the register functions if we
already have a callback and failing with an error message if so.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Michel Pollet [Mon, 21 Feb 2011 18:05:44 +0000 (18:05 +0000)]
board_hd44780: New sample code
Emulated a complete HD44780 LCd screen, and uses a standard
AVR driver to write on it.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Mon, 21 Feb 2011 18:02:03 +0000 (18:02 +0000)]
vcd: Increase trace buffer size
Ran into the 128 limit at some point..
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Mon, 21 Feb 2011 18:01:17 +0000 (18:01 +0000)]
Makefiles: Some fixups
+ add -fPIC to -shared for the shared library
+ .axf rule try to comoile all dependencies
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 20 Feb 2011 10:20:52 +0000 (10:20 +0000)]
Merge git://gitorious.org/~luki/simavr/lukis-simavr into dev-home
Martin Glueck [Sat, 19 Feb 2011 18:55:43 +0000 (19:55 +0100)]
Makefile: Add building of shared library on linux
Disabled for non linux platform, as it need more work
than just a gcc -shared
Author: Martin Glueck <martin@mangari.org>
Edit: Michel Pollet <buserror@gmail.com>
Martin Glueck [Sat, 19 Feb 2011 18:20:18 +0000 (19:20 +0100)]
core: Added ATtiny x4
Untested. Also added to sim_avr.c
Author: Martin Glueck <martin@mangari.org>
Edit: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 19 Feb 2011 00:21:53 +0000 (00:21 +0000)]
core: Remove the run() callback
run() callback was unused but was still using cycles
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Fri, 18 Feb 2011 15:52:52 +0000 (15:52 +0000)]
Makefiles: Explicitely link opengl
needed with modern linker
Signed-off-by: Michel Pollet <buserror@gmail.com>
Sami Liedes [Thu, 17 Feb 2011 19:47:00 +0000 (21:47 +0200)]
timer: Fix a subtle off-by-one bug in TCNT reading.
There's a subtle bug in TCNT (timer counter) reading which only causes
the counter to ever run from 0 to TOP-1, while it should stay in the
TOP value for a full timer cycle before resetting to 0 (but the
interrupt needs to come when TOP is first reached).
Interestingly, this causes Arduino's micros() function to occasionally
return incorrect values. micros() function relies on TCNT0 not
transitioning from <= 254 to 0 in only a few cycles with /64
prescaler.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Michel Pollet [Wed, 16 Feb 2011 00:03:28 +0000 (00:03 +0000)]
timers: don't reconfigure for minor changes
Prevents the timer to be reset when changing non important
bits, like the edge detector etc
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 16 Feb 2011 00:02:01 +0000 (00:02 +0000)]
timers: Print a warning on unsuported timer modes
and also don't [rint one for "mormal" mode
Signed-off-by: Michel Pollet <buserror@gmail.com>
Sami Liedes [Tue, 15 Feb 2011 23:21:38 +0000 (01:21 +0200)]
Store the next cycle count where the earliest cycle timer needs to be run.
This speeds up cycle timer processing significantly and almost doubles
the speed of the overall simulation.
Signed-off-by: Sami Liedes <sliedes@cc.hut.fi>
Sami Liedes [Fri, 4 Feb 2011 23:46:08 +0000 (01:46 +0200)]
Rework avr_service_interrupts() to use ffs() too for speed.
Sami Liedes [Fri, 4 Feb 2011 22:26:54 +0000 (00:26 +0200)]
Use ffs() for finding timers from cycle timer map.
This optimization speeds up avr_cycle_timer_process() considerably. It
used to be a major bottleneck in my test case (52% of CPU time spent
in that routine), now it's about half that.
Sami Liedes [Wed, 2 Feb 2011 20:18:04 +0000 (22:18 +0200)]
Return zeros when GDB reads just past end of stack.
GDB likes to read the topmost value of stack when using the
"stepi" (step instruction) command. Unfortunately this does not work
when the stack is empty, causing an error message and GDB confusion.
Hack the GDB stub code to just return zeros if GDB tries to read two
bytes just past the end of stack.
NOTE: This may need to be modified to support also longer reads for
bigger AVRs where code pointers are longer than two bytes (e.g.
ATMega2560). As simavr doesn't support atm2560 yet, I'm implementing
it this way now.
Sami Liedes [Wed, 2 Feb 2011 17:23:45 +0000 (19:23 +0200)]
Enable interrupt handling for Fast PWM timers too
Arduino seems to use that.
Michel Pollet [Fri, 14 Jan 2011 10:19:28 +0000 (10:19 +0000)]
UART: Fixed UDRC/E behaviour
The interrupt is suposed to fire as soon as it is
enabled is the UDR is empty.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Fri, 14 Jan 2011 10:18:40 +0000 (10:18 +0000)]
cycle timers: Added avr_cycle_timer_status()
Allows verification wether a timer is running, and
until when it is.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Christian Balles [Tue, 19 Oct 2010 22:00:28 +0000 (00:00 +0200)]
simduino: added init/deinit functions for avr_t initialization
fixes a crash (free of mmap'ed memory)
nicer cleanup by munmap + close the file
Signed-off-by: Christian Balles <code@ballessay.de>
Christian Balles [Tue, 19 Oct 2010 21:45:58 +0000 (23:45 +0200)]
core: added extra init/deinit functions to avr_t
allows programs like the simduino example to modify the init/deinit function
to fix a crash
Signed-off-by: Christian Balles <code@ballessay.de>
Michel Pollet [Mon, 25 Oct 2010 11:53:29 +0000 (12:53 +0100)]
misc: Typos
Fixed a few comments
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 12 Oct 2010 09:03:43 +0000 (10:03 +0100)]
core: Added a bit of documentation
Fixed some of the copy/paste errors in comments
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 12 Oct 2010 09:02:55 +0000 (10:02 +0100)]
gdb: Adds the 'reset' command
Apparently needed for compatibility with AVRStudio debugger
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 12 Oct 2010 09:02:03 +0000 (10:02 +0100)]
console: Implement debug console register
Used in pair with the console register declaration, just
prints what's sent to that debug register.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 12 Oct 2010 09:00:33 +0000 (10:00 +0100)]
mcu_section: Added New CONSOLE Tag
CONSOLE tag allow declaring a register for dumping debug output
oh the terminal without using an UART
Also cleaned up and documented the header file further
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 12:01:25 +0000 (13:01 +0100)]
tests: Update them so they work...
They relied on bugs that were fixed in simavr since..
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 12:00:48 +0000 (13:00 +0100)]
IOs: Use new IRQ alloc function
All converted to the brand new way...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 11:59:59 +0000 (12:59 +0100)]
IRQs: A bit of sanity when freeing
Check the parameters...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 11:56:29 +0000 (12:56 +0100)]
simavr: Deallocate resources
Deallocate memory and IO modules at teardown
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 11:55:40 +0000 (12:55 +0100)]
eeprom: Added a dealloc function
frees the eeprom memory at teardown time
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 11:55:05 +0000 (12:55 +0100)]
ios: Added a way to set and teardown modules IRQs
Added a function to set the io module IRQ, and added a way
to deallocate them at teardown time.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 2 Sep 2010 10:59:07 +0000 (11:59 +0100)]
misc: Made (most) of the headers c++ friendly
No functional changes
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 31 Aug 2010 11:31:37 +0000 (12:31 +0100)]
misc: Fixed clang static analizer warnings
One genuine bug too. The rest was cosmetic.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 31 Aug 2010 10:55:29 +0000 (11:55 +0100)]
ioport: Added an IRQ for the port pin direction changes
New IRQ for client code (ie "board code") will be called
when the AVR firmware changes the DDR register.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 31 Aug 2010 10:48:44 +0000 (11:48 +0100)]
ioport: Add an ioctl to get the port state
Example:
for (int i = 'A'; i <= 'F'; i++) { avr_ioport_state_t state;
if (avr_ioctl(AVR_IOCTL_IOPORT_GETSTATE(i), &state) == 0)
printf("PORT%c %02x DDR %02x PIN %02x\n",
state.name, state.port, state.ddr, state.pin);
}
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 31 Aug 2010 10:30:49 +0000 (11:30 +0100)]
misc: Typos etc
Makefile now uses $(CC) so it works with clang static analyzer.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 25 Aug 2010 15:07:31 +0000 (16:07 +0100)]
core: CALL/RET instructions fix
Swap LSB and MSB of return address on the stack.
Thanks to "Peter" on the simavr mailing list.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 10 Aug 2010 21:51:31 +0000 (22:51 +0100)]
core: Add PORTA support for Attiny2313
The Attiny2313 has a PORTA, the pins for it are normally used for
reset and the crystal, but it is possible to use them if you use the
internal R/C oscilator.
Simavr didn't support this port on a Attiny2313 yet, so I added it myself.
Signed-off-by: Wander Winkelhorst <w.winkelhorst@gmail.com>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Mon, 2 Aug 2010 21:38:44 +0000 (22:38 +0100)]
timer: Fix for older AVRs & tinies
They lack WGM bits
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Mon, 5 Jul 2010 10:09:20 +0000 (11:09 +0100)]
core: Fix SBRS/C for 32 bits instructions
Untested, but matches the datasheet
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Mon, 5 Jul 2010 10:08:08 +0000 (11:08 +0100)]
core: Fix MULS register
MULS uses 16+ registers.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Fri, 25 Jun 2010 08:17:19 +0000 (09:17 +0100)]
ADC: Fix ADLAR bit handling
Was shifting when zero, not one.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 20 Jun 2010 10:25:53 +0000 (11:25 +0100)]
timer: Also reconfigure on writing the WGM bits
Some broken code configure the clock source before
setting the waveform bits.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 20 Jun 2010 10:24:54 +0000 (11:24 +0100)]
ioports: Cleanup and implement PINx toggle
Turns out writing 1 to PINx register toggles the
bit in PORTx. Did'nt know it worked like that...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 11 May 2010 11:36:26 +0000 (12:36 +0100)]
uart: Now use avr_clear_interrupt_if
New function simplifies clearing pending bits
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 11 May 2010 11:35:46 +0000 (12:35 +0100)]
timer: Allow clearing of the interupts
Allow exclicit clearing of interupts by writing 1
to the pending bit.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Tue, 11 May 2010 11:34:35 +0000 (12:34 +0100)]
interrupts: Mark interupts as pending even if not enabled...
.. Then trigger them as soon as they are enabled again
There is a bit of performance hit on this, since the bitmask
array used before can now be full of pending bits that won't
ever be cleared..
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Thu, 29 Apr 2010 10:51:45 +0000 (11:51 +0100)]
ICP: Added Input capture pin support to timers
Added (untested as of now) Input Pin Capture to the 16 bits
timers. The "edge" flag is also handled. The code is untested
for now, it will need an "example" board that will be
checked in later.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 21:59:23 +0000 (22:59 +0100)]
cores: Added tinyX5 and mega128 ADC bits
Not tested
Signed-off-by: Michel Pollet <buserror@gmail.com>
Alessio Igor Bogani [Wed, 14 Apr 2010 18:17:36 +0000 (20:17 +0200)]
misc: Warning fix
Makes gcc happy
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Alessio Igor Bogani [Wed, 14 Apr 2010 18:17:24 +0000 (20:17 +0200)]
misc: More warning fixes
#warning "This file has been moved to <util/delay.h>."
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Alessio Igor Bogani [Wed, 14 Apr 2010 18:17:01 +0000 (20:17 +0200)]
misc: Fix warning replacing %d with %zu for size_t
Warning fixes.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 19:43:14 +0000 (20:43 +0100)]
doc: Updated callgraph .pdf
Hadn't been updated for some time...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 19:42:46 +0000 (20:42 +0100)]
core: Fixes SBCI
Thanks to <evgeny.chukreev@gmail.com>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:15:23 +0000 (18:15 +0100)]
test: Add a test/example for the ADC subsystem
Loads ADC values, also reads the V1.1 reference voltage of an Atmega644
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:14:27 +0000 (18:14 +0100)]
cores: Add (some) of the ADC mux data
Add ADC Mux data to the x8 and x4 cores. The others still needs
to be done. Also filled the reference voltages.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:13:21 +0000 (18:13 +0100)]
ADC: Fully functional core
simavr ADC allows external code to feed real voltages to the
simulator, and the simulator uses it's 'real' reference voltage
to do the right thing and return the 'proper' 10 bits ADC value
to the AVR firmware.
To send values to the ADC, register your code to wait for the
ADC_IRQ_OUT_TRIGGER irq, and at that point send any of the
ADC_IRQ_ADC* with Millivolts as value.
External trigger is not done yet.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:11:49 +0000 (18:11 +0100)]
core+elf: Add fields for the MCU voltages
You can now specify AVR_MCU_VOLTAGES(vcc, avcc, aref) in millivolts
in your firmware to set them into the simavr core.
Prerequisite for ADC VREF support.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:09:38 +0000 (18:09 +0100)]
run_avr: Add a way to trace just interruots vectors
Calling run_avr with -ti <value> will trace the scheduling
of that pacticular vector.
You can have up to 8 traces.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Wed, 14 Apr 2010 17:05:12 +0000 (18:05 +0100)]
timer: Fixed an off by one
That was breaking the timers badly in corner cases
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 11 Apr 2010 19:11:41 +0000 (20:11 +0100)]
cores: Updated comparators
Also filled up the ones for tinyx5, megax4, tiny2313
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 11 Apr 2010 19:11:00 +0000 (20:11 +0100)]
timer: Changed timer config feom a bit array to a normal regbit
Since all the timer seems to have these 2 bits declared
in the same way anyway...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 11 Apr 2010 18:38:24 +0000 (19:38 +0100)]
ELF: Fixes a bad malloc
How it didn't crash before, no idea...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 11 Apr 2010 18:36:59 +0000 (19:36 +0100)]
mega128: Fixes timer comparators
Bits are in the right order now
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 17:05:30 +0000 (18:05 +0100)]
twi: Stripped down TWI module to fix compile
New system will take it's place soon
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 12:19:19 +0000 (13:19 +0100)]
example: Added OC2A to timer test
Uses OC2A toggle with a VCD trace to demo the new compators.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 12:18:30 +0000 (13:18 +0100)]
cores: Refactored timer comparators
Based on patch by <tomi.leppikangas@gmail.com> but fixed the other
cores to fix a few cut/paste issues.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 12:16:37 +0000 (13:16 +0100)]
timer: Added comparator modes for pins
Refactored the comparators code, Added the 3 common modes of pin
toggles.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 12:15:09 +0000 (13:15 +0100)]
ioport: Added a way to get to the IRQ via register addresses
Now can do a ioctl to get the port IRQs by oassing the address of
a PORT/PIN/DDR register and a pin number.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 12:14:12 +0000 (13:14 +0100)]
ioport: Aded a way to specify the output value via IRQ
Adding 0x100 to the IRQ value simulates a pin output change
and not just a pin input change.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sat, 10 Apr 2010 10:35:32 +0000 (11:35 +0100)]
ioport: No longer need pcint to change the value
IRQ callback changes the AVR memory even if the pcint is
not present.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel [Sun, 4 Apr 2010 14:36:17 +0000 (15:36 +0100)]
TWI: Temp TWI changes with new IRQ system
Signed-off-by: <>
Michel Pollet [Mon, 5 Apr 2010 12:39:06 +0000 (13:39 +0100)]
extint: Add more extints IRQs
... and use them on the Mega128 core
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 12:43:32 +0000 (13:43 +0100)]
core: Added EIND support
Not used in any core, for now. It would still need 24 bits PC support
with return addresses to match.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:24:29 +0000 (12:24 +0100)]
cores: Added Mega128
Contributed by Tomi Leppikangas <tomi.leppikangas@gmail.com>
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:22:42 +0000 (12:22 +0100)]
watchdog/eeprom: Added declaration blocks for older cores
For the mega128 generation
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:21:45 +0000 (12:21 +0100)]
timer: Added (non functional) C interrupt block
Needs some code
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:20:59 +0000 (12:20 +0100)]
flash: Add support for RAMPZ
If declared...
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:20:34 +0000 (12:20 +0100)]
core: Add support for RAMPZ and refactor instructions
Added RAMPZ as an optional IOREG for the core.
Factored the [E]I[JMP/CALL] into one blob.
Added the ELMP Instruction with RAMPZ support.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel Pollet [Sun, 4 Apr 2010 11:18:31 +0000 (12:18 +0100)]
Fixed multiple warnings for -Wall
Twasn't that bad really.
Signed-off-by: Michel Pollet <buserror@gmail.com>
Michel [Fri, 12 Mar 2010 08:06:13 +0000 (08:06 +0000)]
run_avr: Cosmetics
Comments, prints etc.
Signed-off-by: Michel Pollet <buserro@gmail.com>