simavr
11 years agosimduino: Updated readme
Michel Pollet [Wed, 6 Jun 2012 06:47:01 +0000 (07:47 +0100)]
simduino: Updated readme

Since it now uses a pty directly

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Uses libc3gl too now
Michel Pollet [Wed, 6 Jun 2012 06:43:17 +0000 (07:43 +0100)]
reprap: Uses libc3gl too now

Moved generic code out

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Added support for indexed elements
Michel Pollet [Tue, 5 Jun 2012 14:58:09 +0000 (15:58 +0100)]
reprap: Added support for indexed elements

And spheres

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agocores: Now duplicate the global structure
Michel Pollet [Sun, 3 Jun 2012 22:46:08 +0000 (23:46 +0100)]
cores: Now duplicate the global structure

Strangely, it didn't, so you could not allocate 2 cores even tho nothing else
is there to stop it...

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agolibc3: Update
Michel Pollet [Sun, 3 Jun 2012 16:25:41 +0000 (17:25 +0100)]
libc3: Update

Minor update

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agolibc3: Few more updates
Michel Pollet [Sun, 3 Jun 2012 14:11:49 +0000 (15:11 +0100)]
libc3: Few more updates

c3context can have several viewpoints
c3context has a list of c3programs
c3camera got renamed with standard type names
c3context/c3geometry driver got a dispose callback

gl code has a new generic glsl program loader

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agolibc3: Added c3program
Michel Pollet [Sun, 3 Jun 2012 14:09:34 +0000 (15:09 +0100)]
libc3: Added c3program

To load shader(s)

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c_utils updates
Michel Pollet [Sun, 3 Jun 2012 14:09:07 +0000 (15:09 +0100)]
reprap: c_utils updates

Added a fre accessors

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agouart_pty: Add CR/LF conversion to the tap
Michel Pollet [Sun, 3 Jun 2012 14:08:34 +0000 (15:08 +0100)]
uart_pty: Add CR/LF conversion to the tap

Make sure whst we type is converted too

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Implemented the 'heatpot'
Michel Pollet [Sun, 3 Jun 2012 14:07:56 +0000 (15:07 +0100)]
reprap: Implemented the 'heatpot'

Somehow raise a temperature using a score, reduces it automatically etc

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agouart_pty: Introduced the notion of 'tap' port
Michel Pollet [Sat, 2 Jun 2012 14:34:21 +0000 (15:34 +0100)]
uart_pty: Introduced the notion of 'tap' port

The previous way to debug was 'stealing' the port by using an xterm on it..
the new way leaves the proper pty available to the application you want to use
but still allow you to have a 'tap' port that sees both the sides of the
communication om the other pty.

You can also type stuff obviously, and it does some cr/lf conversions.

/tmp/simavr-uart0 : will be the normal fake serial port
/tmp/simavr-uarttap0 : is the one to launch an xterm on

This allow you to really see the serial traffic as it happends with both
requests and replies.

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Compatibility with OSX
Michel Pollet [Sat, 2 Jun 2012 12:32:11 +0000 (13:32 +0100)]
reprap: Compatibility with OSX

The shader now works on both platform
Removed the .bin file, made sure it never happends again

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 update etc
Michel Pollet [Fri, 1 Jun 2012 22:17:00 +0000 (23:17 +0100)]
reprap: c3 update etc

probably last update befire I spin it out

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Delete mongoose
Michel Pollet [Fri, 1 Jun 2012 22:15:03 +0000 (23:15 +0100)]
reprap: Delete mongoose

Don't need that anymore

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agocore: Cycle timer small fix
Michel Pollet [Fri, 1 Jun 2012 22:14:11 +0000 (23:14 +0100)]
core: Cycle timer small fix

Makes it better on threaded GL on OSX

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 update
Michel Pollet [Mon, 28 May 2012 18:20:58 +0000 (19:20 +0100)]
reprap: c3 update

Also:
freenode group verification: token jkndwaw234

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agocores: New avr-libc fixes
Michel Pollet [Mon, 28 May 2012 09:20:29 +0000 (10:20 +0100)]
cores: New avr-libc fixes

New debian avr-libc has actually deprecated register names, unfortunately
the other distros will catchup in 4 years or so, so we still have to
reactivate them .

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agousb: Fix for new compiler
Michel Pollet [Mon, 28 May 2012 09:19:11 +0000 (10:19 +0100)]
usb: Fix for new compiler

