and here is the attachment... ;-)
Tobias Sarnowski wrote:
Chris Kuethe wrote:
simulavr is a software simulator for various AVR microcontrollers.
Hi Chris,
today, I want to start learning how to work with AVR microcontrollers
- you made my day - perfect timing ;-)
I have two suggestions for you. At first, add the avr compiler to its
dependencies - the package won't build without it.
BUILD/RUN_DEPENDS=::devel/avr/gcc
(don't know if RUN is nessecary)
The second thing is the location - I discovered all the avr packages
in devel/avr/* like the gcc, the gdb, libc and binutils - it's
probably the right place for the simulator, but that's less important.
Sad that it doesn't compile right now. I attached my build log. I used
your Makefile with the suggested RUN/BUILD_DEPENDS. Looks that just
some includes paths are missing but I don't have the time to track
down the problem atm.
Greetings,
Tobias Sarnowski
===> Building package for avr-gcc-3.4.5p3
Create /usr/ports/packages/i386/all/avr-gcc-3.4.5p3.tgz
Link to /usr/ports/packages/i386/ftp/avr-gcc-3.4.5p3.tgz
Link to /usr/ports/packages/i386/cdrom/avr-gcc-3.4.5p3.tgz
===> Verifying specs: c
===> found c.49.0
===> Installing avr-gcc-3.4.5p3 from /usr/ports/packages/i386/all/
avr-gcc-3.4.5p3: complete
===> Returning to build of simulavr-0.1.2.5
===> simulavr-0.1.2.5 depends on: avr-gcc-* - found
===> Verifying specs: c ncurses c ncurses
===> found c.49.0 ncurses.10.0
===> Configuring for simulavr-0.1.2.5
configure: loading site script /usr/ports/infrastructure/db/config.site
checking build system type... i386-unknown-openbsd4.4
checking host system type... i386-unknown-openbsd4.4
checking target system type... i386-unknown-openbsd4.4
checking for a BSD-compatible install... /usr/bin/install -c -o root -g bin
checking whether build environment is sane... yes
checking for gawk... (cached) nawk
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking lex output file root... (cached) lex.yy
checking whether yytext is a pointer... (cached) yes
checking for bison... yacc
checking whether ln -s works... yes
checking for ranlib... (cached) ranlib
checking for avr-as... avr-as
checking for avr-ld... avr-ld
checking for avr-objcopy... avr-objcopy
checking for avr-objdump... avr-objdump
checking for avr-nm... avr-nm
checking for avr-gcc... avr-gcc
checking for python >= 2.1.1... no
configure: WARNING:
configure: WARNING: Python >= 2.1.1 not found.
configure: WARNING: Regression tests will not be run.
configure: WARNING:
checking for GNU make... gmake
checking for makeinfo... yes
checking for texi2dvi... yes
checking for texindex... yes
checking for tex... no
checking for pdftex... no
checking for texi2html... yes
configure: WARNING:
configure: WARNING: You do not seem to have tetex installed on your system.
configure: WARNING: Documentation will not be build. If you wish to build the
configure: WARNING: documentation files, you will have to install tetex.
configure: WARNING:
checking if user wants a curses display... yes
checking for initscr in -lncurses... yes
checking for resizeterm in -lncurses... yes
checking how to run the C preprocessor... cc -E
checking for egrep... (cached) grep -E
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for termios.h... (cached) yes
checking for unistd.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for an ANSI C-conforming const... (cached) yes
checking for inline... inline
checking for pid_t... (cached) yes
checking for size_t... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for working volatile... (cached) yes
checking for socklen_t... yes
checking for unistd.h... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... (cached) yes
checking for vfork... (cached) yes
checking for working fork... (cached) yes
checking for working vfork... (cached) yes
checking whether cc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... (cached) int,fd_set *,struct timeval *
checking return type of signal handlers... (cached) void
checking for vprintf... (cached) yes
checking for _doprnt... no
checking for atexit... (cached) yes
checking for gettimeofday... (cached) yes
checking for inet_ntoa... (cached) yes
checking for memset... (cached) yes
checking for putenv... (cached) yes
checking for select... (cached) yes
checking for socket... (cached) yes
checking for strdup... (cached) yes
checking for strerror... (cached) yes
checking for strrchr... (cached) yes
checking for strtol... (cached) yes
checking if user wants to build the documentation in pdf format... no
checking for doxygen... no
checking if avr test programs will be built... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.config
config.status: creating regress/Makefile
config.status: creating regress/regress.py
config.status: creating regress/modules/Makefile
config.status: creating regress/test_opcodes/Makefile
config.status: creating src/Makefile
config.status: creating src/getopt/Makefile
config.status: creating src/disp-vcd/Makefile
config.status: creating src/disp/Makefile
config.status: creating test_asm/Makefile
config.status: creating test_asm/test_8515/Makefile
config.status: creating test_c/Makefile
config.status: creating simulavr.spec
config.status: creating simulavr.1
config.status: creating simulavr-disp.1
config.status: creating src/config.h
config.status: executing depfiles commands
===> Building for simulavr-0.1.2.5
Making all in src
make all-recursive
Making all in getopt
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall -Werror
-O2 -pipe -MT gnu_getopt.o -MD -MP -MF ".deps/gnu_getopt.Tpo" -c -o
gnu_getopt.o gnu_getopt.c; then mv -f ".deps/gnu_getopt.Tpo"
".deps/gnu_getopt.Po"; else rm -f ".deps/gnu_getopt.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall -Werror
-O2 -pipe -MT gnu_getopt1.o -MD -MP -MF ".deps/gnu_getopt1.Tpo" -c -o
gnu_getopt1.o gnu_getopt1.c; then mv -f ".deps/gnu_getopt1.Tpo"
".deps/gnu_getopt1.Po"; else rm -f ".deps/gnu_getopt1.Tpo"; exit 1; fi
rm -f libgnugetopt.a
ar cru libgnugetopt.a gnu_getopt.o gnu_getopt1.o
ranlib libgnugetopt.a
Making all in disp
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall
-Winline -Werror -I../../src -I../../src/getopt -O2 -pipe -MT disp.o -MD -MP
-MF ".deps/disp.Tpo" -c -o disp.o disp.c; then mv -f ".deps/disp.Tpo"
".deps/disp.Po"; else rm -f ".deps/disp.Tpo"; exit 1; fi
cc -Wall -Winline -Werror -I../../src -I../../src/getopt -O2 -pipe
-L/usr/local/lib -o simulavr-disp disp.o -lncurses ../getopt/libgnugetopt.a
Making all in disp-vcd
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall
-Winline -Werror -I../../src -I../../src/getopt -O2 -pipe -MT disp.o -MD -MP
-MF ".deps/disp.Tpo" -c -o disp.o disp.c; then mv -f ".deps/disp.Tpo"
".deps/disp.Po"; else rm -f ".deps/disp.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall
-Winline -Werror -I../../src -I../../src/getopt -O2 -pipe -MT vcd.o -MD -MP
-MF ".deps/vcd.Tpo" -c -o vcd.o vcd.c; then mv -f ".deps/vcd.Tpo"
".deps/vcd.Po"; else rm -f ".deps/vcd.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall
-Winline -Werror -I../../src -I../../src/getopt -O2 -pipe -MT config_parser.o
-MD -MP -MF ".deps/config_parser.Tpo" -c -o config_parser.o config_parser.c;
then mv -f ".deps/config_parser.Tpo" ".deps/config_parser.Po"; else rm -f
".deps/config_parser.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/local/include -Wall
-Winline -Werror -I../../src -I../../src/getopt -O2 -pipe -MT
config_scanner.o -MD -MP -MF ".deps/config_scanner.Tpo" -c -o config_scanner.o
config_scanner.c; then mv -f ".deps/config_scanner.Tpo"
".deps/config_scanner.Po"; else rm -f ".deps/config_scanner.Tpo"; exit 1; fi
cc -Wall -Winline -Werror -I../../src -I../../src/getopt -O2 -pipe
-L/usr/local/lib -o simulavr-vcd disp.o vcd.o config_parser.o
config_scanner.o ../getopt/libgnugetopt.a
vcd.o(.text+0x41): In function `vcd_new_signal':
: warning: strcpy() is almost always misused, please use strlcpy()
vcd.o(.text+0x754): In function `vcd_trace_sram':
: warning: sprintf() is often misused, please use snprintf()
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT adc.o -MD -MP -MF ".deps/adc.Tpo" -c -o
adc.o adc.c; then mv -f ".deps/adc.Tpo" ".deps/adc.Po"; else rm -f
".deps/adc.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT avrclass.o -MD -MP -MF
".deps/avrclass.Tpo" -c -o avrclass.o avrclass.c; then mv -f
".deps/avrclass.Tpo" ".deps/avrclass.Po"; else rm -f ".deps/avrclass.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT avrcore.o -MD -MP -MF
".deps/avrcore.Tpo" -c -o avrcore.o avrcore.c; then mv -f ".deps/avrcore.Tpo"
".deps/avrcore.Po"; else rm -f ".deps/avrcore.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT avrerror.o -MD -MP -MF
".deps/avrerror.Tpo" -c -o avrerror.o avrerror.c; then mv -f
".deps/avrerror.Tpo" ".deps/avrerror.Po"; else rm -f ".deps/avrerror.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT avrmalloc.o -MD -MP -MF
".deps/avrmalloc.Tpo" -c -o avrmalloc.o avrmalloc.c; then mv -f
".deps/avrmalloc.Tpo" ".deps/avrmalloc.Po"; else rm -f ".deps/avrmalloc.Tpo";
exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT callback.o -MD -MP -MF
".deps/callback.Tpo" -c -o callback.o callback.c; then mv -f
".deps/callback.Tpo" ".deps/callback.Po"; else rm -f ".deps/callback.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT decoder.o -MD -MP -MF
".deps/decoder.Tpo" -c -o decoder.o decoder.c; then mv -f ".deps/decoder.Tpo"
".deps/decoder.Po"; else rm -f ".deps/decoder.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT device.o -MD -MP -MF ".deps/device.Tpo"
-c -o device.o device.c; then mv -f ".deps/device.Tpo" ".deps/device.Po"; else
rm -f ".deps/device.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT devsupp.o -MD -MP -MF
".deps/devsupp.Tpo" -c -o devsupp.o devsupp.c; then mv -f ".deps/devsupp.Tpo"
".deps/devsupp.Po"; else rm -f ".deps/devsupp.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT display.o -MD -MP -MF
".deps/display.Tpo" -c -o display.o display.c; then mv -f ".deps/display.Tpo"
".deps/display.Po"; else rm -f ".deps/display.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT eeprom.o -MD -MP -MF ".deps/eeprom.Tpo"
-c -o eeprom.o eeprom.c; then mv -f ".deps/eeprom.Tpo" ".deps/eeprom.Po"; else
rm -f ".deps/eeprom.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT flash.o -MD -MP -MF ".deps/flash.Tpo" -c
-o flash.o flash.c; then mv -f ".deps/flash.Tpo" ".deps/flash.Po"; else rm -f
".deps/flash.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT gdbserver.o -MD -MP -MF
".deps/gdbserver.Tpo" -c -o gdbserver.o gdbserver.c; then mv -f
".deps/gdbserver.Tpo" ".deps/gdbserver.Po"; else rm -f ".deps/gdbserver.Tpo";
exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT intvects.o -MD -MP -MF
".deps/intvects.Tpo" -c -o intvects.o intvects.c; then mv -f
".deps/intvects.Tpo" ".deps/intvects.Po"; else rm -f ".deps/intvects.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT main.o -MD -MP -MF ".deps/main.Tpo" -c
-o main.o main.c; then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f
".deps/main.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT memory.o -MD -MP -MF ".deps/memory.Tpo"
-c -o memory.o memory.c; then mv -f ".deps/memory.Tpo" ".deps/memory.Po"; else
rm -f ".deps/memory.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT op_names.o -MD -MP -MF
".deps/op_names.Tpo" -c -o op_names.o op_names.c; then mv -f
".deps/op_names.Tpo" ".deps/op_names.Po"; else rm -f ".deps/op_names.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT ports.o -MD -MP -MF ".deps/ports.Tpo" -c
-o ports.o ports.c; then mv -f ".deps/ports.Tpo" ".deps/ports.Po"; else rm -f
".deps/ports.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT register.o -MD -MP -MF
".deps/register.Tpo" -c -o register.o register.c; then mv -f
".deps/register.Tpo" ".deps/register.Po"; else rm -f ".deps/register.Tpo"; exit
1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT sig.o -MD -MP -MF ".deps/sig.Tpo" -c -o
sig.o sig.c; then mv -f ".deps/sig.Tpo" ".deps/sig.Po"; else rm -f
".deps/sig.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT spi.o -MD -MP -MF ".deps/spi.Tpo" -c -o
spi.o spi.c; then mv -f ".deps/spi.Tpo" ".deps/spi.Po"; else rm -f
".deps/spi.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT sram.o -MD -MP -MF ".deps/sram.Tpo" -c
-o sram.o sram.c; then mv -f ".deps/sram.Tpo" ".deps/sram.Po"; else rm -f
".deps/sram.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT stack.o -MD -MP -MF ".deps/stack.Tpo" -c
-o stack.o stack.c; then mv -f ".deps/stack.Tpo" ".deps/stack.Po"; else rm -f
".deps/stack.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT storage.o -MD -MP -MF
".deps/storage.Tpo" -c -o storage.o storage.c; then mv -f ".deps/storage.Tpo"
".deps/storage.Po"; else rm -f ".deps/storage.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT timers.o -MD -MP -MF ".deps/timers.Tpo"
-c -o timers.o timers.c; then mv -f ".deps/timers.Tpo" ".deps/timers.Po"; else
rm -f ".deps/timers.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT uart.o -MD -MP -MF ".deps/uart.Tpo" -c
-o uart.o uart.c; then mv -f ".deps/uart.Tpo" ".deps/uart.Po"; else rm -f
".deps/uart.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT usb.o -MD -MP -MF ".deps/usb.Tpo" -c -o
usb.o usb.c; then mv -f ".deps/usb.Tpo" ".deps/usb.Po"; else rm -f
".deps/usb.Tpo"; exit 1; fi
if cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -Wall -Winline
-Werror -I../src/getopt -O2 -pipe -MT utils.o -MD -MP -MF ".deps/utils.Tpo" -c
-o utils.o utils.c; then mv -f ".deps/utils.Tpo" ".deps/utils.Po"; else rm -f
".deps/utils.Tpo"; exit 1; fi
cc -Wall -Winline -Werror -I../src/getopt -O2 -pipe -L/usr/local/lib -o
simulavr adc.o avrclass.o avrcore.o avrerror.o avrmalloc.o callback.o
decoder.o device.o devsupp.o display.o eeprom.o flash.o gdbserver.o
intvects.o main.o memory.o op_names.o ports.o register.o sig.o spi.o sram.o
stack.o storage.o timers.o uart.o usb.o utils.o getopt/libgnugetopt.a
Making all in test_c
if avr-gcc -I. -I. -I../src -I. -I/usr/local/include -g -Wall
-mmcu=atmega128 -MT demo.o -MD -MP -MF ".deps/demo.Tpo" -c -o demo.o demo.c;
then mv -f ".deps/demo.Tpo" ".deps/demo.Po"; else rm -f ".deps/demo.Tpo"; exit
1; fi
demo.c:7:22: inttypes.h: No such file or directory
demo.c:8:20: avr/io.h: No such file or directory
demo.c:9:26: avr/pgmspace.h: No such file or directory
demo.c: In function `main':
demo.c:18: error: `uint8_t' undeclared (first use in this function)
demo.c:18: error: (Each undeclared identifier is reported only once
demo.c:18: error: for each function it appears in.)
demo.c:18: error: syntax error before "cnt"
demo.c:20: error: `DDRB' undeclared (first use in this function)
demo.c:22: error: `cnt' undeclared (first use in this function)
demo.c:23: error: `PORTB' undeclared (first use in this function)
*** Error code 1
Stop in /usr/ports/devel/simulavr/w-simulavr-0.1.2.5/simulavr-0.1.2.5/test_c
(line 92 of /usr/share/mk/sys.mk).
*** Error code 1
Stop in /usr/ports/devel/simulavr/w-simulavr-0.1.2.5/simulavr-0.1.2.5 (line 355
of Makefile).
*** Error code 1
Stop in /usr/ports/devel/simulavr (line 2165 of
/usr/ports/infrastructure/mk/bsd.port.mk).