Jacob2
21.08.2011, 10:31
Hi!
Ich habe mich ein bisschen mit FemtoOS beschäftigt, d.h. ich habe es immerhin schonmal geschafft ein Beispielprogramm (LED Flash) auf einem ATmega48 zum Laufen zu bringen.
Jetzt wollte ich gerne ein LCD steuern, was ich bisher immer mit P. Fleury's Bibliothek gemacht habe, aber nun bekomme ich 31 Warnungen und das LCD bleibt leer (der schwarze Balken ist aber weg -> vielleicht hat lcd_init() zumindest funktioniert...).
Build started 21.8.2011 at 10:24:05
[...]
../lcdlibrary/lcd.c: In function 'lcd_waitbusy':
../lcdlibrary/lcd.c:294: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c: In function 'lcd_init':
../lcdlibrary/lcd.c:556: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:556: warning: large integer implicitly truncated to unsigned type
../lcdlibrary/lcd.c:562: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:562: warning: large integer implicitly truncated to unsigned type
../lcdlibrary/lcd.c:566: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:570: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:575: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:596:5: warning: "KS0073_4LINES_MODE" is not defined
../lcdlibrary/lcd.c: In function 'lcd_waitbusy':
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:294: warning: called from here
../lcdlibrary/lcd.c: In function 'lcd_init':
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:556: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:562: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:566: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:570: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:575: warning: called from here
avr-gcc -mmcu=atmega48 -mint8 -Wl,--defsym=__stack=xOS+xOSstackShift --param inline-call-cost=2 -ffunction-sections -Wl,--gc-sections -Wl,--relax -Wno-main -Winline -Wundef -fomit-frame-pointer -Wl,-Map=FemtoOS_FlashLeds.map femtoos_startup.o femt
oos_port.o femtoos_shared.o femtoos_core.o code_TestFlashLeds.o lcd.o -o FemtoOS_FlashLeds.elf
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature FemtoOS_FlashLeds.elf FemtoOS_FlashLeds.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex FemtoOS_FlashLeds.elf FemtoOS_FlashLeds.eep || exit 0
avr-objdump -h -S FemtoOS_FlashLeds.elf > FemtoOS_FlashLeds.lss
AVR Memory Usage
----------------
Device: atmega48
Program: 2266 bytes (55.3% Full)
(.text + .data + .bootloader)
Data: 104 bytes (20.3% Full)
(.data + .bss + .noinit)
Build succeeded with 21 Warnings...
Irgendwie scheint er Probleme mit den Integer-Konstanten zu haben, in solchen Zeilen:
294: delay(2);
556: delay(16000);
usw.
Verändert FemtoOS da irgendwelche Einstellungen (kann mir aber keine Vorstellen), weil außerhalb von FemtoOS funktioniert die LCD-Library einwandfrei (ohne Warnungen)...
Ich habe mich ein bisschen mit FemtoOS beschäftigt, d.h. ich habe es immerhin schonmal geschafft ein Beispielprogramm (LED Flash) auf einem ATmega48 zum Laufen zu bringen.
Jetzt wollte ich gerne ein LCD steuern, was ich bisher immer mit P. Fleury's Bibliothek gemacht habe, aber nun bekomme ich 31 Warnungen und das LCD bleibt leer (der schwarze Balken ist aber weg -> vielleicht hat lcd_init() zumindest funktioniert...).
Build started 21.8.2011 at 10:24:05
[...]
../lcdlibrary/lcd.c: In function 'lcd_waitbusy':
../lcdlibrary/lcd.c:294: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c: In function 'lcd_init':
../lcdlibrary/lcd.c:556: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:556: warning: large integer implicitly truncated to unsigned type
../lcdlibrary/lcd.c:562: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:562: warning: large integer implicitly truncated to unsigned type
../lcdlibrary/lcd.c:566: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:570: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:575: warning: integer constant is too large for 'long' type
../lcdlibrary/lcd.c:596:5: warning: "KS0073_4LINES_MODE" is not defined
../lcdlibrary/lcd.c: In function 'lcd_waitbusy':
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:294: warning: called from here
../lcdlibrary/lcd.c: In function 'lcd_init':
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:556: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:562: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:566: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:570: warning: called from here
../lcdlibrary/lcd.c:96: warning: inlining failed in call to '_delayFourCycles': optimizing for size and code size would grow
../lcdlibrary/lcd.c:575: warning: called from here
avr-gcc -mmcu=atmega48 -mint8 -Wl,--defsym=__stack=xOS+xOSstackShift --param inline-call-cost=2 -ffunction-sections -Wl,--gc-sections -Wl,--relax -Wno-main -Winline -Wundef -fomit-frame-pointer -Wl,-Map=FemtoOS_FlashLeds.map femtoos_startup.o femt
oos_port.o femtoos_shared.o femtoos_core.o code_TestFlashLeds.o lcd.o -o FemtoOS_FlashLeds.elf
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature FemtoOS_FlashLeds.elf FemtoOS_FlashLeds.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex FemtoOS_FlashLeds.elf FemtoOS_FlashLeds.eep || exit 0
avr-objdump -h -S FemtoOS_FlashLeds.elf > FemtoOS_FlashLeds.lss
AVR Memory Usage
----------------
Device: atmega48
Program: 2266 bytes (55.3% Full)
(.text + .data + .bootloader)
Data: 104 bytes (20.3% Full)
(.data + .bss + .noinit)
Build succeeded with 21 Warnings...
Irgendwie scheint er Probleme mit den Integer-Konstanten zu haben, in solchen Zeilen:
294: delay(2);
556: delay(16000);
usw.
Verändert FemtoOS da irgendwelche Einstellungen (kann mir aber keine Vorstellen), weil außerhalb von FemtoOS funktioniert die LCD-Library einwandfrei (ohne Warnungen)...