Progmem now need 'const'. Also fixed the makefile

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Steppers use proper logic
Michel Pollet [Mon, 28 May 2012 09:18:20 +0000 (10:18 +0100)]
reprap: Steppers use proper logic

For underflow detection, instead of using a signed value

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMakefile: Use CPPFLAGS for -I stuff
Michel Pollet [Mon, 28 May 2012 09:17:34 +0000 (10:17 +0100)]
Makefile: Use CPPFLAGS for -I stuff

CFLAGS is for code generation

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMakefile: Include a .make.options if present
Michel Pollet [Mon, 28 May 2012 09:16:42 +0000 (10:16 +0100)]
Makefile: Include a .make.options if present

A file .make.options will be loaded if present. It allows specifyong host
dependent flags without polluting the makefile, or use flags that wont work
on all hosts.
My current one contains:

export CC = clang
export CFLAGS = -march=corei7-avx

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 documentation
Michel Pollet [Sat, 26 May 2012 22:20:00 +0000 (23:20 +0100)]
reprap: c3 documentation

Some documentation. c2 is probably going to be spin out soon

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoclang: Fixes of warning and nasty bugs
Michel Pollet [Fri, 25 May 2012 12:55:11 +0000 (13:55 +0100)]
clang: Fixes of warning and nasty bugs

XCode 4.3 & clang fixes. Should also apply to BSD

Found a nasty bug in clang with sign bit propagation

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agomisc: Fixes clang warnings
Michel Pollet [Tue, 22 May 2012 18:11:37 +0000 (19:11 +0100)]
misc: Fixes clang warnings

And it found some genuine bugs too

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMakefiles: Tweaked to build using clang/llvm
Michel Pollet [Tue, 22 May 2012 18:10:45 +0000 (19:10 +0100)]
Makefiles: Tweaked to build using clang/llvm

Converted makefiles and tweaked to make it all work with clang etc.

Welcome to the future!

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 stl loader
Michel Pollet [Mon, 21 May 2012 13:23:06 +0000 (14:23 +0100)]
reprap: c3 stl loader

Quick'n Dirty STL file loader, and added a small model doe the nozzle.

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 update
Michel Pollet [Mon, 21 May 2012 00:30:37 +0000 (01:30 +0100)]
reprap: c3 update

Allows having a custom callback set for geometries

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agogdb: Fixed a warning
Michel Pollet [Sun, 20 May 2012 20:25:42 +0000 (21:25 +0100)]
gdb: Fixed a warning

-Wall being pedantic

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: c3 update
Michel Pollet [Sun, 20 May 2012 20:25:16 +0000 (21:25 +0100)]
reprap: c3 update

Added tons of stuff to the micro-scene-graph 3D code.

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agomake: Tweaks for freebsd
Michel Pollet [Sat, 19 May 2012 14:20:10 +0000 (15:20 +0100)]
make: Tweaks for freebsd

Use pkg-config if possible, don't use alloca()

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Added opengl renderer
Michel Pollet [Sat, 19 May 2012 13:33:12 +0000 (14:33 +0100)]
reprap: Added opengl renderer

The small red cross moves as the nozzle. Very primitive still
Rotate with the mouse, sorta.

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Added c3, a small scene graph lib
Michel Pollet [Sat, 19 May 2012 13:32:04 +0000 (14:32 +0100)]
reprap: Added c3, a small scene graph lib

To display the hotend over the printer bed. Very very primitive

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMakefile: Bit more cleanup
Michel Pollet [Fri, 18 May 2012 12:04:50 +0000 (13:04 +0100)]
Makefile: Bit more cleanup

Added -O2 for the examples too

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agocleanup: Remove codecrusader file
Michel Pollet [Fri, 18 May 2012 11:46:29 +0000 (12:46 +0100)]
cleanup: Remove codecrusader file

Obsolete

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agovhci: Added a patch
Michel Pollet [Fri, 18 May 2012 11:45:52 +0000 (12:45 +0100)]
vhci: Added a patch

Somehow now also need an extra include...

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agodoc: Updated callgraph
Michel Pollet [Fri, 18 May 2012 11:45:18 +0000 (12:45 +0100)]
doc: Updated callgraph

Had'nt updated it in a while

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMakefiles: Updated for build on BSD
Michel Pollet [Fri, 18 May 2012 11:43:53 +0000 (12:43 +0100)]
Makefiles: Updated for build on BSD

