FHEM Forum

CUL => Hard- und Firmware => Thema gestartet von: rubi007 am 13 Juni 2016, 22:50:27

Titel: Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: rubi007 am 13 Juni 2016, 22:50:27
Hallo,

egal was ich anstell, ich bekomme es einfach nicht hin ihn zu flashen..

ich bin bis jetzt so weit gekommen

root@raspberrypi3:/opt/culfw/Devices/nanoCUL# make

Size before:
   text    data     bss     dec     hex filename
  22498      74     831   23403    5b6b nanoCUL.elf

Compiling C: nanoCUL.c
Compiling C: ../../clib/cc1100.c
Compiling C: ../../clib/cc1101_pllcheck.c
Compiling C: ../../clib/clock.c
Compiling C: ../../clib/delay.c
Compiling C: ../../clib/display.c
Compiling C: ../../clib/stringfunc.c
Compiling C: ../../clib/fncollection.c
Compiling C: ../../clib/ringbuffer.c
Compiling C: ../../clib/fht.c
Compiling C: ../../clib/rf_send.c
Compiling C: ../../clib/rf_receive.c
Compiling C: ../../clib/rf_asksin.c
Compiling C: ../../clib/rf_moritz.c
Compiling C: ../../clib/rf_rwe.c
Compiling C: ../../clib/somfy_rts.c
Compiling C: ../../clib/fastrf.c
Compiling C: ../../clib/intertechno.c
Compiling C: ../../clib/kopp-fc.c
Compiling C: ../../clib/memory.c
Compiling C: ../../clib/serial.c
Compiling C: ../../clib/ttydata.c
Compiling C: ../../clib/spi.c
Compiling C: ../../clib/rf_mbus.c
Compiling C: ../../clib/mbus/manchester.c
Compiling C: ../../clib/mbus/3outof6.c
Compiling C: ../../clib/mbus/mbus_packet.c
Compiling C: ../../clib/mbus/crc.c
Linking: nanoCUL.elf
Creating load file for Flash: nanoCUL.hex
Creating load file for EEPROM: nanoCUL.eep
Creating Extended Listing: nanoCUL.lss
Creating Symbol Table: nanoCUL.sym

Size after:
   text    data     bss     dec     hex filename
  22498      74     831   23403    5b6b nanoCUL.elf

root@raspberrypi3:/opt/culfw/Devices/nanoCUL# make program
#@if test ! -d /sys/class/gpio/gpio17; then echo 17 > /sys/class/gpio/export; fi
#@if test ! -d /sys/class/gpio/gpio18; then echo 18 > /sys/class/gpio/export; fi
#echo out > /sys/class/gpio/gpio17/direction
#echo out > /sys/class/gpio/gpio18/direction
#echo 0 > /sys/class/gpio/gpio17/value
#echo 0 > /sys/class/gpio/gpio18/value
#sleep 1
#echo 1 > /sys/class/gpio/gpio17/value
#sleep 1
#echo 1 > /sys/class/gpio/gpio18/value
avrdude -D -p atmega328p -P /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 -c arduino    -U flash:w:nanoCUL.hex
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

makefile:218: recipe for target 'program' failed
make: *** [program] Error 1

ka was ich falsch mach

weis von euch jemand rat ?
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: MadMax-FHEM am 13 Juni 2016, 23:20:55
Hast du ihn bereits in fhem eingebunden?

Oder mit sonst etwas drauf zugegriffen?

So wie es aussieht könnte es sein (bzw. hatte ich das auch solange fhem lief, hatte ihn aber bereit s"defined"), dass avrdude (das flash-Programm) nicht zugreifen kann weil (evtl.) der Port bereits von einem anderen Programm (fhem) geöffnet ist...

