Skocz do zawartości

[C] Problem z wgraniem programu do ATmega8. Atmel Studio 7.0


KorboL

Pomocna odpowiedź

Witam. Jakiś czas temu napisałem program w Atmel Studio 7.0 na ATmege 8, z użyciem biblioteki arduino.h. Program ten udało mi się wgrać bez problemu. Od wczoraj program ten próbuję zmodernizować (także z użyciem biblioteki arduino.h), jednak wgrywanie programu nie przynosi żadnego efektu - mikrokontroler zachowuje się jakby w ogóle nie miał wgranego programu. Próby podejmowałem na kilku mikrokontrolerach i dwóch komputerach, efekt był identyczny - żaden program używający arduino.h nie działa. Aby sprawdzić, czy programator w ogóle jest sprawny, napisałem również prosty program bez użycia biblioteki arduino (wykorzystałem standardową avr/io.h). W tym przypadku program działał zgodnie z oczekiwaniami.

Ma ktoś wiedzę co należy w takim przypadku zrobić?

Z góry dziękuję za pomoc.

Programator: https://kamami.pl/wycofane-z-oferty/563719-mkii-avr-mini-plug-usb-programator-avr-zgodny-z-mkii-isp.html

Opis, który kompilator wypluwa po "wgraniu" :

------ Build started: Project: ArduinoCore, Configuration: Debug AVR ------
Build started.
Project "ArduinoCore.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "D:\Atmel Studio\7.0\Vs\Compiler.targets" from project "c:\users\korbol\Documents\Atmel Studio\7.0\ArduinoSketch26\ArduinoSketch26\ArduinoCore\ArduinoCore.cppproj" (target "Build" depends on it):
Task "RunCompilerTask"
	Shell Utils Path D:\Atmel Studio\7.0\shellUtils
	D:\Atmel Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync 
	make: Nothing to be done for 'all'.
Done executing task "RunCompilerTask".
Task "RunOutputFileVerifyTask"
Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "ArduinoCore.cppproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "D:\Atmel Studio\7.0\Vs\Avr.common.targets" from project "c:\users\korbol\Documents\Atmel Studio\7.0\ArduinoSketch26\ArduinoSketch26\ArduinoCore\ArduinoCore.cppproj" (entry point):
Done building target "Build" in project "ArduinoCore.cppproj".
Done building project "ArduinoCore.cppproj".

Build succeeded.
------ Build started: Project: BlinkWithoutDelay, Configuration: Debug AVR ------
Build started.
Project "BlinkWithoutDelay.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "D:\Atmel Studio\7.0\Vs\Compiler.targets" from project "c:\users\korbol\Documents\Atmel Studio\7.0\ArduinoSketch26\ArduinoSketch26\BlinkWithoutDelay\BlinkWithoutDelay.cppproj" (target "Build" depends on it):
Using "RunCompilerTask" task from assembly "D:\Atmel Studio\7.0\Extensions\Application\AvrGCC.dll".
Task "RunCompilerTask"
	Shell Utils Path D:\Atmel Studio\7.0\shellUtils
	D:\Atmel Studio\7.0\shellUtils\make.exe all --jobs 4 --output-sync 
	Building file: .././Sketch.cpp
	Invoking: AVR8/GNU C Compiler : 5.4.0
	"D:\Atmel Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe" -funsigned-char -funsigned-bitfields -DDEBUG -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_PRODUCT="\"Arduino Leonardo\"" -DUSB_MANUFACTURER="\"Arduino LLC\""  -I"..\\..\ArduinoCore\include\core" -I"..\\..\ArduinoCore\include\variants\leonardo" -I"D:\Atmel Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\include"  -Os -fno-threadsafe-statics -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -w -mmcu=atmega8 -B "D:\Atmel Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega8" -c -std=gnu++11 -MD -MP -MF "Sketch.d" -MT"Sketch.d" -MT"Sketch.o"   -o "Sketch.o" ".././Sketch.cpp" 
	Finished building: .././Sketch.cpp
	Building target: BlinkWithoutDelay.elf
	Invoking: AVR8/GNU Linker : 5.4.0
	"D:\Atmel Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-g++.exe" -o BlinkWithoutDelay.elf  Sketch.o   -Wl,-Map="BlinkWithoutDelay.map" -Wl,--start-group -Wl,-lm -Wl,-lArduinoCore  -Wl,--end-group -Wl,-L"c:\users\korbol\Documents\Atmel Studio\7.0\ArduinoSketch26\ArduinoSketch26\ArduinoCore\Debug"  -Wl,--gc-sections -mmcu=atmega8 -B "D:\Atmel Studio\7.0\Packs\atmel\ATmega_DFP\1.2.150\gcc\dev\atmega8" -Os  
	Finished building target: BlinkWithoutDelay.elf
	"D:\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  "BlinkWithoutDelay.elf" "BlinkWithoutDelay.hex"
	"D:\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 "BlinkWithoutDelay.elf" "BlinkWithoutDelay.eep" || exit 0
	"D:\Atmel Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "BlinkWithoutDelay.elf" > "BlinkWithoutDelay.lss"
	"D:\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 "BlinkWithoutDelay.elf" "BlinkWithoutDelay.srec"
	"D:\Atmel Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "BlinkWithoutDelay.elf"
	   text	   data	    bss	    dec	    hex	filename
	   6964	     38	    135	   7137	   1be1	BlinkWithoutDelay.elf
Done executing task "RunCompilerTask".
Using "RunOutputFileVerifyTask" task from assembly "D:\Atmel Studio\7.0\Extensions\Application\AvrGCC.dll".
Task "RunOutputFileVerifyTask"
			Program Memory Usage 	:	7002 bytes   85,5 % Full
			Data Memory Usage 		:	173 bytes   16,9 % Full
Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "BlinkWithoutDelay.cppproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "D:\Atmel Studio\7.0\Vs\Avr.common.targets" from project "c:\users\korbol\Documents\Atmel Studio\7.0\ArduinoSketch26\ArduinoSketch26\BlinkWithoutDelay\BlinkWithoutDelay.cppproj" (entry point):
Done building target "Build" in project "BlinkWithoutDelay.cppproj".
Done building project "BlinkWithoutDelay.cppproj".

Build succeeded.
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
Link do komentarza
Share on other sites

Dołącz do dyskusji, napisz odpowiedź!

Jeśli masz już konto to zaloguj się teraz, aby opublikować wiadomość jako Ty. Możesz też napisać teraz i zarejestrować się później.
Uwaga: wgrywanie zdjęć i załączników dostępne jest po zalogowaniu!

Anonim
Dołącz do dyskusji! Kliknij i zacznij pisać...

×   Wklejony jako tekst z formatowaniem.   Przywróć formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Twój link będzie automatycznie osadzony.   Wyświetlać jako link

×   Twoja poprzednia zawartość została przywrócona.   Wyczyść edytor

×   Nie możesz wkleić zdjęć bezpośrednio. Prześlij lub wstaw obrazy z adresu URL.

×
×
  • Utwórz nowe...

Ważne informacje

Ta strona używa ciasteczek (cookies), dzięki którym może działać lepiej. Więcej na ten temat znajdziesz w Polityce Prywatności.