--- simulavr-0.1.2.2.orig/debian/README.Debian +++ simulavr-0.1.2.2/debian/README.Debian @@ -0,0 +1,9 @@ +simulavr for Debian +------------------- + +simulavr-disp uses xterm to display Warning messages, therefore it has been +added to Recommends. You can run simulavr-disp with -X or --without-xterm +to avoid Warning messages and xterm dependencie. +For more informations see http://bugs.debian.org/437711 + + -- Arthur Loiret Fri, 17 Aug 2007 09:46:21 +0200 --- simulavr-0.1.2.2.orig/debian/changelog +++ simulavr-0.1.2.2/debian/changelog @@ -0,0 +1,163 @@ +simulavr (0.1.2.2-7ubuntu2) xenial; urgency=medium + + * No-change rebuild for ncurses6 transition. + + -- Matthias Klose Sun, 07 Feb 2016 09:45:49 +0000 + +simulavr (0.1.2.2-7ubuntu1) wily; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - Use autotools-dev to update config.{sub,guess} for new arches. + - Remove config.{sub,guess} from .diff.gz. + + -- Logan Rosen Thu, 23 Jul 2015 03:18:34 -0400 + +simulavr (0.1.2.2-7) unstable; urgency=medium + + * QA upload. + Set Maintainer to "Debian QA Group ". + Cf. #739228. + * Fix "ftbfs with GCC-5": apply patch from Brett Johnson: + debian/rules: build with "-std=gnu89". + (Closes: #778119) + + -- gregor herrmann Tue, 21 Jul 2015 18:28:15 +0200 + +simulavr (0.1.2.2-6.2ubuntu1) utopic; urgency=medium + + * Use autotools-dev to update config.{sub,guess} for new arches. + * Remove config.{sub,guess} from .diff.gz. + + -- Logan Rosen Mon, 06 Oct 2014 21:50:50 -0400 + +simulavr (0.1.2.2-6.2) unstable; urgency=low + + * NMU. + * Add patches from Ubuntu: + + [ Ilya Barygin ] + * src/{eeprom,flash,memory}.c: fix possible buffer overflow detected + by FORTIFY_SOURCE, see http://savannah.nongnu.org/bugs/?29049 + * Add missing ${misc:Depends} to binary package dependencies. + (Closes: #572326) + + [ Daniel T Chen ] + * src/disp-vcd/disp.c: Fix FTBFS from unused-but-set-variable error. + (LP: #832944) (Closes: #625433) + + -- gregor herrmann Mon, 24 Oct 2011 16:18:29 +0200 + +simulavr (0.1.2.2-6.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix build with gcc 4.3 by applying #if 0 to unused code and turning + an extern inline function into static inline (Closes: #461668). + * Upgrade Homepage pseudo-field to a real field in debian/control. + + -- Simon McVittie Sat, 05 Apr 2008 21:43:28 +0000 + +simulavr (0.1.2.2-6) unstable; urgency=low + + * Adopting package (Closes: #345830) + * Set compat to 5 + * Add xterm to Recommends and add a README.Debian (Closes: #437711) + * debian/control: Remove toolchain-source from Suggests + * debian/rules: + + Disable tests by default + + Separate configure and build targets + + Fix debian-rules-ignores-make-clean-error + + Allow cross-compiling + + -- Arthur Loiret Fri, 17 Aug 2007 09:52:43 +0200 + +simulavr (0.1.2.2-5) unstable; urgency=low + + * QA upload. + * Reapply changes from 0.1.2.2-3. + * debian/rules: Readd dh_testdir and dh_testroot. + * Conforms to Standards version 3.7.2. + + -- Matej Vela Fri, 21 Jul 2006 09:25:34 +0200 + +simulavr (0.1.2.2-4) unstable; urgency=low + + * QA Group upload orphaning this package + + -- Andrew Pollock Thu, 27 Apr 2006 22:42:43 -0700 + +simulavr (0.1.2.2-3) unstable; urgency=low + + * src/intvects.h (irq_vect_table_index): Use offsetof. Closes: #361603. + * Update config.guess and config.sub to version 2006-02-23. + * Clean up debian/rules. + + -- Shaun Jackman Sun, 9 Apr 2006 12:59:37 -0600 + +simulavr (0.1.2.2-2) unstable; urgency=low + + * Handle new texi2html behaviour. Closes: #345767 + * Update watch file. + * Update policy version to 3.6.2.2. No changes necessary. + * Remove the versioned build depends. Stable (sarge) meets all the + dependencies. + + -- Shaun Jackman Sun, 15 Jan 2006 22:42:24 -0700 + +simulavr (0.1.2.2-1) unstable; urgency=low + + * New upstream release. + * Cast unsigned char* to char* for gcc-4.0 (closes: #302387). + + -- Shaun Jackman Thu, 31 Mar 2005 22:49:37 -0800 + +simulavr (0.1.2.1-3) unstable; urgency=low + + * Fix ARM build by preventing mistaken warning (closes: #271646). + + -- Shaun Jackman Tue, 14 Sep 2004 08:19:56 -0700 + +simulavr (0.1.2.1-2) unstable; urgency=low + + * Change -m avr85xx to -m avr2 (closes: #268292). + + -- Shaun Jackman Sat, 28 Aug 2004 14:18:40 -0700 + +simulavr (0.1.2.1-1) unstable; urgency=low + + * New upstream release. + * Add simulavr-vcd.1. + * Add Carsten Beth to copyright. + * Add Build-Depends: avr-libc (>= 1:1.0.3-1), gcc-avr (>= 1:3.3.2-1), + binutils-avr (>= 2.14-1), debhelper (>> 4.0.0). + * Add Recommends: gcc-avr. + * Add Suggests: toolchain-source. + * Remove Recommends: gdb-avr (Closes: #240555). + * Update Standards-Version: 3.6.1.0 + * Update watch version=2. + + -- Shaun Jackman Sat, 10 Apr 2004 13:54:17 -0700 + +simulavr (0.1.1-4) unstable; urgency=low + + * Fix the build for ia64 (Closes: #168893). + + -- Shaun Jackman Thu, 1 Jan 2004 18:00:19 -0800 + +simulavr (0.1.1-3) unstable; urgency=low + + * (debian/control): Depend avr-libc (>= 20020203-3) (Closes: #168036). + + -- Shaun Jackman Fri, 17 Oct 2003 16:08:35 -0700 + +simulavr (0.1.1-2) unstable; urgency=low + + * Added Build-Depends: avr-libc, gcc-avr, libncurses5-dev. + + -- Shaun Jackman Thu, 31 Oct 2002 17:10:13 -0800 + +simulavr (0.1.1-1) unstable; urgency=low + + * Initial Release. + + -- Shaun Jackman Sat, 5 Oct 2002 23:27:04 -0700 + --- simulavr-0.1.2.2.orig/debian/compat +++ simulavr-0.1.2.2/debian/compat @@ -0,0 +1 @@ +5 --- simulavr-0.1.2.2.orig/debian/control +++ simulavr-0.1.2.2/debian/control @@ -0,0 +1,17 @@ +Source: simulavr +Section: electronics +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian QA Group +Build-Depends: debhelper (>= 5), libncurses5-dev, avr-libc, gcc-avr, binutils-avr, autotools-dev +Standards-Version: 3.7.2 +Homepage: http://savannah.nongnu.org/projects/simulavr + +Package: simulavr +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: xterm, gcc-avr, binutils-avr +Description: Atmel AVR simulator + simulavr simulates the Atmel AVR family of micro-controllers, + emulates a gdb remote target, and displays register and memory + information in real time. --- simulavr-0.1.2.2.orig/debian/copyright +++ simulavr-0.1.2.2/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Shaun Jackman on +2002-10-05. + +It was downloaded from http://savannah.nongnu.org/projects/simulavr + +Upstream Author: Theodore A. Roth + +Copyright: + +Copyright (C) 2001, 2002 Theodore A. Roth +Copyright (C) 2002 Carsten Beth + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common-licenses/GPL +or obtained from the Free Software Foundation. --- simulavr-0.1.2.2.orig/debian/docs +++ simulavr-0.1.2.2/debian/docs @@ -0,0 +1,9 @@ +ProjSummary +AUTHORS +README +README.gdb +README.opcodes +TODO +ChangeLog-2001 +ChangeLog-2002 +ChangeLog-2003 --- simulavr-0.1.2.2.orig/debian/info +++ simulavr-0.1.2.2/debian/info @@ -0,0 +1 @@ +doc/simulavr.info --- simulavr-0.1.2.2.orig/debian/install +++ simulavr-0.1.2.2/debian/install @@ -0,0 +1 @@ +usr/bin --- simulavr-0.1.2.2.orig/debian/manpages +++ simulavr-0.1.2.2/debian/manpages @@ -0,0 +1,3 @@ +simulavr.1 +simulavr-disp.1 +debian/simulavr-vcd.1 --- simulavr-0.1.2.2.orig/debian/postinst.debhelper +++ simulavr-0.1.2.2/debian/postinst.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_installinfo +if [ "$1" = "configure" ]; then + install-info --quiet --section "AVR Programming #SECTION# development tools." "AVR Programming #SECTION# development tools." /usr/share/info/simulavr.info +fi +# End automatically added section --- simulavr-0.1.2.2.orig/debian/prerm.debhelper +++ simulavr-0.1.2.2/debian/prerm.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_installinfo +if [ "$1" = remove ] || [ "$1" = upgrade ]; then + install-info --quiet --remove /usr/share/info/simulavr.info +fi +# End automatically added section --- simulavr-0.1.2.2.orig/debian/rules +++ simulavr-0.1.2.2/debian/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f + +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +CFLAGS = -Wall -g -std=gnu89 +LDFLAGS= -Wl,-z,defs + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + + +configure: configure-stamp +configure-stamp: + dh_testdir + dh_autotools-dev_updateconfig + + ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --disable-tests + + touch $@ + +build: build-stamp +build-stamp: configure + dh_testdir + + $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + + touch $@ + +install: build + dh_testdir + dh_testroot + dh_clean -k + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp + dh_autotools-dev_restoreconfig + dh_clean + [ ! -f Makefile ] || $(MAKE) distclean + +binary-indep: + +binary-arch: install + dh_install -a --sourcedir=debian/tmp + dh_installchangelogs -a ChangeLog + dh_installdeb -a + dh_installdocs -a + dh_installinfo -a + dh_installman -a + dh_compress -a + dh_fixperms -a + dh_strip -a + dh_makeshlibs -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch binary-indep +.PHONY: configure build clean binary-indep binary-arch binary install --- simulavr-0.1.2.2.orig/debian/simulavr-vcd.1 +++ simulavr-0.1.2.2/debian/simulavr-vcd.1 @@ -0,0 +1,31 @@ +.TH SIMULAVR-VCD 1 2004-04-10 "simulavr 0.1.2.1" "User Commands" +.SH NAME +simulavr-vcd \- simulate an Atmel AVR and output VCD (value change dump) +.SH SYNOPSIS +.B simulavr-vcd +[\fB-p\fR|--\fBpfd\fR=\fIFD\fR] FLASH_SIZE SRAM_SIZE SRAM_START EEPROM_SIZE +.SH DESCRIPTION +Writes the output of simulavr from the pipe FD to a VCD (value change +dump) file. +.SS Options +.TP +\fB\-p\fR, \fB\-\-pfd\fR=\fIFD\fR +file descriptor number of the pipe to which simulavr is writing its +output +.SH AUTHOR +Written by Carsten Beth and Theodore A. Roth. + +This manual page was written by Shaun Jackman +for the Debian system. +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright 2002 Carsten Beth, Theodore A. Roth + +simulavr-vcd is free software, covered by the GNU General Public License, +and you are welcome to change it and/or distribute copies of it under +the conditions of the GNU General Public License. +.SH "SEE ALSO" +\fBsimulavr\fR(1), \fBsimulavr-disp\fR(1) + +http://savannah.nongnu.org/projects/simulavr/ --- simulavr-0.1.2.2.orig/debian/watch +++ simulavr-0.1.2.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://savannah.nongnu.org/download/simulavr/ simulavr-(.*)\.tar\.gz debian uupdate --- simulavr-0.1.2.2.orig/doc/Makefile.in +++ simulavr-0.1.2.2/doc/Makefile.in @@ -529,7 +529,7 @@ html: $(info_TEXINFOS) $(TARGET_DOX_HTML) mkdir -p html texi2html -split_node $(srcdir)/$(info_TEXINFOS) - mv *.html html + mv simulavr/*.html html if test -f html/simulavr.html ; then \ cp html/simulavr.html html/index.html ; \ else \ --- simulavr-0.1.2.2.orig/src/avrcore.c +++ simulavr-0.1.2.2/src/avrcore.c @@ -85,18 +85,6 @@ static inline void brk_pt_construct (BreakPt *bp, int pc, uint16_t opcode); static inline void brk_pt_destroy (void *bp); -static inline BreakPt * -brk_pt_new (int pc, uint16_t opcode) -{ - BreakPt *bp; - - bp = avr_new (BreakPt, 1); - brk_pt_construct (bp, pc, opcode); - class_overload_destroy ((AvrClass *)bp, brk_pt_destroy); - - return bp; -} - static inline void brk_pt_construct (BreakPt *bp, int pc, uint16_t opcode) { @@ -109,6 +97,18 @@ bp->opcode = opcode; } +static inline BreakPt * +brk_pt_new (int pc, uint16_t opcode) +{ + BreakPt *bp; + + bp = avr_new (BreakPt, 1); + brk_pt_construct (bp, pc, opcode); + class_overload_destroy ((AvrClass *)bp, brk_pt_destroy); + + return bp; +} + static inline void brk_pt_destroy (void *bp) { @@ -198,18 +198,6 @@ unsigned int sleep_mode); static inline void irq_destroy (void *irq); -static inline Irq * -irq_new (IntVect *vector, int state, unsigned int sleep_mode) -{ - Irq *irq; - - irq = avr_new (Irq, 1); - irq_construct (irq, vector, state, sleep_mode); - class_overload_destroy ((AvrClass *)irq, irq_destroy); - - return irq; -} - static inline void irq_construct (Irq *irq, IntVect *vector, int state, unsigned int sleep_mode) { @@ -223,6 +211,18 @@ irq->sleep_mode = sleep_mode; } +static inline Irq * +irq_new (IntVect *vector, int state, unsigned int sleep_mode) +{ + Irq *irq; + + irq = avr_new (Irq, 1); + irq_construct (irq, vector, state, sleep_mode); + class_overload_destroy ((AvrClass *)irq, irq_destroy); + + return irq; +} + static inline void irq_destroy (void *irq) { --- simulavr-0.1.2.2.orig/src/avrcore.h +++ simulavr-0.1.2.2/src/avrcore.h @@ -284,13 +284,13 @@ extern void avr_core_io_display_names (AvrCore *core); -extern inline uint8_t +static inline uint8_t avr_core_io_read (AvrCore *core, int reg) { return avr_core_mem_read (core, reg + IO_REG_ADDR_BEGIN); } -extern inline void +static inline void avr_core_io_write (AvrCore *core, int reg, uint8_t val) { avr_core_mem_write (core, reg + IO_REG_ADDR_BEGIN, val); --- simulavr-0.1.2.2.orig/src/disp-vcd/config_scanner.c +++ simulavr-0.1.2.2/src/disp-vcd/config_scanner.c @@ -491,6 +491,7 @@ static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif +#if 0 #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); @@ -498,6 +499,7 @@ static int input YY_PROTO(( void )); #endif #endif +#endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; @@ -1174,6 +1176,9 @@ #endif /* ifndef YY_NO_UNPUT */ +#if 0 +/* unused, which gcc 4.3 doesn't like */ + #ifdef __cplusplus static int yyinput() #else @@ -1245,6 +1250,7 @@ return c; } +#endif #ifdef YY_USE_PROTOS --- simulavr-0.1.2.2.orig/src/disp-vcd/disp.c +++ simulavr-0.1.2.2/src/disp-vcd/disp.c @@ -243,28 +243,27 @@ } if ((val >= 26) && (val <= 31)) { - unsigned int areg; switch (val) { case 26: - areg = xreg = (xreg & 0xff00) | (bval & 0xff); + xreg = (xreg & 0xff00) | (bval & 0xff); break; case 27: - areg = xreg = + xreg = (xreg & 0xff) | ((bval << 8) & 0xff00); break; case 28: - areg = yreg = (yreg & 0xff00) | (bval & 0xff); + yreg = (yreg & 0xff00) | (bval & 0xff); break; case 29: - areg = yreg = + yreg = (yreg & 0xff) | ((bval << 8) & 0xff00); break; case 30: - areg = zreg = (zreg & 0xff00) | (bval & 0xff); + zreg = (zreg & 0xff00) | (bval & 0xff); break; case 31: - areg = zreg = + zreg = (zreg & 0xff) | ((bval << 8) & 0xff00); break; } --- simulavr-0.1.2.2.orig/src/disp/disp.c +++ simulavr-0.1.2.2/src/disp/disp.c @@ -839,6 +839,8 @@ areg = zreg = (zreg & 0xff) | ((bval << 8) & 0xff00); break; + default: + areg = 0; } disp_print_addr_reg (val, areg); } --- simulavr-0.1.2.2.orig/src/eeprom.c +++ simulavr-0.1.2.2/src/eeprom.c @@ -392,7 +392,7 @@ line[0] = '\0'; } snprintf (buf, 80, "%02x ", storage_readb (eeprom->stor, i)); - strncat (line, buf, 80); + strncat (line, buf, 80 - strlen(line) - 1); } if (dup > 0) { --- simulavr-0.1.2.2.orig/src/flash.c +++ simulavr-0.1.2.2/src/flash.c @@ -252,7 +252,7 @@ line[0] = '\0'; } snprintf (buf, 80, "%04x ", flash_read (flash, i)); - strncat (line, buf, 80); + strncat (line, buf, 80 - strlen(line) - 1); } if (dup > 0) { --- simulavr-0.1.2.2.orig/src/gdbserver.c +++ simulavr-0.1.2.2/src/gdbserver.c @@ -610,7 +610,7 @@ /* if ( (addr >= 0) && (addr < 32) ) */ if (0) { - snprintf (buf, len * 2, "E%02x", EIO); + snprintf ((char*)buf, len * 2, "E%02x", EIO); } else { @@ -678,10 +678,10 @@ { /* gdb asked for memory space which doesn't exist */ avr_warning ("Invalid memory address: 0x%x.\n", addr); - snprintf (buf, len * 2, "E%02x", EIO); + snprintf ((char*)buf, len * 2, "E%02x", EIO); } - gdb_send_reply (fd, buf); + gdb_send_reply (fd, (char*)buf); avr_free (buf); } --- simulavr-0.1.2.2.orig/src/intvects.h +++ simulavr-0.1.2.2/src/intvects.h @@ -82,8 +82,9 @@ /* Macro to calculate the field index into the structure instead of maintaining an index enumeration. */ +#include #define irq_vect_table_index(vect) \ - ( ((int) (&( ((IntVectTable *)(0)) -> vect))) / sizeof(IntVect) ) + (offsetof(IntVectTable, vect) / sizeof (IntVect)) /* No device will have all of these vectors, but must define a structure which has a slot for each interrupt. If the device doesn't support the --- simulavr-0.1.2.2.orig/src/memory.c +++ simulavr-0.1.2.2/src/memory.c @@ -416,7 +416,7 @@ line[0] = '\0'; } snprintf (buf, 80, "%02x ", mem_read (mem, i)); - strncat (line, buf, 80); + strncat (line, buf, 80 - strlen(line) - 1); } if (dup > 0) { --- simulavr-0.1.2.2.orig/test_asm/test_8515/Makefile.am +++ simulavr-0.1.2.2/test_asm/test_8515/Makefile.am @@ -23,7 +23,7 @@ ## handle these in a sane way. MAINTAINERCLEANFILES = Makefile.in -CLEANFILES = *.elf *.lst *.bin *.hex +CLEANFILES = *.elf *.lst *.bin *.hex $(TEST_PRG) TEST_ASM_SRC = \ test_blink.asm \ @@ -59,7 +59,7 @@ include $(top_srcdir)/Makefile_AVR_Rules -## This is how I download to the stk200 using usip: +## This is how I download to the stk200 using uisp: #download: dl.hex # uisp -dprog=stk200 -dlpt=/dev/parport0 --erase # uisp -dprog=stk200 -dlpt=/dev/parport0 --upload if=dl.hex