simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Getting Started with simulavrxx


From: Joel Sherrill
Subject: [Simulavr-devel] Getting Started with simulavrxx
Date: Fri, 20 Feb 2009 13:51:48 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Hi,

I am trying to get started with simulavrxx and have
some questions.  I am using the Fedora 10 avr tool RPMs.

1) Is "./configure ; make ; make install" the preferred
way to build?
I got most of the way through a build with this but nots
perfect since the .in files in the examples directories
do not get all the @...@ symbols replaced.

Patch with ChangeLog attached for a few issues.  With these
I got a simulavrxx executable on Fedora 10.

2) Can someone explain how to get the gui to run?  It is
trying to load simulavr.so and I don't see it built.

3) Is this how to build and run hello world on the
simulator and print something?

avr-gcc -g -mmcu=atmega128 -o hello main.c

main.c
=====================
#include <stdio.h>
int main() {
 puts( "hello\n" );
}
======================

....../simulavr -f hello -d atmega128 -Texit

If so, where does the output go?  I see nothing but the program
appears to run correctly according to the trace file.

Thanks.

--joel
Joel Sherrill, Ph.D.             Director of Research & Development
address@hidden        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985


2009-02-20  Joel Sherrill <address@hidden>

        * src/Makefile.am: Add avrfactory.cpp.  Add -lz.
        * src/pins.cpp: Add include <limits.h> for INT_MAX.

Index: src/Makefile.am
===================================================================
RCS file: /sources/simulavr/simulavrxx/src/Makefile.am,v
retrieving revision 1.22
diff -u -r1.22 Makefile.am
--- src/Makefile.am     16 Jan 2008 05:46:28 -0000      1.22
+++ src/Makefile.am     20 Feb 2009 19:37:28 -0000
@@ -23,6 +23,7 @@
        atmega128.cpp           \
        avrdevice.cpp           \
        avrerror.cpp            \
+       avrfactory.cpp          \
        avrmalloc.cpp           \
        decoder.cpp             \
        decoder_trace.cpp       \
@@ -124,7 +125,7 @@
 
 simulavr_SOURCES = main.cpp
 
-simulavr_LDADD = libavrsim_pp.la $(AVR_LIBBFD_LIB) $(AVR_LIBIBERTY_LIB)
+simulavr_LDADD = libavrsim_pp.la $(AVR_LIBBFD_LIB) $(AVR_LIBIBERTY_LIB) -lz
 
 $(srcdir)/keyboard.cpp : keytrans.h 
 
@@ -150,4 +151,4 @@
 
 
 
-all-am: $(LIBPYSIMULAVR)
\ No newline at end of file
+all-am: $(LIBPYSIMULAVR)
Index: src/pin.cpp
===================================================================
RCS file: /sources/simulavr/simulavrxx/src/pin.cpp,v
retrieving revision 1.7
diff -u -r1.7 pin.cpp
--- src/pin.cpp 1 Feb 2009 14:38:09 -0000       1.7
+++ src/pin.cpp 20 Feb 2009 19:37:28 -0000
@@ -22,6 +22,7 @@
  */
 
 #include <stdlib.h> // use atoi
+#include <limits.h> // for INT_MAX
 
 #include "pin.h"
 #include "net.h"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]