Gruß, Joachim
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: rubi007 am 13 Juni 2016, 23:46:21
nein, bis jetzt noch nicht
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: Floca am 13 Juni 2016, 23:50:18
Wenn er sich nicht Synchronisieren lässt und du dir sicher bist, dass er sonst nicht verwendet wird, probier es nochmal mit der Arduino IDE am PC. Sollte die was ähnliches werfen ist der Arduino defekt.
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: rubi007 am 14 Juni 2016, 00:50:53
hab jetzt versucht die https://forum.fhem.de/index.php/topic,35064.0.html Alternative culfw drauf bekommen und er blinkt wie wild... nach einem reboot blinkr er garnicht meht ... komisch
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: rubi007 am 14 Juni 2016, 00:59:49
bin jetzt ein stück weiter... im windows steht usb-serial CH340 (COM7)

und bei Arduino steht


BN: Unknown board
VID: 1A86
PID: 7523
SN: Upload any sketch to obtain it
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: MadMax-FHEM am 14 Juni 2016, 01:12:28
Wild blinken nach dem Flashen oder beim Flashen?

Beim Flashen ist (könnte) normal sein, weil er ja per serieller Schnittstelle mit Daten (FW) versorgt wird...

Flashen ohne Fehler!?

Danach gar nicht blinken weiß ich jetzt nicht, was die FW so von sich gibt an Blinkmeldungen...
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: killah78 am 14 Juni 2016, 13:23:44
flasht du am raspberry?
Dieses wilde blinken NACH dem flashen hatte ich auch mal. Sieht so aus, als würde er immernoch weiterflashen. Habe dann nanoCUL vom USB getrennt und wieder angestöpselt, danach hat der Flashvorgang dann funktioniert.
Hast du den Arduino nachgelötet bezüglich des Reset-Bugs? War bei mir notwendig, weil er sonst nach neustart nicht richtig initialisiert wurde. Da half dann immer nur ab- und wieder anstöpseln.

Edit: Ahh, das mit dem Löten betrifft nur FTDI Clones. Trifft bei dir ja nicht zu. Aber probier mal mit vorher ab- und anstöpseln.
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: Beta-User am 14 Juni 2016, 13:51:49
Zitat von: rubi007 am 14 Juni 2016, 00:59:49
bin jetzt ein stück weiter... im windows steht usb-serial CH340 (COM7)

und bei Arduino steht


BN: Unknown board
VID: 1A86
PID: 7523
SN: Upload any sketch to obtain it

Für das Flashen war es bei mir (aber aus Linux heraus) hin und wieder erforderlich, den "Reset"-Button am Arduino zu drücken, kurz bevor die Arduino-IDE den flash-Vorgang gestartet hat (mehrere Nano- bzw. Micro-Boards, mit und ohne CH340). Dann natürlich warten, bis die IDE "upload completed" (oder so) meldet.

Damit habe ich auch Nanos wieder "eingefangen", bei denen der flash-Vorgang nur teilweise geklappt hatte (wackeliges Kabel :'().  8)
Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: riker1 am 30 September 2017, 14:47:53
Hallo
hatte das gleiche problem.

habe dann manuell mittels

sudo avrdude -p atmega328p -c arduino -P /dev/ttyUSB0 -b 57600 -D -Uflash:w:~/Downloads/cul/nano868CUL.hex:i

flashen können.

kein reset button erforderlich.

hoffe es hilft


Titel: Antw:Selbstbau CUL, bekomme ihn nicht geflasht
Beitrag von: micky0867 am 30 September 2017, 15:19:49
Zitat von: riker1 am 30 September 2017, 14:47:53
Hallo
hatte das gleiche problem.

habe dann manuell mittels

sudo avrdude -p atmega328p -c arduino -P /dev/ttyUSB0 -b 57600 -D -Uflash:w:~/Downloads/cul/nano868CUL.hex:i

flashen können.

kein reset button erforderlich.

hoffe es hilft
Einige meiner Nano-China--Klone haben das gleiche Problem, dass ein flashen per USB nicht geht.
Da half nur ein richtiger "Programmer" (z. B.  AVR-ISP)
Bei einigen funzte das flashen per USB dann auch, nachdem ich den Bootloader neu geflasht hatte.
Bei anderen bekomme ich den Sketch nur per richtigem Programmer drauf, egal, was ich anstelle.


Gesendet von meinem ONEPLUS A3003 mit Tapatalk