Re: [Simulavr-devel] [PATCH] use static callbacks instead of template param for IOReg

2017-07-01 Thread Michael Hennebry
On Sat, 1 Jul 2017, panic wrote: Example: PINx toggle feature DDRB = 0xff; PORTB = 0xff; PINB |= _BV(PB0); // sbi _SFR_IO_REG(PINB), 0 For such things, I recommend against using C code as an example. What the compiler should do with such things is not obvious. In the case of avr-gcc, what it

Re: [Simulavr-devel] [PATCH] use static callbacks instead of template param for IOReg

2017-06-29 Thread Michael Hennebry
: Michael Hennebry: Would something like this help: [snip] To me this looks a bit like reinventing std::function/std::bind. But I'd do something similar to your proposal, using std::function that was added in C++11. GCC in current Debian stable is 6.3.0. Since GCC/g++ 6, -std= defaults to c++14

Re: [Simulavr-devel] [PATCH] use static callbacks instead of template param for IOReg

2017-06-19 Thread Michael Hennebry
(data); } Callback_t(data_t d, void (*f)(data_t)) : data(d), function(f) {} } ; template CallbackBase *mkCallback(D data, void (*function)(D d)) { return new Callback_t(data, function); } Michael Hennebry ___ Simulavr-devel mailing

[Simulavr-devel] SBI vs. PINx and interrupt flag registers

2017-06-19 Thread Michael Hennebry
g, but usually what was desired. The correct method is for the toolchain to provide a mechanism for C users to explicitly generate the desired SBI instruction. Michael Hennebry ___ Simulavr-devel mailing list Simulavr-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Re: [Simulavr-devel] Whats to do on execution of "illegal instruction"

2016-02-06 Thread Michael Hennebry
It seems to me that the way to handle a specific invalid instruction, 0x or anything else, is to add it to the instruction set. If desired, startup code can read a configuration file. -- Michael henne...@web.cs.ndsu.nodak.edu "Sorry but your password must contain an uppercase letter, a

Re: [Simulavr-devel] Whats to do on execution of "illegal instruction"

2016-02-05 Thread Michael Hennebry
On Fri, 5 Feb 2016, Klaus Rudolph wrote: What should happen on "illegal instruction" execution in simulavr: 1) stop simulavr with retrun code !=0 ( as yet imlemented ) 2) act like running on a breakpoint, do not increment program counter 3) report a line on trace output 4) 0x should