Remove reference to explicit 'make' and /bin/bash

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoMigration to github, added some documentation and screenshots
Michel Pollet [Mon, 14 May 2012 10:55:08 +0000 (11:55 +0100)]
Migration to github, added some documentation and screenshots

github seems to have quite a bit more traction, so we're migrating the
primagry tree to github, but will also continue to mirror on gitorious.

Signed-off-by: Michel Pollet <buserror@gmail.com>
11 years agoreprap: Some more updates, also a Marlin binary to test
Michel Pollet [Mon, 14 May 2012 09:33:16 +0000 (10:33 +0100)]
reprap: Some more updates, also a Marlin binary to test

Added a marlin binary that works, to help repsnapper's

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agostepper: Keep position in step numbers, not mm
Michel Pollet [Wed, 18 Apr 2012 09:56:57 +0000 (10:56 +0100)]
stepper: Keep position in step numbers, not mm

More precise, also use a cycle timer to send status positions in mm

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoreprap: Added a 'relief' sleep
Michel Pollet [Wed, 18 Apr 2012 09:49:57 +0000 (10:49 +0100)]
reprap: Added a 'relief' sleep

Tweaked Marlin to do a spurious write to GPIOR0 so allow
the simulator to get some usleep() and not use 100% cpu

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart_pty: Check value of environment variable
Michel Pollet [Wed, 18 Apr 2012 09:48:46 +0000 (10:48 +0100)]
uart_pty: Check value of environment variable

Can set it to 0 to disable the xterm

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agorun_avr: Use the new read_ihex_chunks
Michel Pollet [Wed, 18 Apr 2012 09:47:55 +0000 (10:47 +0100)]
run_avr: Use the new read_ihex_chunks

Still doesn't solve the problem of the avr assembler ihex being sparse,
but at least the problem is no longer int he ihex code.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoihex: Made read_ihexq_chunks allocare the table
Michel Pollet [Wed, 18 Apr 2012 09:46:35 +0000 (10:46 +0100)]
ihex: Made read_ihexq_chunks allocare the table

The table is allocared and returned as the result

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoreprap: Progress
Michel Pollet [Wed, 11 Apr 2012 21:03:02 +0000 (22:03 +0100)]
reprap: Progress

Now the reprap board has fake stepper motors that know their position,
with endstops (they work with Marlin) also there is a way to use
arduidiot pins numbers and remap them to AVR pins..

There is a prototype "heatpot" part that will be used to collect
source and drain of heat and calculafe a temperature.

Also added mongoose embedable web server. The current plan is to
use WebGL to render the graphics of the 3D printer... altho it's
not entirely sure as yet.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocore: Ensure we can run in >64K flash
Michel Pollet [Wed, 11 Apr 2012 20:59:28 +0000 (21:59 +0100)]
core: Ensure we can run in >64K flash

From an original patch from alex Bondarenko <alexian79@gmail.com>
Reworked to add a new type for flash addresses.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomisc: Cleanup & typos
Michel Pollet [Wed, 11 Apr 2012 20:57:37 +0000 (21:57 +0100)]
misc: Cleanup & typos

No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomega1280: Made PORTK work
Michel Pollet [Fri, 6 Apr 2012 17:25:43 +0000 (18:25 +0100)]
mega1280: Made PORTK work

This was triggering a limit in the AVR core IO table

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocore: Increased the number of possible IOs
Michel Pollet [Fri, 6 Apr 2012 17:25:10 +0000 (18:25 +0100)]
core: Increased the number of possible IOs

Also added a sanity check

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoi2ctest: Collapsed both i2ctests into one
Michel Pollet [Fri, 6 Apr 2012 15:31:10 +0000 (16:31 +0100)]
i2ctest: Collapsed both i2ctests into one

Just need one of these

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoi2ctest: Added a mega1280 version
Michel Pollet [Fri, 6 Apr 2012 15:06:46 +0000 (16:06 +0100)]
i2ctest: Added a mega1280 version

Probably will lose either this one, or the older version as they
are exactly the same

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoi2ctest: Moved files to shared
Michel Pollet [Fri, 6 Apr 2012 15:06:05 +0000 (16:06 +0100)]
i2ctest: Moved files to shared

Put the atmel i2c example to a shared directory

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocores: Added mega1280
Michel Pollet [Fri, 6 Apr 2012 15:05:22 +0000 (16:05 +0100)]
cores: Added mega1280

