ATNEL tech-forum
https://forum.atnel.pl/

Version: 2024-12 (4.34.0)
https://forum.atnel.pl/topic24787.html
Strona 1 z 1

Autor:  darex120 [ 12 lut 2025, o 18:07 ]
Tytuł:  Version: 2024-12 (4.34.0)

Witam ,mam problem z programem , a mianowicie nie mogę go skompilować w ECLISPS-ie poniżej przesyłam kod


Składnia: [ Pobierz ] [ Ukryj ]
język cpp
Musisz się zalogować, aby zobaczyć kod źródłowy. Tylko zalogowani użytkownicy mogą widzieć kod.

A blędy wyskakuja takie

17:34:59 **** Incremental Build of configuration Release for project test02 ****
make all
'Building file: ../DigitalIn.cpp'
'Invoking: AVR C++ Compiler'
avr-g++ -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega8 -DF_CPU=16000000UL -MMD -MP -MF"DigitalIn.d" -MT"DigitalIn.o" -c -o "DigitalIn.o" "../DigitalIn.cpp"
'Finished building: ../DigitalIn.cpp'
' '
'Building file: ../DigitalOut.cpp'
'Invoking: AVR C++ Compiler'
avr-g++ -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega8 -DF_CPU=16000000UL -MMD -MP -MF"DigitalOut.d" -MT"DigitalOut.o" -c -o "DigitalOut.o" "../DigitalOut.cpp"
'Finished building: ../DigitalOut.cpp'
' '
'Building file: ../ds18b20.cpp'
'Invoking: AVR C++ Compiler'
avr-g++ -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega8 -DF_CPU=16000000UL -MMD -MP -MF"ds18b20.d" -MT"ds18b20.o" -c -o "ds18b20.o" "../ds18b20.cpp"
'Finished building: ../ds18b20.cpp'
' '
'Building file: ../hd44780.cpp'
'Invoking: AVR C++ Compiler'
avr-g++ -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -funsigned-char -funsigned-bitfields -fno-exceptions -mmcu=atmega8 -DF_CPU=16000000UL -MMD -MP -MF"hd44780.d" -MT"hd44780.o" -c -o "hd44780.o" "../hd44780.cpp"
In file included from ../hd44780.cpp:31:0:
../hd44780.h:32:24: fatal error: ../timeout.h: No such file or directory
#include "../timeout.h"
^
compilation terminated.
make: *** [hd44780.o] B��d 1
"make all" terminated with exit code 2. Build might be incomplete.

17:36:35 Build Failed. 1 errors, 0 warnings. (took 1m:35s.918ms)


Przepraszam że w ten sposób wkleiłem ale nie działa mi syntax.

Autor:  mario2015 [ 12 lut 2025, o 18:40 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Nie znam się na c++ , ale po błędach widać, że brakuje ci dołączonych plików nagłówkowych, nie jestem pewien ale kompilator woła na przykład o plik nagłówkowy do pliku np:DigitalIn.cpp itp., oraz że nie może znaleźć pliku liub katalogu:#include "../timeout.h". Pokaż wszystkie includy i drzewko twoich plików i katalogów.

Autor:  darex120 [ 12 lut 2025, o 18:51 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Właśnie wszystkie pliki są załadowane.

Autor:  mirekk36 [ 12 lut 2025, o 22:39 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

darex120 napisał(a):
Właśnie wszystkie pliki są załadowane.

no jak wszystkie jeśli masz błąd jak byk pokazany że brak timeout.h

Autor:  darex120 [ 13 lut 2025, o 07:36 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Tutaj zrzut z eclipsa. Jest załadowany plik timeout.h.


Obrazek

------------------------ [ Dodano po: 2 minutach ]

Teraz znów takie błędy.

07:38:51 **** Build of configuration Release for project test02 ****
make all
'Building target: test02.elf'
'Invoking: AVR C++ Linker'
avr-g++ -Wl,-Map,test02.map,--cref -mrelax -Wl,--gc-sections -Wl,-u,vfprintf -lprintf_flt -lm -Llibprintf_flt.a -Llibm.a -mmcu=atmega8 -o "test02.elf" ./DigitalIn.o ./DigitalOut.o ./ds18b20.o ./hd44780.o ./main.o ./pwm.o
c:/users/panoramix/documents/mkclipse/avr toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: cannot find -lgcc
c:/users/panoramix/documents/mkclipse/avr toolchain/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: cannot find -lgcc
collect2.exe: error: ld returned 1 exit status
make: *** [test02.elf] B��d 1
"make all" terminated with exit code 2. Build might be incomplete.

07:38:54 Build Failed. 2 errors, 0 warnings. (took 2s.805ms)

Autor:  mario2015 [ 13 lut 2025, o 11:29 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Wygląda na to, że masz skopane ścieżki. Zainstaluj ponownie toolchaina i avrdude i usuń spacje w nazwie katalogu "avr toolchain".

Autor:  darex120 [ 13 lut 2025, o 17:33 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Teraz wyskakuje mi taki błąd

17:32:39 **** Incremental Build of configuration Release for project nowy01 ****
make all
'Building target: nowy01.elf'
'Invoking: AVR C++ Linker'
avr-g++ -Wl,-Map,nowy01.map,--cref -s -Wl,--gc-sections -Wl,-u,vfprintf -lprintf_flt -lm -Llibprintf_flt.a -Llibm.a -mmcu=atmega8 -o "nowy01.elf" ./DigitalIn.o ./DigitalOut.o ./ds18b20.o ./hd44780.o ./main.o ./pwm.o
e:/avr/bin/../lib/gcc/avr/4.7.2/../../../../avr/bin/ld.exe: nowy01.elf section `.text' will not fit in region `text'
e:/avr/bin/../lib/gcc/avr/4.7.2/../../../../avr/bin/ld.exe: region `text' overflowed by 2216 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [nowy01.elf] B��d 1
"make all" terminated with exit code 2. Build might be incomplete.

17:32:45 Build Failed. 2 errors, 0 warnings. (took 6s.615ms)



Czyli tak jak by kod był zbyt długi ,co ciekawe gdy zmienie kompilacje naprocesor Atmega328 kompiluje bez problemu.

Autor:  Marhef [ 13 lut 2025, o 17:46 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

A teraz masz za dużo danych w przestrzeni 'text'.
Eclipse'a masz skonfigurowanego pod C++?

Autor:  darex120 [ 13 lut 2025, o 17:49 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Tak

Autor:  mario2015 [ 13 lut 2025, o 18:31 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Mnie się wydaje, że tak jak napisał kolega Marhef, przekroczyłeś pamięć RAM dla ATmega8. ATmega8 z tego co pamiętam ma 1Kb RAM-u a ATmega328 ma 2Kb RAM-u i chyba chodzi o to:
e:/avr/bin/../lib/gcc/avr/4.7.2/../../../../avr/bin/ld.exe: region `text' overflowed by 2216 bytes
ale nie jestem pewien. Może jakiś fachowiec się wypowie na ten temat, bo mi się pomysły skończyły, Jestem trochę za cienki.

Autor:  darex120 [ 13 lut 2025, o 18:43 ]
Tytuł:  Re: Version: 2024-12 (4.34.0)

Mam ogólnie hex-a dla atmega 8 ale chcę pozmieniać ustawienia w programie i dlatego chcę go skompilować więc na pewno się da , ale właśnie jak.

Strona 1 z 1 Strefa czasowa: UTC + 1
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/