-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device type is not set when compiling for IRIS #402
Comments
Different motes/platforms use different toolchains. The Iris toolchain uses the avr toolchain. Something changed in the toolchain installed via Ubuntu 17.04 so it no longer recognizes the device type used on the IRIS. I don't have the installation to figure this out. So I'd like to encourage you to do the research to figure this out. |
Hi! Is there any update on this issue. Thanks |
there is no update. as I've said someone needs to figure out what the avr toolchain needs to recognize the chip being compiled for. the iris platform calls out the atmega1281 cpu via -mmcu=atmega1281 in support/make/platforms/iris.platform I don't know what the command line sequence for the new avr compiler looks like. You will have to do the research into that. You can see exactly what is being fed to the toolchain by doing "make iris verbose" I have neither the time nor the set up to look into this. Someone who is actively building for the atmegas will have to do the research into the toolchain. |
I did a quick google search for "avr-gcc command line options". Got to this page [https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html] and then searched for "atmega1281" and found avr51. So change the -mmcu=atmega1281 to -mmcu=avr51 in iris.platform. that might work. Seriously, you guys need to put some effort into this. I have no incentive to get this to work, I don't use the avr chips. I'm using ARMs. |
Actually the version of avr-gcc I installed still accepts -mmcu=atmega1281 instead of -mmcu=avr51. |
well that would have been easy. You'll have to dig in there and figure out what this line is bitching about: /usr/lib/gcc/avr/4.9.2/../../../avr/include/avr/io.h:623:6: warning: #warning "device type not defined" When the basic machine definitions are messed up the whole compile blows up. |
The warning is thrown, if no AVR has been defined. This is the corresponding section:
It comes after many ifdefs to check which AVR has been defined. I uploaded the complete file. I thought that one of these devices should be defined by setting the -mmcu. |
it isn't matching any of the AVR<cpu_id>_ if defs. the -mmcu is supposed to set something (I don't know the linkage) that then defines the AVR<cpu_id>_ bits. but I see from above that you got a non-TinyOS program working with -mmcu=atmega1281 that is good to know. please upload the command line you used to compile the non-TinyOS avr blink program and upload the output of "make iris verbose" also what source are you compiling from? this sounds like something got wedged in the tinyos make system. |
The command for compiling the non-TinyOs blink program is: The complete log of |
the "make iris verbose" is using -mmcu=avr51 can you rerun it and fix -mmcu to be atmega1281? should be in support/make/platforms/iris.platform. |
Sorry, forgot to change this back to atmega1281 fom the test with avr51. |
It seems that the avr51 is still used by some commands, although atmega1281 is set in iris.platform. |
how did you install the avr toolchain? and what source are you using? |
Sorry for the very late reply, I missed the notification.. |
Hi,
I tried to install tinyos from source on an Ubuntu 17.04. Compilation of TinyOS works fine. After installation I tried to compile the Blink App for a TelosB mote, which also works fine.
When I try to compile for the iris mote, the avr/io.h complains about "device type not found". I installed gcc-avr and avr-libc from the official ubuntu repositories.
The complete error message is:
The text was updated successfully, but these errors were encountered: