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
:
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
(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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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.
___
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
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
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
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
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
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
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
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?
--
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
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
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
[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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
47 matches
Mail list logo