Problems with Attiny261 V2 or Avra 1.3.0 OSX update

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey someone hopefully!

I am trying to port(/recreate) a project from Atmega16 to Attiny261. The problem I have is thatI I can't get Avra to compile an assembler file for Attiny261. It gives me errors like this:

tn261def.inc(40) : error : Unknown mnemonic/macro: #ifndef
tn261def.inc(41) : error : Unknown mnemonic/macro: #define
tn261def.inc(44) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(48) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(53) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(54) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(784) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(785) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(786) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(787) : error : Unknown mnemonic/macro: #pragma
tn261def.inc(787) : Maximum error count reached. Exiting...

My conclusion from reading different forum posts is that it's because the inc file is V2 and the version of Avra I have only can compile V1(?).

So if that's right I can see to solutions:

1. "downgrade" the inc file to V1
2. install an Avra update

Solutions:
1. I have no idea how to do this! Does anyone know if that's possible? and if so, how to do it? If anyone has done it already, I would very much like a copy of the file!

2. I have downloaded Avra 1.3.0 from here: http://sourceforge.net/projects/...
I am trying to run 'configure' but it gives med these errors:

configure: error: cannot find install-sh or install.sh in . ./.. ./../..

Hope some "UNIX/Linux/OS X experienced person" can tell me what that means!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I was going to give you a copy of the Atmel V1 file for tiny261inc.def but unfortunately the collection of "appnotes" in an AVR Studio installation does not include such a modern model of AVR as the old V1 assembler is deprecated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Well I was going to give you a copy of the Atmel V1 file for tiny261inc.def but unfortunately the collection of "appnotes" in an AVR Studio installation does not include such a modern model of AVR as the old V1 assembler is deprecated.

I Know! So I figured if someone had changed it manually or did know how to do it..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not run the Studio assembler under Wine in Linux? I can run the entire AVR Studio under Wine but you only actually need to get avrasm2.exe working. It's DLL dependency is:

ADVAPI32.DLL
AVRASM2.EXE
GDI32.DLL
KERNEL32.DLL
MSVCRT.DLL
NTDLL.DLL
RPCRT4.DLL
SHLWAPI.DLL
USER32.DLL

If you want to get Studio going then search for a PDF posted here by "aor_dreamer" which gives all the steps necessary to make it work.

Dare I mention it but you could, of course, port the code to avr-as - Linux is its native environment.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Why not run the Studio assembler under Wine in Linux? I can run the entire AVR Studio under Wine but you only actually need to get avrasm2.exe working. It's DLL dependency is:

hmm....maybe, I'm not much into that.

Something tells me that if I have troubles with installing Avra 1.3.0 the "Linux-way" on OS X, I'm going to have some more troubles trying to install Wine and get Studio assembler running that way...

I have a suspicion that the Avra 1.3.0 has some fixes for the isues I'm dealing with. It should be possible to overcome the isues with 'configure: error: cannot find install-sh or install.sh in . ./.. ./../..' if someone has a little Linux exsperience I guess.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not that this helps much by I downloaded the .tar.bz2 to an Ubuntu system and on trying to use "./configure" I got exactly that same error aout install.sh as you did. Yet my PATH includes the "install" command. Obviously the author had something in his build environment that he relied upon that is non-standard. I looked through the docs but it does look like the author expected ./configure to work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Year the same thing here! I just tried it on Ubuntu and got the same error!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

See post #9 in this thread:

http://www.linuxquestions.org/qu...

Just trying it now.

EDIT: as you probably found if you just run that autoreconf command in the avra*/src directory then you can go on and perform the ./configure

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, can run configure now, it generates some files can still not run 'make' though. I get these errors:

cd . && /bin/sh /usr/local/avra_1.3.0/src/missing --run automake-1.10 --gnu 
Makefile.am: required file `./NEWS' not found
Makefile.am: required file `./README' not found
Makefile.am: required file `./AUTHORS' not found
Makefile.am: required file `./ChangeLog' not found
make: *** [Makefile.in] Error 1

I have now copied some of the files from one hierarchy lower, I got these errors left:

  cd . && /bin/sh /usr/local/avra_1.3.0/src/missing --run automake-1.10 --gnu 
Makefile.am: required file `./NEWS' not found
Makefile.am: required file `./ChangeLog' not found
make: *** [Makefile.in] Error 1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just "touch" those files to create empty files with the right names that it's looking for.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good idea! I got one step closer I guess..

There is stil some (header?) files missing I guess:

 cd . && /bin/sh /usr/local/avra_1.3.0/src/missing --run automake-1.10 --gnu 
 cd . && /bin/sh ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"avra\" -DVERSION=\"1.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_MEMSET=1 -DHAVE_STRCHR=1 -DHAVE_STRSTR=1 -I.     -g -O2 -MT avra.o -MD -MP -MF .deps/avra.Tpo -c -o avra.o avra.c
avra.c: In function ‘main’:
avra.c:126: error: ‘EXIT_FAILURE’ undeclared (first use in this function)
avra.c:126: error: (Each undeclared identifier is reported only once
avra.c:126: error: for each function it appears in.)
avra.c:148: error: ‘EXIT_SUCCESS’ undeclared (first use in this function)
make: *** [avra.o] Error 1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok I think I got as far as I can get now. I finally read the README file properly. It says:

Quote:
`make -f
makefiles/Makefiles.osx` and then the executable should be created.

Don't know how I could overlook this that many times. I now get these "errors":

tn261def.inc(44) : PRAGMA directives currently ignored
tn261def.inc(48) : PRAGMA directives currently ignored
tn261def.inc(53) : PRAGMA directives currently ignored
tn261def.inc(54) : PRAGMA directives currently ignored
tn261def.inc(784) : PRAGMA directives currently ignored
tn261def.inc(785) : PRAGMA directives currently ignored
tn261def.inc(786) : PRAGMA directives currently ignored
tn261def.inc(787) : PRAGMA directives currently ignored

I am still interested in if someone knows how to change a inc file from v2 to v1(?), but atleast it ignores the errors now..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to round this out: The Avra-update kind of solved the problem. It doesn't officially support the processor and I get some warnings but no errors and it seems to work fine.