tavrasm: Import Toms AVR assembler 1.22

Version 1.22 - January 2005

- Several updates for ATmega (new devices, extended I/O etc.)
  Thanks to Dariusz Kowalewski for these updates.

- Fixed problem with .db 00
  Thanks Mike Hall for reporting this.

- Fixed 'symtab = (new (symbolTableEntry*))[size]' blunder.
  How that ever slipped by GCC is beyond me :-)
  Lots of compilers won't even allow it.
  Thanks to Steven Saunderson for reporting this.
master
Michael Baeuerle 2024-04-26 18:01:51 +02:00
parent 79f92b83c5
commit f9dee9a5f7
8 changed files with 149 additions and 0 deletions

View File

@ -5345,6 +5345,7 @@ SUBDIR+= tamago-anthy
SUBDIR+= tardy
SUBDIR+= task
SUBDIR+= tasks
SUBDIR+= tavrasm
SUBDIR+= tc
SUBDIR+= tc-git
SUBDIR+= tc-hasida-table

14
tavrasm/COMMIT_MSG Normal file
View File

@ -0,0 +1,14 @@
cross/tavrasm: Import Toms AVR assembler 1.22
Version 1.22 - January 2005
- Several updates for ATmega (new devices, extended I/O etc.)
Thanks to Dariusz Kowalewski for these updates.
- Fixed problem with .db 00
Thanks Mike Hall for reporting this.
- Fixed 'symtab = (new (symbolTableEntry*))[size]' blunder.
How that ever slipped by GCC is beyond me :-)
Lots of compilers won't even allow it.
Thanks to Steven Saunderson for reporting this.

5
tavrasm/DESCR Normal file
View File

@ -0,0 +1,5 @@
Toms AVR assembler
Needs LF eol style when compiling source under *NIX.
No longer maintained, but still useful for the old Atmel chips.

29
tavrasm/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $NetBSD$
DISTNAME= tavrasm
PKGNAME= ${DISTNAME}-1.22
CATEGORIES= cross
MASTER_SITES= http://www.tavrasm.org/
DIST_SUBDIR= ${PKGNAME_NOREV}
MAINTAINER= micha@NetBSD.org
HOMEPAGE= http://www.tavrasm.org/
COMMENT= Assember for the Atmel AVR microcontroller family
LICENSE= gnu-gpl-v2
MAKE_JOBS_SAFE= no
USE_LANGUAGES= c c++
FORCE_CXX_STD= c++98
USE_TOOLS+= bison flex
WRKSRC= ${WRKDIR}/tavrasm.122
BUILD_DIRS= src
BUILD_TARGET= tavrasm
pre-build:
cd ${WRKSRC}/src && \
if ! ${TEST} -f Makefile ; then ${LN} -s makefile Makefile ; fi
.include "../../mk/bsd.pkg.mk"

3
tavrasm/PLIST Normal file
View File

@ -0,0 +1,3 @@
@comment $NetBSD$
bin/tavrasm
man/man1/tavrasm.1

7
tavrasm/distinfo Normal file
View File

@ -0,0 +1,7 @@
$NetBSD$
BLAKE2s (tavrasm-1.22/tavrasm.tar.gz) = 1d6a28fc14101bae789d4fc0cd3b2074651bd47760cc3bc73d523e72833c65a4
SHA512 (tavrasm-1.22/tavrasm.tar.gz) = 3039250bd92e2061e9590bbd512e1d8513a18e7dfcafe8c464c795516fb95fd283e7444d1aca6d5695f3bab3ce019e72cb424de21741e780b5a59fafa2427bb6
Size (tavrasm-1.22/tavrasm.tar.gz) = 65692 bytes
SHA1 (patch-src_avrparse.y) = e59c2622dd8faec1de2b027e928ee6aed834ad22
SHA1 (patch-src_makefile) = a41a317184d634ad37ca91a2ebc96fb986ee48df

View File

@ -0,0 +1,15 @@
$NetBSD$
Parameter is const.
--- src/avrparse.y.orig 2004-01-20 01:10:07.000000000 +0000
+++ src/avrparse.y
@@ -63,7 +63,7 @@ int yylex();
/// yyerror //////////////////////////////////////////////////////////////////
-void yyerror(char *s)
+void yyerror(const char *s)
{
s = s; // Used for debugging purposes
}

View File

@ -0,0 +1,75 @@
$NetBSD$
Modify for pkgsrc.
--- src/makefile.orig 2004-12-11 23:51:29.000000000 +0000
+++ src/makefile
@@ -24,29 +24,32 @@ VERSION = 122
### Compiler options #########################################################
-CC = gcc
-CFLAGS = -O2 -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
-CPPFLAGS =
-CCFLAGS = $(CFLAGS) $(CPPFLAGS)
-LINK = -lm -lstdc++
+#CC = c++
+#CFLAGS = -O2 -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
+#CPPFLAGS =
+CCFLAGS = $(CFLAGS) $(CPPFLAGS) -DAVRLANG=LANGUAGE_$(LANGUAGE)
+CCXXFLAGS = $(CXXFLAGS) $(CPPFLAGS) -DAVRLANG=LANGUAGE_$(LANGUAGE)
+#LINK = -lm -lstdc++
OBJS = avrparse.o avrlex.o avrasm.o symbol.o semantic.o utils.o
### Defaul CC files #########################################################
-.cc.o:
+.c.o:
$(CC) -c $(CCFLAGS) $<
+.cc.o:
+ $(CXX) -c $(CCXXFLAGS) $<
### Executable ##############################################################
$(EXENAME): $(OBJS)
- $(CC) $(CCFLAGS) $(OBJS) $(LINK) -o $@
+ $(CXX) $(CCXXFLAGS) $(OBJS) $(LINK) -o $@
### Parser file #############################################################
avrparse.cc: avrparse.y avrasm.hh symbol.hh semantic.hh opcodes.hh
bison -d -o avrparse avrparse.y
mv avrparse avrparse.cc
- mv avrparse.h avrparse.hh
+ cp avrparse.h avrparse.hh
### Scanner file ############################################################
@@ -56,8 +59,8 @@ avrlex.cc: avrparse.cc avrlex.l symbol.h
### Dependencies ############################################################
-avrlex.o: avrlex.l
-avrparse.o: avrparse.y
+avrlex.cc: avrlex.l
+avrparse.cc: avrparse.y
avrasm.o: avrasm.cc avrasm.hh symbol.hh devices.hh messages.hh
symbol.o: symbol.cc symbol.hh avrasm.hh
utils.o: utils.cc utils.hh avrasm.hh messages.hh msg_us.hh msg_de.hh msg_sp.hh
@@ -79,6 +82,16 @@ clean:
rm -rf *.obj
rm -rf *.out
+
+### Install #################################################################
+
+install:
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp tavrasm ${DESTDIR}${PREFIX}/bin
+ mkdir -p ${DESTDIR}${PREFIX}/man/man1
+ cp ../tavrasm.1 ${DESTDIR}${PREFIX}/man/man1
+
+
### Distribution ############################################################
dist: