irq: Print errors to stderr
Trying to (dis)connect an invalid IRQ is an error. Note that the
incorrect function name printed in avr_unconnect_irq has been corrected.
twi: Move avr_twi_irq_msg to avr_twi.c
This fixes inclusion of avr_twi.h into C++ files.
interrupts: Don't wake up if not sleeping
This caused the CPU to wake up even if it was explicitly set to
cpu_Stopped.
Makefile: Create .deb files using fpm
Handy way of creating debian packages quickly
Signed-off-by: Michel Pollet <buserror@gmail.com>
examples: Correct instructions for timer_64led example
run_avr: Abort if firmware could not be read
Otherwise, simavr continues and tries to process whichever random memory
content is located in the flash memory section even when the file could
not be read.
examples: hd44780 responds on falling edge of E pin
The example itself works both ways, but the actual HD44780 chip
processes data on the falling edge - see the data sheet.
examples: Fix frequency of ac_input signal
The comment in ac_input.h specifies 50 Hz, but it was actually 500 Hz.
This off-by-one-zero error probably went unnoticed because of inaccurate
sleep handling (which was fixed in the previous commit).
simavr: Improved accuracy of sleep durations
This commit solves (or at least improves) an issue that occurs when
short sleep times are requested in avr_callback_sleep_*. The operating
system cannot accurately handle short sleep requests, and sending many
short requests takes significantly longer than requesting the equivalent
time in longer bursts. This can be observed by running the board_hd77480
example - the counter is much slower when vcd recording is turned on
(= short sleep requests) than when it is turned off (= long sleep
requests).
We improve this situation by accumulating sleep requests until a certain
minimum count of pending usecs is reached which can be handled somewhat
accurately (200 microseconds worked well for me).
gdb: Read/write SREG values correctly
Accessing SREG through gdb seems to have been broken since SREG is no
longer synthesized at each instruction (
2f67001d). As a quick fix, make
SREG accessors public and use them in sim_gdb.
Note that invalid avr->sreg values no longer trigger the CRASH macro.
tests: Correct expected output of atmega88_uart_echo
Carriage return generation was added back to the file handler in
a26a2e43fc4b547090f3069e121713702593261d. Since the string is actually
passed through uart_putchar twice, the received string has a duplicate
'\r' character.
Merge pull request #4 from schuay/markdown_syntax
Markdown syntax
misc: Update repository URL in README
misc: Fix broken links in README.md
misc: Github markdown uses indentation to mark code blocks
misc: Minor wording changes in README.md
misc: Github markdown uses underscores to italicize words
Merge pull request #2 from schuay/watchpoints
Watchpoints
Merge pull request #3 from schuay/not_known
misc: Fix confusing typo in error message
misc: Fix confusing typo in error message
gdb: Use early termination in gdb_watch_find*
gdb: Implemented watchpoint handling
Per data access, we never signal more than one watchpoint. Possible
scenarios are several watchpoints at the same address (for example
WATCH_ACCESS and WATCH_WRITE) or overlapping watchpoint ranges. This is
not completely correct.
gdb: Store watchpoints in avr_gdb_t
For now, quietly assume that all watchpoints are located in SRAM (with
0x800000 offset).
gdb: Prepare watchpoints_t data structure
In preparation for the watchpoint implementation define an
avr_gdb_watchpoints_t struct to handle both. The struct is only accessed
through gdb_watch_* functions, therefore changing its internals should
be easy.
Note that this implementation cannot handle different watchpoints at the
same address with a different size.
The avr_gdb_watch_type enum is public and will be used in sim_core.c in
a follow-up commit.
Merge pull request #1 from schuay/master
Typos, mega1280 ADC channels
mega1280: Added upper ADC differential channels
misc: Fixed a couple of typos in comments
simavr: Makefile tweaks
Added install target too
Signed-off-by: Michel Pollet <buserror@gmail.com>
Makefile: Add a debug log
make V=1 will create a /tmp/simavr_conf.log to help find why
the cores won't compile
Signed-off-by: Michel Pollet <buserror@gmail.com>
libc3: Deleted
Following the reprap board project on github
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Deleted example board
This as become a project in itself, it moves to:
https://github.com/buserror-uk/simreprap.git
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Added shadow mapping
Going to split this project into another one too..
Signed-off-by: Michel Pollet <buserror@gmail.com>
libc3: Make & config tweaks
Now platform independent config headers
Also added a license
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3gl: Made c3gl_program_load public
Useful to reload shaders
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3gl_fbo: added depth texture
... which is different from the depth renderbuffer
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3program: Include digits in uniform names
Somehow they were missing
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3context: Calculate the view projection matrix
Turns out everything was there to do it
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3camera: Added a field-of-view
For calculating perspective matrix
reprap: Updated to reflects changes to libc3
New fbo layer, lights and so on
c3gl_fbo: New bits
Implement the framebuffer objects. It doesn't cover all the cases
but it'll help for now.
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3gl: Implemements lights
Handles (some) fo the light parameters
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3texture: Added a resize() function
Changes the size of the display quad
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3program: can specify uniform order
By passing an array of names, these will occupy the uniform
array first, before the parsing phase populates the list
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3object: Implements 'hidden' objects
Objects and geometry can be hidden from specific c3context_views
using a bitfield
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3geometry: Added a set_dirty() function
Also dirties parent object
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3context: Make sure lights are 'drawn' first
Make sure the light pseudo geometries are always
at the top of the list
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3light: New bit
Records lights position/type and can be carried around
in the geometry, transformed etc.
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3gl: Implemented buffer objects and vertex array objects
Supports vertex objects. Still need support for updating them
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3algebra: Added ortho matrices
Including screen oriented ones
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3geometry: Added geometry buffers
added storage fields for buffer objects
Signed-off-by: Michel Pollet <buserror@gmail.com>
libc3: c_array tweaks
'free' no longer clears the entire struct, only generic
array fields
'realloc' frees the array if passed zero elements
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3context: Added a view draw callback
Unused for now, prepares a view to be drawn
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3geometry: Removed projected vertices
Now uses a world aligned transform matrix. Changed randering code
to use it. Still use a projection matrix for now.
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3algebra: Added frustrum and full perspective
Replacements for glu stuff
Signed-off-by: Michel Pollet <buserror@gmail.com>
c3camera: matrix contains the eye position
Moved stuff around and added the translation to eye coordinates
to the matrix.
Signed-off-by: Michel Pollet <buserror@gmail.com>
spi: Reset the SPI Interrupt Flag
Reset the SPI Interrupt Flag in SPSR uppon read of a SPI byte.
via sebastien.besombes@gmail.com
Signed-off-by: Michel Pollet <buserror@gmail.com>
uart: Made the stdio buffer non-static
Thanks to sebastien.besombes@gmail.com for the report
Signed-off-by: Michel Pollet <buserror@gmail.com>
shared: Removed mongoose
It was never needed in the end
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Split arduidiot_pins for generic use
Returns a simavr irq for an arduinio pin (only for m644 for now)
Signed-off-by: Michel Pollet <buserror@gmail.com>
libc3: remerged
Submodules are a bit sensitive, so I'm remerging this and will use
'git subtree' instead to split libc3 development
Signed-off-by: Michel Pollet <buserror@gmail.com>
gitignore: Updated
Added custom build flags file
Signed-off-by: Michel Pollet <buserror@gmail.com>
simduino: Updated readme
Since it now uses a pty directly
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Uses libc3gl too now
Moved generic code out
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Added support for indexed elements
And spheres
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
libc3: Update
Minor update
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
libc3: Added c3program
To load shader(s)
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: c_utils updates
Added a fre accessors
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
reprap: Implemented the 'heatpot'
Somehow raise a temperature using a score, reduces it automatically etc
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
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>
reprap: c3 update etc
probably last update befire I spin it out
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Delete mongoose
Don't need that anymore
Signed-off-by: Michel Pollet <buserror@gmail.com>
core: Cycle timer small fix
Makes it better on threaded GL on OSX
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: c3 update
Also:
freenode group verification: token jkndwaw234
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
usb: Fix for new compiler
Progmem now need 'const'. Also fixed the makefile
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: Steppers use proper logic
For underflow detection, instead of using a signed value
Signed-off-by: Michel Pollet <buserror@gmail.com>
Makefile: Use CPPFLAGS for -I stuff
CFLAGS is for code generation
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
reprap: c3 documentation
Some documentation. c2 is probably going to be spin out soon
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
misc: Fixes clang warnings
And it found some genuine bugs too
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
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>
reprap: c3 update
Allows having a custom callback set for geometries
Signed-off-by: Michel Pollet <buserror@gmail.com>
gdb: Fixed a warning
-Wall being pedantic
Signed-off-by: Michel Pollet <buserror@gmail.com>
reprap: c3 update
Added tons of stuff to the micro-scene-graph 3D code.
Signed-off-by: Michel Pollet <buserror@gmail.com>
make: Tweaks for freebsd
Use pkg-config if possible, don't use alloca()
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
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>
Makefile: Bit more cleanup
Added -O2 for the examples too
Signed-off-by: Michel Pollet <buserror@gmail.com>
cleanup: Remove codecrusader file
Obsolete
Signed-off-by: Michel Pollet <buserror@gmail.com>
vhci: Added a patch
Somehow now also need an extra include...
Signed-off-by: Michel Pollet <buserror@gmail.com>
doc: Updated callgraph
Had'nt updated it in a while
Signed-off-by: Michel Pollet <buserror@gmail.com>
Makefiles: Updated for build on BSD
Remove reference to explicit 'make' and /bin/bash
Signed-off-by: Michel Pollet <buserror@gmail.com>
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>
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>