Svetelektro.com

Svetelektro.com

Meno:
Heslo:
SVETELEKTRO • Atmel studio kompilacia

Atmel studio kompilacia

V┼íetko ─Źo sa t├Żka mikropo─Ź├şta─Źov + Sekcia Arduino

Moderátori: psichac, Moderátori

Atmel studio kompilacia

Odosla┼ąod pajky » 12 Jan 2018, 19:38

Caute.
Prosim Vas o radu. Pri kompilacii projektu v Atmel studiu7 mi vypise chybu dajme tomu

cannot find -lio.h

pricom v projekte mam #include <avr/io.h>
cesta he zadana spravne, samo studio mi ju vyhlada pri zadavani.
toto mi robi pri kazdej library. pridava pred nazov l.
co s tym je?
pajky
Obr├ízok pou┼ż├şvate─ża
Pokro─Źil├Ż ─Źlen
Pokro─Źil├Ż ─Źlen
Pr├şspevky: 781
Zalo┼żen├Ż: 03.01.2009
Bydlisko: Cadca
Karma: 6

Re: Atmel studio kompilacia

Odosla┼ąod peterple » 12 Jan 2018, 21:59

pozri Project Properties Toolchain AVR/GNU C Compiler - All Options
K├│d: Vybra┼ą v┼íetko
-x c -funsigned-char -funsigned-bitfields -DDEBUG  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\include"  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.132\gcc\dev\atmega328p" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"

Ja tam m├ím nie─Źo tak├ęto.

Typujem to na chybu v Directories Include Paths
Uk├í┼ż m├║dremu chybu a on sa ti po─Ćakuje. Uk├í┼ż chybu hlup├íkovi a on sa uraz├ş.
peterple
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 1775
Vek: 52.03
Zalo┼żen├Ż: 25.06.2013
Bydlisko: Krajn├ę
Karma: 48

Re: Atmel studio kompilacia

Odosla┼ąod pajky » 15 Jan 2018, 19:28

v AVR/GNU linker mam:

-nodefaultlibs -Wl,-Map="$(OutputFileName).map" -Wl,--start-group -Wl,-llcd1.h -Wl,-lio.h -Wl,-ldelay.h -Wl,--end-group -Wl,-L"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util" -Wl,-L"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr" -Wl,-L"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\import" -Wl,--gc-sections -mrelax -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560"

uz tu mi to pridava to L.

AVR/GNU Compiler mam takto

-x c -funsigned-char -funsigned-bitfields -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\include" -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"


ale tieto veci sa nedaju prepisat, cim to zmenim?
pajky
Obr├ízok pou┼ż├şvate─ża
Pokro─Źil├Ż ─Źlen
Pokro─Źil├Ż ─Źlen
Pr├şspevky: 781
Zalo┼żen├Ż: 03.01.2009
Bydlisko: Cadca
Karma: 6

Re: Atmel studio kompilacia

Odosla┼ąod peterple » 15 Jan 2018, 20:49

linker n├ís teraz moc nezauj├şma ke─Ć nejde prelo┼żi┼ą .c
V nastaven├ş preklada─Źa chybu nevid├şm. Meni┼ą sa to d├í v t├Żch jednotliv├Żch podzlo┼żk├ích. To ─Źo vid├ş┼í je potom komplet co sa narve do pr├şkazovej riadky.
sk├║s sem da┼ą komplet v├Żpis kompil├ítora. Mo┼żno ti tam unik├í nejak├í podstatn├í vec.
Uk├í┼ż m├║dremu chybu a on sa ti po─Ćakuje. Uk├í┼ż chybu hlup├íkovi a on sa uraz├ş.
peterple
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 1775
Vek: 52.03
Zalo┼żen├Ż: 25.06.2013
Bydlisko: Krajn├ę
Karma: 48

Re: Atmel studio kompilacia

Odosla┼ąod OM0XA » 15 Jan 2018, 21:50

nepridava ti tam ziadne "l" ani "L", je to prepinac preprocesora a za nim je nazov suboru, ktory sa ma pridat do spracovania.
OM0XA
St├íly ─Źlen
St├íly ─Źlen
Pr├şspevky: 220
Zalo┼żen├Ż: 03.10.2012
Bydlisko: Poprad
Karma: 2

Re: Atmel studio kompilacia

Odosla┼ąod pajky » 13 Feb 2018, 16:06

tak zase nieco. skusil som novy projekt a kompilacia vypise chybu


