Atmel studio kompilacia
Moderátori: psichac, Moderátori
Atmel studio kompilacia
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?
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?
0
-
- Ultimate člen
- Príspevky: 2328
- Dátum registrácie: 25 Jún 2013, 21:06
- Bydlisko: Krajné
- Vek: 57
- Kontaktovať používateľa:
Re: Atmel studio kompilacia
pozri Project Properties Toolchain AVR/GNU C Compiler - All Options
Ja tam mám niečo takéto.
Typujem to na chybu v Directories Include Paths
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)"
Typujem to na chybu v Directories Include Paths
0
Ukáž múdremu chybu a on sa ti poďakuje. Ukáž chybu hlupákovi a on sa urazí.
Re: Atmel studio kompilacia
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?
-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?
0
-
- Ultimate člen
- Príspevky: 2328
- Dátum registrácie: 25 Jún 2013, 21:06
- Bydlisko: Krajné
- Vek: 57
- Kontaktovať používateľa:
Re: Atmel studio kompilacia
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.
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.
0
Ukáž múdremu chybu a on sa ti poďakuje. Ukáž chybu hlupákovi a on sa urazí.
Re: Atmel studio kompilacia
nepridava ti tam ziadne "l" ani "L", je to prepinac preprocesora a za nim je nazov suboru, ktory sa ma pridat do spracovania.
0
Re: Atmel studio kompilacia
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
tu je build
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 ==========
0
Re: Atmel studio kompilacia
do projektu pridavas obidva subory *.h aj *.c. Includujes iba *.h - aj ked sa da aj ceckovy
0
-
- Podobné témy
- Odpovedí
- Zobrazení
- Posledný príspevok