Very little testing was done. ADC was fixed, but still misses the higher
differential channels

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoADC: Grown to 64 possible mux values
Michel Pollet [Fri, 6 Apr 2012 15:02:14 +0000 (16:02 +0100)]
ADC: Grown to 64 possible mux values

Needs a bigger ADC, the mega1280 uses 6 bits.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agotimer: Reconfigure the timer in fast pwm mode
Michel Pollet [Thu, 5 Apr 2012 16:47:12 +0000 (17:47 +0100)]
timer: Reconfigure the timer in fast pwm mode

If OCR* changes, the timer still needs to be reconfigured in fast PWM mode.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoUART: Added a trace macro
Michel Pollet [Thu, 5 Apr 2012 16:46:18 +0000 (17:46 +0100)]
UART: Added a trace macro

Replaces the comments

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agothermistor: Now works
Michel Pollet [Thu, 5 Apr 2012 16:45:34 +0000 (17:45 +0100)]
thermistor: Now works

Return millivolts, not ADC values

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoNew example board: reprap
Michel Pollet [Thu, 5 Apr 2012 14:29:40 +0000 (15:29 +0100)]
New example board: reprap

Proto shell for a reprap emulator. Currently can run Marlin, up to a point
There are lots of stuff to add, but with a bit of luck we could use the
"pins.h" of the firmware itseld to configure the simavr board, and
have it "adapt" to various hardware boards.

Currently the fake thermistor has been moderately tested, and seems to work.
It needs more work, like linear extrapolation, target temps etc.

12 years agoelf: Do not set values that weren't present
Michel Pollet [Thu, 5 Apr 2012 14:27:12 +0000 (15:27 +0100)]
elf: Do not set values that weren't present

Some ELF binaries without a simavr section can now be loaded

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart: Trace the use of the x2 flag
Michel Pollet [Thu, 5 Apr 2012 14:26:29 +0000 (15:26 +0100)]
uart: Trace the use of the x2 flag

No functional change

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agotimer: Added phase correct mode, possibly works
Michel Pollet [Thu, 5 Apr 2012 14:26:05 +0000 (15:26 +0100)]
timer: Added phase correct mode, possibly works

Not tested..

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart_pty: Added a debug terminal
Michel Pollet [Thu, 5 Apr 2012 12:36:20 +0000 (13:36 +0100)]
uart_pty: Added a debug terminal

You can now launch an xterm with picocom by setting environment
SIMAVR_UART_XTERM. This could (will) be improved.

Also, the uart_pty symlinks the pty pathname to /tmp/simavr-uart-X
so you can rely on a constant pathname.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart_udp: Updated, obsolete
Michel Pollet [Thu, 15 Mar 2012 14:19:36 +0000 (14:19 +0000)]
uart_udp: Updated, obsolete

Will probably remive this part in the future

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agosimduino: Updated, uses uart_pty
Michel Pollet [Thu, 15 Mar 2012 14:19:08 +0000 (14:19 +0000)]
simduino: Updated, uses uart_pty

Now works properly again, and uses the new pty part.

Also removed mmap and uses a read/write instead for the flash file,

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart_pty: New part
Michel Pollet [Thu, 15 Mar 2012 14:18:01 +0000 (14:18 +0000)]
uart_pty: New part

This one replaces uart_udp, that was really a toy. This new part simulates
a proper serial port (almost) on the host, and allow connection with minicom
or anything you like.
Properly implemented flow control too, do it's safe at any speed.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoirq: Added an INIT flag
Michel Pollet [Thu, 15 Mar 2012 14:16:34 +0000 (14:16 +0000)]
irq: Added an INIT flag

'filtered' interrupts didn't work if the initial value was the same as the
one used to raise the irq. Now it works properly, can could also be used
to track IRQs in the pool by usage.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agouart: Finaly fixed the xon/xoff
Michel Pollet [Thu, 15 Mar 2012 14:14:59 +0000 (14:14 +0000)]
uart: Finaly fixed the xon/xoff

Now works as intended

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agointerrupts: Delivery fix
Michel Pollet [Thu, 15 Mar 2012 14:14:29 +0000 (14:14 +0000)]
interrupts: Delivery fix