Re: [Simulavr-devel] [bug #47017] regression of Bug 34793

2016-01-29 Thread Michael Hennebry
If the problem is gcc-specific, the following might be an appropriate workaround: #ifdef __GNUC__ default: __builtin_unreachable(); #endif - Original Message - From: anonymous To: simulavr-de...@mail.freesoftware.fsf.org Sent: Friday, January 29, 2016 4:02 PM

[Simulavr-devel] logging in to savanah

2016-01-29 Thread Michael Hennebry
button got me to a page that did not help. Any ideas? I'm asking here because I'm not sure who else to ask. Michael Hennebry ___ Simulavr-devel mailing list Simulavr-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Re: [Simulavr-devel] simulAVR UI

2015-05-19 Thread Michael Hennebry
On Tue, 19 May 2015, iOS Dev wrote: Yes it may seem I'm going from portable to non portable, I just decided this because I already have a decent simulator GUI written for windows in MFC/C/C++ a long time ago, so I thought it would be cool to add simulAVR to it. I looked at the test cases, but

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter

2014-03-02 Thread Michael Hennebry
On Sun, 2 Mar 2014, Klaus Rudolph wrote: Was the idea to simplify the usage of all the tools? It is easier to give: avr-gcc -g -O2 -mmcu=atmega16 -o fred.elf -Wl,--section-start=.siminfo=0x90 fred.c instead of including only a header file? The given command line looks much more

Re: [Simulavr-devel] fab feature deprecated

2014-03-01 Thread Michael Hennebry
On Fri, 28 Feb 2014, Onno Kortmann wrote: On 02/28/2014 06:03 PM, Michael Hennebry wrote: I'd thought this was already clear: I was not attacking Onno's suggested code and data organization. I was attacking the notion that the decision to be made is just about taste. The notion had it coming

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter

2014-02-28 Thread Michael Hennebry
On Fri, 28 Feb 2014, ThomasK wrote: this is a good idea. On the other hand ... you'll come in trouble, if somebody tries to use both, signature and siminfo. Signature is just a array of 3 bytes, siminfo is a structure description, with a id tag, a length byte and the payload. Problem is, that

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter

2014-02-28 Thread Michael Hennebry
On Fri, 28 Feb 2014, Klaus Rudolph wrote: Michael Hennebry schrieb: I thought the signature had a symbol associated with it. Could not symbols be used to ascertain the locations of the data in the section? One could still have a problem if other tools do not use the symbol for the signature

Re: [Simulavr-devel] fab feature deprecated

2014-02-28 Thread Michael Hennebry
On Sat, 1 Mar 2014, Markus Hitter wrote: Am 28.02.2014 20:33, schrieb Michael Hennebry: On Thu, 27 Feb 2014, Onno Kortmann wrote: But IMHO the general approach of having a text-based configuration file for AVR topologies, even if those files are kept up to date manually, is still a good idea

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter

2014-02-27 Thread Michael Hennebry
On Wed, 26 Feb 2014, Markus Hitter wrote: Am 26.02.2014 20:31, schrieb Klaus Rudolph: The tricky thing here is to make the linker keeping this section. Typically, code for AVRs is compiled into a binary as small as possible and this also means removing unused sections. So far I couldn't find a

Re: [Simulavr-devel] HWPort pointers

2013-11-18 Thread Michael Hennebry
On Sun, 17 Nov 2013, Petr Hluzín wrote: I'd say make them all static instances. 'Twould eliminate some unneeded indirection. I'm pretty sure they can all be initialized in the pre-body portions of the constructors of the classes that use them. I think you mean to make them member variables.

[Simulavr-devel] [bug #40586] example/feedback does not work

2013-11-15 Thread Michael Hennebry
Follow-up Comment #1, bug #40586 (project simulavr): In a newer 8-bit AVR, PINF=0x0F would toggle the lower nybble of PORTF. ATmega128's are not newer 8-bit AVR's. ___ Reply to this item at: http://savannah.nongnu.org/bugs/?40586

Re: [Simulavr-devel] [bug #40593] Yet another example, simple_serial

2013-11-15 Thread Michael Hennebry
On Sat, 16 Nov 2013, Valber wrote: How to manually change the value of PIN?? Example needed? You don't. You change the value of PORT. -- Michael henne...@web.cs.ndsu.nodak.edu You get down off a duck. ___ Simulavr-devel mailing list

[Simulavr-devel] [bug #40586] example/feedback does not work

2013-11-15 Thread Michael Hennebry
Follow-up Comment #5, bug #40586 (project simulavr): The toggle PORT with PIN flag is probably in atmega128.h . The flag likely gets passed to a HWPort constructor. In any case, on an atMega128, assignments to PIN registers should fail. ___

Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue

2012-03-19 Thread Michael Hennebry
Neither the original nor the proposed code works as advertised. ms is supposed to be tenths of milliseconds, so I renamed it. // Delay in 1/10's of a millisecond // won't work with -O0, use -O1 for debugging void msleep(INT16U ms10) { for( ; ms10; --ms10) _delay_ms(0.1); } } -O0 really is

[Simulavr-devel] [bug #35737] new awr-gcc is picky about depreciated constants

2012-03-12 Thread Michael Hennebry
Follow-up Comment #3, bug #35737 (project simulavr): prog_char is something else to get rid of. It's not supposed to work. That it does is a compiler bug. In avr-g++, it doesn't work. That libc has it was a poor choice that causes occasional discussion on avrfreaks, especially when someone tries

Re: [Simulavr-devel] build fails

2011-12-13 Thread Michael Hennebry
IIRC you first need to invoke a bootstrap program that calls autotools. autotools will fail if the phase of the moon is wrong. -- Michael henne...@web.cs.ndsu.nodak.edu On Monday, I'm gonna have to tell my kindergarten class, whom I teach not to run with scissors, that my fiance ran me

[Simulavr-devel] atmega168 thoroughness

2011-02-26 Thread Michael Hennebry
How thorough is the simulation of atmega168s and their siblings? For example, some of the code I would like to test depends on an assignment to SPDR changing MISO even when SCK isn't changing. -- Michael henne...@web.cs.ndsu.nodak.edu Pessimist: The glass is half empty. Optimist: The glass

Re: [Simulavr-devel] atmega168 thoroughness

2011-02-26 Thread Michael Hennebry
On Sun, 27 Feb 2011, Petr Hluzín wrote: On 27 February 2011 00:25, Michael Hennebry henne...@web.cs.ndsu.nodak.edu wrote: How thorough is the simulation of atmega168s and their siblings? For example, some of the code I would like to test depends on an assignment to SPDR changing MISO even when

RE: [Simulavr-devel] ATmega644

2011-02-23 Thread Michael Hennebry
On Wed, 23 Feb 2011, Boyapati, Anitha wrote: -Original Message- From: simulavr-devel-bounces+anitha.boyapati=atmel@nongnu.org [mailto:simulavr-devel-bounces+anitha.boyapati=atmel@nongnu.org] On Behalf Of Michael Hennebry Sent: Tuesday, February 22, 2011 10:11 PM To: David Madden

Re: [Simulavr-devel] Python again ;-) and some other things

2009-06-27 Thread Michael Hennebry
On Sat, 27 Jun 2009, Onno Kortmann wrote: How do you model external hardware/periphery of the AVRs? I am very interested in this, See net.h . IIRC the class Net is a representation of a netlist. A pin can be a pin of a port or a pin of a peripheral. I expect the global clock has to be told

RE: [Simulavr-devel] Use of Python in simulavrxx

2009-03-15 Thread Michael Hennebry
On Sun, 15 Mar 2009, Weddington, Eric wrote: Does autoconf work now? Yes. If so, with what versions? It should tell you if you don't have the correct versions. Just checkout from CVS and run it. :-) ./configure, make all install. Does it only compile in the source directory? --

Re: [Simulavr-devel] Use of Python in simulavrxx

2009-03-14 Thread Michael Hennebry
On Sat, 14 Mar 2009, Joerg Wunsch wrote: As Michael Hennebry wrote: I've not done any interlanguage linking with python before. So far, my greatest feats of interlanguage linking are BAL/FORTRAN, C++/FORTRAN, and AVR-assembly/C. That sounds esoteric enough so you could handle any mainstream

Re: [Simulavr-devel] anacomp example

2009-02-24 Thread Michael Hennebry
On Tue, 24 Feb 2009, Klaus Rudolph wrote: Knut Schwichtenberg schrieb: just a short question: What the h... has happened to the extended documentation and examples I wrote and sent to Willam aprox. one year ago? Several open issues missing in the ordinary documentation have been answered by

Re: [Simulavr-devel] Multiple CPU - Architecture discussion

2008-09-07 Thread Michael Hennebry
On Sun, 7 Sep 2008, Knut Schwichtenberg wrote: The main question is: Where do we get the input to create the files (either Hardcoding or Configuration Files)? My first idea are the Partdescription Files from Atmel's AVRStudio. These are XML-files describing twice(!) several CPU specific

[Simulavr-devel] make do didn't

2008-06-09 Thread Michael Hennebry
[EMAIL PROTECTED] ad]$ make do wish ./check.tcl simulavr loaded No connect to socket possible now... retry Connection refused User Interface Connection opened by host 127.0.0.1 port New Connection on GUI Server established! Socket: sock9 from Address 127.0.0.1 and port 52477 Dummy Pin At

[Simulavr-devel] Re: Error in startup script: can't find package Itcl

2008-06-07 Thread Michael Hennebry
On Fri, 6 Jun 2008, Michael Hennebry wrote: make wrote: Error in startup script: can't find package Itcl I got that message both from make check and from make debug (the README incorrectly says checkdebug) in simulavrxx_klaus/examples/anacomp . [EMAIL PROTECTED] anacomp]$ locate Itcl

Re: [Simulavr-devel] Re: Error in startup script: can't find package Itcl

2008-06-07 Thread Michael Hennebry
On Sat, 7 Jun 2008, Klaus Rudolph wrote: Michael Hennebry schrieb: On Fri, 6 Jun 2008, Michael Hennebry wrote: make wrote: Error in startup script: can't find package Itcl I got that message both from make check and from make debug (the README incorrectly says checkdebug

[Simulavr-devel] Error in startup script: can't find package Itcl

2008-06-06 Thread Michael Hennebry
make wrote: Error in startup script: can't find package Itcl I got that message both from make check and from make debug (the README incorrectly says checkdebug) in simulavrxx_klaus/examples/anacomp . [EMAIL PROTECTED] anacomp]$ locate Itcl

Re: [Simulavr-devel] simulavrxx timers

2008-06-02 Thread Michael Hennebry
On Mon, 2 Jun 2008, Klaus Rudolph wrote: If there is no other work todo, we can have a merge to cvs. But my actual version is out via bz2 download, so there is no need to have this merge fast :-) Maybe give a information in news. I.e. the May 29 tar.bz2 file is the latest and greatest, not

Re: [Simulavr-devel] simulavrxx timers

2008-06-02 Thread Michael Hennebry
On Mon, 2 Jun 2008, Klaus Rudolph wrote: Michael Hennebry schrieb: I.e. the May 29 tar.bz2 file is the latest and greatest, not CVS? Yes! The first patches that I am likely to want to contribute would just change whitespace and add comments. I format sources automatic by vi (cmd:gg=G

Re: [Simulavr-devel] simulavrxx timers

2008-05-30 Thread Michael Hennebry
On Fri, 30 May 2008, Klaus Rudolph wrote: Michael Hennebry schrieb: In HWMegaTimer0::CpuCycle(), there is an 8-case switch (tccr) statement. Its cases are the possible clock select values. Is that correct? Right! tccr contains more than the CS bits, Right! Rest of bits

Re: [Simulavr-devel] simulavrxx timers

2008-05-27 Thread Michael Hennebry
On Tue, 27 May 2008, Klaus Rudolph wrote: Hi Michael, If I understand the timer classes correctly, HWMegaTimer0::t0_old is unused. It is used and gives the old / last state from the pin. HWMegaTimer0 doesn't have pin_t0. Is this correct? See above :-) Yup. If I remove

[Simulavr-devel] simulavrxx timers

2008-05-26 Thread Michael Hennebry
If I understand the timer classes correctly, HWMegaTimer0::t0_old is unused. HWMegaTimer0 doesn't have pin_t0. Is this correct? Timer0 in an atmega168 doesn't have quite the same set of features as any atmega128 timer. That will require me to write another timer class. My thought is to write

[Simulavr-devel] comments on documentation

2008-04-26 Thread Michael Hennebry
On Fri, 25 Apr 2008, Knut Schwichtenberg wrote: Michael Hennebry wrote: On Tue, 15 Apr 2008, Knut Schwichtenberg wrote: BTW: Some month ago I asked the readers of this list to comment on a documentation update. Either my English is perfect - which I can't believe - or nobody read

Re: [Simulavr-devel] Simulavr error / Documentation

2008-04-25 Thread Michael Hennebry
On Fri, 25 Apr 2008, Knut Schwichtenberg wrote: But now I back to the documentation: Michael Hennebry wrote: On Tue, 15 Apr 2008, Knut Schwichtenberg wrote: BTW: Some month ago I asked the readers of this list to comment on a documentation update. Either my English is perfect - which I

Re: [Simulavr-devel] Simulavr error

2008-04-17 Thread Michael Hennebry
On Thu, 17 Apr 2008, Klaus Rudolph wrote: My wish is very simple: Let the user use simulavrxx. Is there a problem having Makefile, autotools and CMake in parallel and a well documented way how to use them? Documentaion, what a wonderful idea. (*) For my Makefile it is simple: edit config.h

Re: [Simulavr-devel] Simulavr error

2008-04-16 Thread Michael Hennebry
On Tue, 15 Apr 2008, Knut Schwichtenberg wrote: BTW: Some month ago I asked the readers of this list to comment on a documentation update. Either my English is perfect - which I can't believe - or nobody read it - which can be interpreted as a level of interest in simulavrxx, but I did not

RE: [Simulavr-devel] Simulavr error

2008-04-11 Thread Michael Hennebry
On Fri, 11 Apr 2008, William Rivet wrote: If there is interest in simulavrxx, pipe up. I tend to spend time on this when I get people asking questions (like this :-) ) Depending on what Dhruvesh is doing, perhaps he could test out my CMake based build of simulavrxx. That's a bumpy ride on

Re: [Simulavr-devel] RE: [avr-libc-dev] Re: simulavrxx build problems

2008-03-08 Thread Michael Hennebry
On Thu, 28 Feb 2008, Klaus Rudolph wrote: So far I've managed to produce simulavr and simulavr.so . Any suggestions for running the examples? Have you problems compiling the avr-sources or running the tcl scripts? for avr: avr-gcc main.c -mmcu=at90s4433 -o anacomp anacomp.c for tcl:

Re: [Simulavr-devel] sample build...

2008-01-14 Thread Michael Hennebry
at 22:44 -0600, Michael Hennebry wrote: On Sat, 12 Jan 2008, William Rivet wrote: I saw the attachments :-) Sure enough, in the src/Makefile.am I use := instead of =. Are you using GNU make? If so, this should not be a problem. I think this is the autotools (correclty) pointing out

Re: [Simulavr-devel] sample build...

2008-01-12 Thread Michael Hennebry
On Sat, 12 Jan 2008, William Rivet wrote: I saw the attachments :-) Sure enough, in the src/Makefile.am I use := instead of =. Are you using GNU make? If so, this should not be a problem. I think this is the autotools (correclty) pointing out a possible portability issue, safely ignored for