Hi all,
thats the first mail of the thread I read so I can not really
reconstruct all the things you have allready discussed.
A first idea from my side: autotools are complex and sometimes not
simple to understand. For appending code and understand
how the build must be done I use my handcrafted Makefile with a very
simple structure. Maybe it is easier to read :-) for a first understanding
which files depends on what.
Normaly you simple have to add the files you add to the project to the
corrosponding .am files. But that is the part Bill is supporting me! Thanks!
I have myself no contect to autotools, so I am not the person to help
for build systems.... :-)
ATTENTION:
In my makefile I inlcude a config.h file which only I need! That is the
solution for having a lot off different linux systems with a lot of
different install pathes to the utils we need. So simple add by hand
your pathes and write the things direct into your Makefile and forget
the terrible things arround that. That makefile is MY PERSONAL one, so
dont´t ask why I do it this way... :-)
If you need some more hints simply ask here in simulavr-devel list.
Thanks
Klaus
Hi Bill, Michael,
No offense, but can we move the conversation over to the simulavr-devel list
where it's more appropriate than avr-libc-dev? I've CCed the simulavr-devel
list.
Thanks,
Eric Weddington
-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of William Rivet
Sent: Sunday, September 09, 2007 11:53 AM
To: Michael Hennebry
Cc: [EMAIL PROTECTED]
Subject: [avr-libc-dev] Re: simulavrxx build problems
Ahh...now I remembere.
I don't have time to give a proper response, however I can
say that you
should not look at the Makefile first, you should look at the
corresponding Makefile.am as it is the input that leads to the actual
Makefiles. src/Makefile.am shoudl be helpful.
I'd recommend learning more about the GDB and simulavrpp interface
first. i.e. run your own code in simulavrpp and control it
throguh GDB.
The examples have the basics for that.
If you really need to code to get at the rigiht breakpoints,
then I see
why you are interested in the build...again, the ".am" files are what
you need to look at.
On Sun, 2007-09-09 at 12:11 -0500, Michael Hennebry wrote:
On Sat, 8 Sep 2007, William Rivet wrote:
On Sat, 2007-09-08 at 16:20 -0500, Michael Hennebry wrote:
One of the problems that I'm having is that for
the most part, I can't even read the make files.
What is it you are trying to do?
I have some multi-ATmega168 boards.
They are poorly connected for debugging.
Even when the problem manifests on a processor I can connect to,
timing issues usually defeat the effort.
I would like to be able to simulate interprocessor
communication and charlieplexed LEDs.
I would like to be able to set "breakpoints" based
on criteria complex enough to require code.
To do these things, I will need to edit the source.
I started to write atmega168.h and atmega168.cpp
based on atmega128.h and atmega128.cpp,
but it occured to me that even if I accomplished
that, I wouldn't know what to do with the result.
It would be nice to have overviews of
what makes what from what and what runs what.
This is true. The root directory includes the
conventional INSTALL file
that describes configuring, building and installing. I'm
not saying they
are great, but it can get things started.
I did get it built.
Bill helped me with that,
but I still had to fix things.
What I remember offhand:
Flags for position-independent code.
The directory for python.h
The hexadecimal version number for python.
In the examples directory there is a readme about the
example targets.
It's not much, but that's what exists ATM.
I've run dogdb and do_python.
I'm not clear on what to do to run my own avr code.
I'm reading up on swig,
but I've never used it before.
Does swig make simulavr.py and simulavr_wrap.cpp?
If so, I've been unable to find the Makefile command
that does it.
Is _simulavr.so made from simulavr_wrap.cpp?
Yes. Swig makes interfaces between high level languages
and C/C++ code.
What is the input to swig?
I've not been able to find the swig command in the make files.
What is the startup sequence?
That is, who invokes whom on the way to the main loop?
During the main loop,
who sends what information to the outside world? How?
Who gets information from the outside world? How?
I'm just guessing here though, I'm sorry if I'm off target.
As noted above, I'm going to need to add code to the simulator.
_______________________________________________
AVR-libc-dev mailing list
[EMAIL PROTECTED]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/simulavr-devel
#include the global configuration file
include ../../config.h
# attention: if -DPROF is also defined here the simulation breaks
# after 1000000 steps!!!! Dont wonder about that again :-)
#PROF=-pg
#PROF=-pg -DPROF
#PROF=
#CXX=/opt/linux/bin/g++
#CC=/opt/linux/bin/gcc
#CFLAGS= -g -Wall $(PROF) -O3 -funroll-loops -fstrict-aliasing
-fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16
-falign-jumps-max-skip=15 -falign-loops-max-skip=15 -fomit-frame-pointer
-foptimize-sibling-calls -finline-all-stringops -funit-at-a-time
-funswitch-loops -ffast-math -march=i686 -mtune=pentium3 -I$(BFD)/bfd
CFLAGS= -g -Wall $(PROF) -O2 -mtune=pentium3 -I$(BFD)/bfd -I./../..
#CFLAGS= -g -Wall $(PROF) -O2 -mcpu=pentium3 -I$(BFD)/bfd
CXXFLAGS = $(CFLAGS)
OBJECTS= serialtx.o serialrx.o main.o decoder.o decoder_trace.o gdbserver.o
avrmalloc.o avrerror.o rwmem.o hardware.o hwstack.o hweeprom.o avrdevice.o
irqsystem.o hwtimer.o ui.o hwwado.o hwuart.o hwspi.o hwextirq.o hwtimer01irq.o
hwsreg.o flash.o atmega128.o at8515.o hwmegatimer.o hwmegatimer0123irq.o
helper.o systemclock.o lcd.o keyboard.o trace.o hwmegaextirq.o mysocket.o
memory.o at4433.o hwacomp.o pin.o net.o hwport.o pinatport.o ioregs.o hwad.o
scope.o printable.o application.o
TCL_OBJECTS= serialtx.o serialrx.o main.o decoder.o decoder_trace.o gdbserver.o
avrmalloc.o avrerror.o rwmem.o hardware.o hwstack.o hweeprom.o avrdevice.o
irqsystem.o hwtimer.o ui.o hwwado.o hwuart.o hwspi.o hwextirq.o hwtimer01irq.o
hwsreg.o flash.o atmega128.o at8515.o hwmegatimer.o hwmegatimer0123irq.o
helper.o systemclock.o simulavr_wrap.o lcd.o keyboard.o trace.o hwmegaextirq.o
mysocket.o memory.o at4433.o hwacomp.o pin.o net.o hwport.o pinatport.o
ioregs.o hwad.o scope.o printable.o application.o
TCLHEADER= serialtx.h serialrx.h avrdevice.h at8515.h atmega128.h at4433.h
systemclock.h ui.h hardware.h pin.h net.h trace.h gdb.h lcd.h
simulavr: $(OBJECTS)
$(CXX) $(CFLAGS) $(OBJECTS) $(BFD)/bfd/libbfd.a
$(BFD)/libiberty/libiberty.a -lncurses -lc -lm -o simulavr
# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)
# compile and generate dependency info;
# will also become command-less, prereq-less targets
# sed: strip the target (everything before colon)
# sed: remove any continuation backslashes
# fmt -1: list words one per line
# sed: strip leading spaces
# sed: add trailing colons
%.o: %.c
$(CC) -c $(CFLAGS) $*.c -o $*.o
$(CC) -MM $(CFLAGS) $*.c > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
$(CXX) -MM $(CXXFLAGS) $*.cpp > $*.d
@mv -f $*.d $*.d.tmp
@sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
@sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
@rm -f $*.d.tmp
#special targets for ui-keyboard
keytrans.h: keynumber_to_scancode.dat xcode_to_keynumber.dat kbdgentables
kbdgentables
kbdgentables: kbdgentables.cpp
$(CXX) $(CXXFLAGS) kbdgentables.cpp -o kbdgentables
keyboard.o: keytrans.h
clean:
rm -f *.o simulavr simulavr.so *.bin *.srec *.oo *.om *binm *wrap.c
*wrap.cxx *.so tags *.o.go *_out dump *.d
rm -f keytrans.h kbdgentables
rm -f gmon.out
rm -f *.gch
rm -f *.Plo
rm -rf .deps
rm -rf .libs
simulavr_wrap.cxx: simulavr.i $(TCLHEADER)
swig -c++ simulavr.i
simulavr_wrap.o: simulavr_wrap.cxx
$(CXX) $(CXXFLAGS) simulavr_wrap.cxx -c
simulavr.so: $(TCL_OBJECTS)
$(CXX) $(CXXFLAGS) $(TCL_OBJECTS) -ltcl$(TCL_VERSION)
$(BFD)/bfd/libbfd.a $(BFD)/libiberty/libiberty.a -lc -lm -lncurses -shared -o
simulavr.so
#define ZUHAUSE
#define PRG_WISH "/usr/bin/wish"
#ifndef ZUHAUSE
#define BFD_H "/home/user/rudolphk/avrdownload/binutils-2.14/bfd/bfd.h"
#else
#define BFD_H "/home/zfrdh/avrdownload/binutils-041230/bfd/bfd.h"
#endif
#define VERSION "0.0000001 local version "
#ifdef __DO_NOT_USE_FROM_C_CODE
#if swig is available
all: simulavr simulavr.so
#else swig is not availabe
#all: simulavr
#endif
#if ccache is available
CXX=ccache g++
#else
# CXX= g++
#endif
#some systems have no libtcl.so, they use libtcl8.4 instead so please set TCL_VERSION
#it is allowed to leave TCL_VERSION
TCL_VERSION=8.4
#TCL_VERSION=
#ifndef ZUHAUSE
#BFD= /home/user/rudolphk/avrdownload/binutils-2.14
#else
BFD= /home/zfrdh/avrdownload/binutils-041230
#endif
#endif
_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/simulavr-devel