Yenya / ibus-altitude-sensor

I-Bus Altitude Sensor for FlySky Telemetry
GNU General Public License v2.0
28 stars 3 forks source link

With what program did you compile it? #3

Open DavidMez opened 4 years ago

DavidMez commented 4 years ago

With what program did you compile it? I have used make with WinAVR and XLoader. I work for BMP280 with nano, but for bmp180 with pro micro it doesn't work I don't get ibus-sensor.hex

Now I see that the problem only happens when using Pro Micro, With arduino nano it works well for both BMP180 / 280 sensors.

`-------- begin -------- avr-gcc (WinAVR 20100110) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling C: ibus-sensor.c avr-gcc -c -mmcu=atmega32u4 -I. -gdwarf-2 -DF_CPU=16000000UL -DSENSOR_BMP085 -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./ibus-sensor.lst -std=gnu99 -MMD -MP -MF .dep/ibus-sensor.o.d ibus-sensor.c -o ibus-sensor.o In file included from ibus-sensor.c:8: bmp085/bmp085.h:69: warning: function declaration isn't a prototype bmp085/bmp085.h:70: warning: function declaration isn't a prototype bmp085/bmp085.h:71: warning: function declaration isn't a prototype bmp085/bmp085.h:72: warning: function declaration isn't a prototype ibus-sensor.c: In function 'read_adc_sync': ibus-sensor.c:166: error: 'ADCW' undeclared (first use in this function) ibus-sensor.c:166: error: (Each undeclared identifier is reported only once ibus-sensor.c:166: error: for each function it appears in.) ibus-sensor.c: At top level: ibus-sensor.c:375: fatal error: opening dependency file .dep/ibus-sensor.o.d: No such file or directory compilation terminated. make: *** [ibus-sensor.o] Error 1`

Yenya commented 4 years ago

Interesting. Maybe adding different =mmcu can help? It seems it does not have the ADCW register defined during your compilation, but ATmega32u4 definitely has this register.

Yenya commented 4 years ago

And replying to the Subject: I use Linux (currently Fedora 31), GNU Make, avr-gcc (9.2.0), avr-binutils (2.32) and avr-libc (2.0.0).

Ani2003 commented 3 years ago

Sir @Yenya could you please help me where to compile the "ibus-sensor.c" file and upload it to Arduino nano?? Because Arduino ide is only accepting file in .ino format not .c if I am wrong please correct me.

hallskelet commented 3 years ago

Sir @Yenya could you please help me where to compile the "ibus-sensor.c" file and upload it to Arduino nano?? Because Arduino ide is only accepting file in .ino format not .c if I am wrong please correct me.

The easiest way to compile this code is using the AVR ATMEL Studio. This code does not use arduino libraries. But he uses a ready-made board.