Polled interrupts as for the UART were borken. Now fixed.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agofifo: Small update
Michel Pollet [Thu, 15 Mar 2012 14:13:12 +0000 (14:13 +0000)]
fifo: Small update

Expose the size specified as a constant

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agosimavr: Now use the generated config files
Michel Pollet [Fri, 2 Mar 2012 14:33:03 +0000 (14:33 +0000)]
simavr: Now use the generated config files

Removed the statis tables, use the generated config
Also updated .gitignore

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoMakefile: Generate config files
Michel Pollet [Fri, 2 Mar 2012 14:30:21 +0000 (14:30 +0000)]
Makefile: Generate config files

The Makefile now tries to detect the cores that can
be built using the current avr-gcc install. This allows
simavr to be built with older toolchain that don't have
the latest cores. Like arduidiot.

It also allows generation of an automated core list for
simavr so the run_avr and others don't have to have an
explicit list of cores. They are now autodetected.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoMakefile: OSX Update
Michel Pollet [Fri, 2 Mar 2012 14:27:52 +0000 (14:27 +0000)]
Makefile: OSX Update

Only add the MacPort dir if it's there. This
removes a warning when linking

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoexamples: Exclude USB on non-linux
Michel Pollet [Fri, 2 Mar 2012 14:29:35 +0000 (14:29 +0000)]
examples: Exclude USB on non-linux

Skip USB example and parts on OSX

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoexamples: Updated LCD part for OSX
Michel Pollet [Fri, 2 Mar 2012 14:28:45 +0000 (14:28 +0000)]
examples: Updated LCD part for OSX

Uses the proper include file on OSX

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomisc: Updated .gitignore
Michel Pollet [Fri, 2 Mar 2012 14:27:05 +0000 (14:27 +0000)]
misc: Updated .gitignore

Added OSX turd files

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomisc: Explicitely link libelf
Michel Pollet [Fri, 2 Mar 2012 14:37:09 +0000 (14:37 +0000)]
misc: Explicitely link libelf

Some linker don't understand inherited links

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoexamples: New board_usb
Michel Pollet [Mon, 27 Feb 2012 14:21:16 +0000 (14:21 +0000)]
examples: New board_usb

Automaticaly tries to build the vhci libraries
TODO: Make the whole simavr build work even if the vhci
      compile fails, or is not linux

By: Torbjorn Tyridal <ttyridal@gmail.com>
Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoparts: New vhci usb device bridge
Michel Pollet [Mon, 27 Feb 2012 14:19:15 +0000 (14:19 +0000)]
parts: New vhci usb device bridge

By Torbjorn Tyridal <ttyridal@gmail.com>
Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocores: Added at90usb162
Michel Pollet [Mon, 27 Feb 2012 14:18:24 +0000 (14:18 +0000)]
cores: Added at90usb162

Straight from Torbjorn Tyridal <ttyridal@gmail.com>

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agosimavr: Added usb slave emulation module
Michel Pollet [Mon, 27 Feb 2012 14:17:25 +0000 (14:17 +0000)]
simavr: Added usb slave emulation module

Straight from Torbjorn Tyridal <ttyridal@gmail.com> with
just a bit of source code remangling

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoexamples: Link against .so
Michel Pollet [Mon, 27 Feb 2012 14:00:29 +0000 (14:00 +0000)]
examples: Link against .so

If .so is present, link against that, not the static lib

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agovhci: Fix Makefile PWD
Michel Pollet [Mon, 27 Feb 2012 13:59:27 +0000 (13:59 +0000)]
vhci: Fix Makefile PWD

Somehow PWD is wrong, it's the shell's one not the make one

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoMakefiles: general update
Michel Pollet [Mon, 27 Feb 2012 10:53:28 +0000 (10:53 +0000)]
Makefiles: general update

+ Now uses the shared library if present, and added some
  logic to find where it was built.
+ Added an "official" version number
+ Added a "make install DESTDIR=..." target
+ Added a "simavr.pc" pkg-config file

12 years agoall: Added -Wall to the build
Michel Pollet [Mon, 27 Feb 2012 10:51:23 +0000 (10:51 +0000)]
all: Added -Wall to the build

And fixed the warnings that poped out

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocycle_timers: Fix a delivery problem
Michel Pollet [Sun, 26 Feb 2012 10:58:26 +0000 (10:58 +0000)]
cycle_timers: Fix a delivery problem

If the timer was deleting/inserting timers, it wouldn't
be rescheduled properly.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agovhci: Added a gitignore
Michel Pollet [Sat, 25 Feb 2012 17:59:44 +0000 (17:59 +0000)]
vhci: Added a gitignore

Ignore generated files in there

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agointerrupts: Isolated runtime data
Michel Pollet [Sat, 25 Feb 2012 17:57:59 +0000 (17:57 +0000)]
interrupts: Isolated runtime data

Split the runtime data related to interrupts into it's own
struct, and updated anyone using it directly.
Ultimately it would be the goal not to have to pass an avr_t
around to all the functions.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoregbits: Moved the struct declaration
Michel Pollet [Sat, 25 Feb 2012 17:56:03 +0000 (17:56 +0000)]
regbits: Moved the struct declaration

Moved the data type to sim_avr_types.h, so it doesn't
need the full avr_t type to be used.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agostyle: Updated to 2012
Michel Pollet [Sat, 25 Feb 2012 17:26:33 +0000 (17:26 +0000)]
style: Updated to 2012

Changed prototypes, updared copyright etc

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agovhci: build kernel module & library
Michel Pollet [Sat, 25 Feb 2012 16:25:30 +0000 (16:25 +0000)]
vhci: build kernel module & library

This makefile downloads the vhci bits, hack the a little
and compile them in place.
One done it's left as an excercise to the reader to install
the module where they want.

Example board can then link/compile by adding -I../vhci/include and
-L../vhci/lib to their makefile

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agocycle_timers: Big rework
Michel Pollet [Sat, 25 Feb 2012 14:45:06 +0000 (14:45 +0000)]
cycle_timers: Big rework

Removed the old bitfield, implemented a sorted list. Timers
get added to the list by (reverse) order of execution do acts
as a stack of timers to run and pop out.

This considerably simplifies the code, and also makes the code
that test for the next timer to run very small and efficient.

This should make cycle_timers a lot more scalable, since they are
used for many more uses than they were originaly designed for.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agogeneral: Introduce two new headers
Michel Pollet [Sat, 25 Feb 2012 14:40:40 +0000 (14:40 +0000)]
general: Introduce two new headers

Split the cycle/usec conversion code from the cycle_timer
heacers into it's new sim_time.h

Also removed the simple types out of sim_avr.h to create
new header sim_avr_types.h

Adapted other modules to use avr_time.h

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agotimer: Fix a problem on unconfigured comparators
Michel Pollet [Sat, 25 Feb 2012 14:37:26 +0000 (14:37 +0000)]
timer: Fix a problem on unconfigured comparators

Was trying to calculated and setup comparators that
didn't exists on some cores... confusion ensued.
This fixes the "64 led timer" example.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agointerrupts: Rewrote interrupt delivery
Michel Pollet [Sat, 25 Feb 2012 10:05:23 +0000 (10:05 +0000)]
interrupts: Rewrote interrupt delivery

Now uses a fifo, removed the bitfield.
This allows multiple interrupt "sources" per vector,
and should make delivery a bit quicker too.

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoi2ctest: Make example exit properly
Michel Pollet [Sat, 25 Feb 2012 10:05:59 +0000 (10:05 +0000)]
i2ctest: Make example exit properly

Demo was trying to exit, but the harness wasn't

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agotests: Cleanup the test harnesses
Michel Pollet [Wed, 22 Feb 2012 12:21:27 +0000 (12:21 +0000)]
tests: Cleanup the test harnesses

Removed extra scripts, etc

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agoadc: Fix for non updating ADC values
Michel Pollet [Wed, 22 Feb 2012 11:29:06 +0000 (11:29 +0000)]
adc: Fix for non updating ADC values

Patch from Peter Ross pross@xvid.org

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomakefile: Make -j works
Michel Pollet [Sat, 25 Feb 2012 10:06:34 +0000 (10:06 +0000)]
makefile: Make -j works

Was lacking dependencies

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agomakefile: Don't track system headers
Michel Pollet [Wed, 22 Feb 2012 11:28:18 +0000 (11:28 +0000)]
makefile: Don't track system headers

Otherwise incremental make fails after system updates

Signed-off-by: Michel Pollet <buserror@gmail.com>
12 years agotests: Revert a uart patch
Michel Pollet [Wed, 14 Sep 2011 08:23:27 +0000 (09:23 +0100)]
tests: Revert a uart patch

We do need the translation, as it's not one, but generation of \n\r

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