Forum: Mikrocontroller und Digitale Elektronik Radino CC1101 über Powershell mit Avrdude flashen. Wie?


von Hans M. (deschurli)


Lesenswert?

Hi allesamt,

ich hätte da mal ein Problem :)

Ich habe mir vor einigen Tagen einen Radino CC1101 gekauft.
Dabei handelt es sich mehr oder weniger um einen Arduino Micro mit 
aufgelötetetn TI CC1101 Transceiver.

Zum Hintergrund dazu: Ich beschäftige mich im Bereich Hausautomation mit 
Fhem, CUL und Homematic und hätte gerne eine günstigere Alternative zum 
CUL-Stick von Busware.

Passende Treiber, Bibliotheken und Beispiel-sketches für die Arduino IDE 
gibt es auch gleich mit dazu. Diese funktionieren auch wunderbar und es 
lässt sich auch ein Beispielprogram flashen.

Mein Problem ist jetzt, dass ich ein Program, für welches ich das .hex 
file sowie den C-Code vorliegen habe, auf das Board flashen möchte.

Dafür habe ich mir zuerst angeschaut was die Arduino-IDE denn beim 
flashen anstellt. Sie verwendet ja auch Avrdude.
1
Der Sketch verwendet 12.296 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 28.672 Bytes.
2
Globale Variablen verwenden 1.195 Bytes des dynamischen Speichers.
3
Erzwinge Reset durch öffnen/schließen mit 1200bps auf dem Port COM3
4
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
5
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
6
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
7
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
8
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
9
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
10
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
11
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
12
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
13
PORTS {COM1, COM3, } / {COM1, COM5, } => {COM5, }
14
Found upload port: COM5
15
C:\Arduino\hardware\tools\avr/bin/avrdude -CC:\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM5 -b57600 -D -Uflash:w:C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex:i 
16
17
avrdude: Version 6.0.1, compiled on Mar 30 2015 at 14:56:06
18
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
19
         Copyright (c) 2007-2009 Joerg Wunsch
20
21
         System wide configuration file is "C:\Arduino\hardware\tools\avr/etc/avrdude.conf"
22
23
         Using Port                    : COM5
24
         Using Programmer              : avr109
25
         Overriding Baud Rate          : 57600
26
         AVR Part                      : ATmega32U4
27
         Chip Erase delay              : 9000 us
28
         PAGEL                         : PD7
29
         BS2                           : PA0
30
         RESET disposition             : dedicated
31
         RETRY pulse                   : SCK
32
         serial program mode           : yes
33
         parallel program mode         : yes
34
         Timeout                       : 200
35
         StabDelay                     : 100
36
         CmdexeDelay                   : 25
37
         SyncLoops                     : 32
38
         ByteDelay                     : 0
39
         PollIndex                     : 3
40
         PollValue                     : 0x53
41
         Memory Detail                 :
42
43
                                  Block Poll               Page                       Polled
44
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
45
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
46
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
47
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
48
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
49
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
50
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
51
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
52
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
53
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
54
55
         Programmer Type : butterfly
56
         Description     : Atmel AppNote AVR109 Boot Loader
57
58
Connecting to programmer: .
59
Found programmer: Id = "CATERIN"; type = S
60
    Software Version = 1.0; No Hardware Version given.
61
Programmer supports auto addr increment.
62
Programmer supports buffered memory access with buffersize=128 bytes.
63
64
Programmer supports the following devices:
65
    Device code: 0x44
66
67
avrdude: devcode selected: 0x44
68
avrdude: AVR device initialized and ready to accept instructions
69
70
Reading | ################################################## | 100% 0.00s
71
72
avrdude: Device signature = 0x1e9587
73
avrdude: reading input file "C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex"
74
avrdude: writing flash (12296 bytes):
75
76
Writing | ################################################## | 100% 1.09s
77
78
avrdude: 12296 bytes of flash written
79
avrdude: verifying flash memory against C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex:
80
avrdude: load data flash data from input file C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex:
81
avrdude: input file C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex contains 12296 bytes
82
avrdude: reading on-chip flash data:
83
84
Reading | ################################################## | 100% 0.30s
85
86
avrdude: verifying ...
87
avrdude: 12296 bytes of flash verified
88
89
avrdude done.  Thank you.

Dies will ich erst einmal einfach nachahmen. Nur um sehen ob es 
funktioniert. Falls das der Fall ist kann ich später immer noch mein 
eigenes Program flashen.
Da ich auf einem Windows-System arbeite habe ich die PowerShell gewählt.

1.Ich öffne einen Micro's virtual (CDC) serial / COM port mit 1200 baud 
auf dem COM Port an dem der Stick hängt und schließe ihn wieder.
1
$port=new-Object System.IO.Ports.SerialPort COMx,1200,None,8,one
2
$port.open()
3
$port.close()

2.Ich nehme die Befehlszeile aus der Arduino-IDE und jage den Befehl 
innerhalb von 8 Sekunden hinterher.
1
C:\Arduino\hardware\tools\avr/bin/avrdude -CC:\Arduino\hardware\tools\avr\etc\avrdude.conf -v -patmega32u4 -cavr109 -PCOMx -vvvv -b57600 -D -Uflash:w:C:\loader\avr\hex\CUL_V3.hex:i

Ich bekomme aber immer folgende Meldung.
1
PS C:\Users\meinUser> C:\Arduino\hardware\tools\avr/bin/avrdude -CC:\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmeg
2
a32u4 -cavr109 -PCOM3 -b57600 -D -Uflash:w:C:\Arduino\build_loader/radino_CC1101_UART_Bridge.cpp.hex:i
3
4
avrdude.exe: Version 6.0.1, compiled on Mar 30 2015 at 14:56:06
5
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
6
             Copyright (c) 2007-2009 Joerg Wunsch
7
8
             System wide configuration file is "C:\Arduino\hardware\tools\avr/etc/avrdude.conf"
9
10
             Using Port                    : COM3
11
             Using Programmer              : avr109
12
             Overriding Baud Rate          : 57600
13
             AVR Part                      : ATmega32U4
14
             Chip Erase delay              : 9000 us
15
             PAGEL                         : PD7
16
             BS2                           : PA0
17
             RESET disposition             : dedicated
18
             RETRY pulse                   : SCK
19
             serial program mode           : yes
20
             parallel program mode         : yes
21
             Timeout                       : 200
22
             StabDelay                     : 100
23
             CmdexeDelay                   : 25
24
             SyncLoops                     : 32
25
             ByteDelay                     : 0
26
             PollIndex                     : 3
27
             PollValue                     : 0x53
28
             Memory Detail                 :
29
30
                                      Block Poll               Page                       Polled
31
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
32
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
33
               eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
34
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
35
               lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
36
               hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
37
               efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
38
               lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
39
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
40
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
41
42
             Programmer Type : butterfly
43
             Description     : Atmel AppNote AVR109 Boot Loader
44
45
*Connecting to programmer: .avrdude.exe: butterfly_recv(): programmer is not responding*

Hat jemand eine Idee was ich noch falsch mache?
Ich verstehe auch nicht ganz wie die IDE aus COM Port 3 einfach COM Port 
5 machen kann? Obwohl das Gerät an Port 3 hängt.

PORTS {COM1, COM3, } / {COM1, COM5, } => {COM5, }
Found upload port: COM5

Bin über jede Hilfe froh.
Gruß Schorsch

: Bearbeitet durch User
von Hans M. (deschurli)


Lesenswert?

Problem gelöst, CULfw auf Radino geflasht, funktioniert.
Bei Interesse mir bitte eine PN senden.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.