Error undefined reference to `lcd_init()'

pricom mam hd44780.h pridane

tu je makefile

K├│d: Vybra┼ą v┼íetko
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

SHELL := cmd.exe
RM := rm -rf

USER_OBJS :=

LIBS :=
PROJ :=

O_SRCS :=
C_SRCS :=
S_SRCS :=
S_UPPER_SRCS :=
OBJ_SRCS :=
ASM_SRCS :=
PREPROCESSING_SRCS :=
OBJS :=
OBJS_AS_ARGS :=
C_DEPS :=
C_DEPS_AS_ARGS :=
EXECUTABLES :=
OUTPUT_FILE_PATH :=
OUTPUT_FILE_PATH_AS_ARGS :=
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
QUOTE := "
ADDITIONAL_DEPENDENCIES:=
OUTPUT_FILE_DEP:=
LIB_DEP:=
LINKER_SCRIPT_DEP:=

# Every subdirectory with source files must be described here
SUBDIRS :=


# Add inputs and outputs from these tool invocations to the build variables
C_SRCS +=  \
../main.cpp


PREPROCESSING_SRCS +=


ASM_SRCS +=


OBJS +=  \
main.o

OBJS_AS_ARGS +=  \
main.o

C_DEPS +=  \
main.d

C_DEPS_AS_ARGS +=  \
main.d

OUTPUT_FILE_PATH +=GccApplication3.elf

OUTPUT_FILE_PATH_AS_ARGS +=GccApplication3.elf

ADDITIONAL_DEPENDENCIES:=

OUTPUT_FILE_DEP:= ./makedep.mk

LIB_DEP+=

LINKER_SCRIPT_DEP+=


# AVR32/GNU C Compiler



./%.o: .././%.cpp
   @echo Building file: $<
   @echo Invoking: AVR8/GNU C Compiler : 5.4.0
   $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\include"  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560" -c -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"   -o "$@" "$<"
   @echo Finished building: $<
   



# AVR32/GNU Preprocessing Assembler



# AVR32/GNU Assembler




ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

# Add inputs and outputs from these tool invocations to the build variables

# All Target
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)

$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
   @echo Building target: $@
   @echo Invoking: AVR8/GNU Linker : 5.4.0
   $(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="GccApplication3.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,-L"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\import"  -Wl,--gc-sections -mrelax -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560" 
   @echo Finished building target: $@
   "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures  "GccApplication3.elf" "GccApplication3.hex"
   "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom  --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0  --no-change-warnings -O ihex "GccApplication3.elf" "GccApplication3.eep" || exit 0
   "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "GccApplication3.elf" > "GccApplication3.lss"
   "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "GccApplication3.elf" "GccApplication3.srec"
   "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "GccApplication3.elf"
   
   





# Other Targets
clean:
   -$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES) 
   -$(RM) $(C_DEPS_AS_ARGS)   
   rm -rf "GccApplication3.elf" "GccApplication3.a" "GccApplication3.hex" "GccApplication3.lss" "GccApplication3.eep" "GccApplication3.map" "GccApplication3.srec" "GccApplication3.usersignatures"
   



tu je build


K├│d: Vybra┼ą v┼íetko
------ Build started: Project: GccApplication3, Configuration: Debug AVR ------
Build started.
Project "GccApplication3.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\pajky\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\GccApplication3.cppproj" (target "Build" depends on it):
   Task "RunCompilerTask"
      Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
      C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync
      Building file: .././main.cpp
      Invoking: AVR8/GNU C Compiler : 5.4.0
      "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe" -funsigned-char -funsigned-bitfields -DDEBUG  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\include"  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560" -c -MD -MP -MF "main.d" -MT"main.d" -MT"main.o"   -o "main.o" ".././main.cpp"
      Finished building: .././main.cpp
      main.o: In function `main':
C:\Users\pajky\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\main.cpp(27,1): error: undefined reference to `lcd_init()'
collect2.exe(0,0): error: ld returned 1 exit status
      make: *** [GccApplication3.elf] Error 1
      Building target: GccApplication3.elf
      Invoking: AVR8/GNU Linker : 5.4.0
      "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe" -o GccApplication3.elf  main.o   -Wl,-Map="GccApplication3.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,-L"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\import"  -Wl,--gc-sections -mrelax -mmcu=atmega2560 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega2560" 
C:\Users\pajky\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\Debug\Makefile(108,1): error: recipe for target 'GccApplication3.elf' failed
      The command exited with code 2.
   Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "GccApplication3.cppproj" -- FAILED.
Done building project "GccApplication3.cppproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Pr├şlohy
Clipboard01.jpg
pajky
Obr├ízok pou┼ż├şvate─ża
Pokro─Źil├Ż ─Źlen
Pokro─Źil├Ż ─Źlen
Pr├şspevky: 781
Zalo┼żen├Ż: 03.01.2009
Bydlisko: Cadca
Karma: 6

Re: Atmel studio kompilacia

Odosla┼ąod pajky » 13 Feb 2018, 17:13

aha, tak chyba bola ze som nemal pridane aj hd44780.c
pajky
Obr├ízok pou┼ż├şvate─ża
Pokro─Źil├Ż ─Źlen
Pokro─Źil├Ż ─Źlen
Pr├şspevky: 781
Zalo┼żen├Ż: 03.01.2009
Bydlisko: Cadca
Karma: 6

Re: Atmel studio kompilacia

Odosla┼ąod dan21 » 13 Feb 2018, 17:16

do projektu pridavas obidva subory *.h aj *.c. Includujes iba *.h - aj ked sa da aj ceckovy :-)
dan21
Obr├ízok pou┼ż├şvate─ża
Ultimate ─Źlen
Ultimate ─Źlen
Pr├şspevky: 2370
Zalo┼żen├Ż: 11.04.2007
Bydlisko: ZA
Karma: 17


Nasp├Ą┼ą na Mikropo─Ź├şta─Źe

Kto je pr├ştomn├Ż

U┼ż├şvatelia prezeraj├║ci si toto f├│rum: ┼Żiadny registrovan├Ż pou┼ż├şvate─ż a 2 host├ş.

Forums ©
Autor str├ínky je Ondrej Z├ívodsk├Ż(zawin), o graficky design sa star├í ─Żubo┼í Fabo(BUFU).

TOPlist

Powered by Copyright © UNITED-NUKE CMS. All Rights Reserved.
─îas potrebn├Ż k spracovaniu str├ínky 0.57 sek├║nd