User Tools

Site Tools


opendcc-flash-nl

OpenDCC

InhoudCentral stationsOpenDCC



Link: opendcc.jpg Flash firmware running Ubuntu.


Wat is nodig

  • avr-gcc
  • avr-libc
  • avrdude


Voorbereiding broncode 0.16

  • Pak uit OpenDCC sources met unzip¹
  • Verander in Makefile avr-gcc.exe in avr-gcc
  • Verander regel 100 in @avr-size ${TARGET}

¹) Het zip password moet via mail opgevraagd worden, zie voetnootsonder aan de pagina of http://opendcc.de/elektronik/opendcc/download.html


Parser kiezen

  • Plaats de parser in de config.h
#define PARSER  INTELLIBOX  // LENZ: behave like a LI101
                            // INTELLIBOX: behave like a IBOX
\\

Build

cd default
make

Flash

Alvorens OpenDCC in te schakelenmoet Stop ingedrukt en vastgehouden worden. Nu wordt een zgn. bootloader opgestart (CTRL LED brand permanent), er wordt nu op een nieuwe software versie gewacht. Deze software wordt in het niet vluchtig geheugen van de OpenDCC geladen.

avrdude -pm32 -cavr109 -P/dev/ttyUSB0 -b19200 -Uflash:w:OpenDCC.hex:a -Ueeprom:w:OpenDCC.eep:a

ATMEGA644P (linux)

avrdude -F -pm644 -cavr109 -P/dev/ttyUSB0 -b19200 -Uflash:w:OpenDCC_XP.hex:a -Ueeprom:w:OpenDCC_XP.eep:a 

Voorbeeld van het verloop van het proces

Connecting to programmer: .
Found programmer: Id = "AVRBOOT"; type = S
    Software Version = 1.5; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x7f

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9502
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -11272448 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "OpenDCC.hex"
avrdude: input file OpenDCC.hex auto detected as Intel Hex
avrdude: writing flash (19974 bytes):

Writing | ################################################## | 100% 11.88s



avrdude: 19974 bytes of flash written
avrdude: verifying flash memory against OpenDCC.hex:
avrdude: load data flash data from input file OpenDCC.hex:
avrdude: input file OpenDCC.hex auto detected as Intel Hex
avrdude: input file OpenDCC.hex contains 19974 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 11.26s



avrdude: verifying ...
avrdude: 19974 bytes of flash verified
avrdude: reading input file "OpenDCC.eep"
avrdude: input file OpenDCC.eep auto detected as Intel Hex
avrdude: writing eeprom (168 bytes):

Writing | ################################################## | 100% 2.71s



avrdude: 168 bytes of eeprom written
avrdude: verifying eeprom memory against OpenDCC.eep:
avrdude: load data eeprom data from input file OpenDCC.eep:
avrdude: input file OpenDCC.eep auto detected as Intel Hex
avrdude: input file OpenDCC.eep contains 168 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 0.11s



avrdude: verifying ...
avrdude: 168 bytes of eeprom verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

opendcc-flash-nl.txt · Last modified: 2018/11/12 08:56 by 127.0.0.1