Mega128 Bootloader konfigurieren

Gast #617600
Lesenswert?

Hi

ich hab mir den BLIPS bootloader runtergeladen

http://www.esnips.com/web/blips

der kommt mit einigen Vorlagen auch für den Mega128. Da wird allerdings 
gesagt das die momentane konfiguration für UART0 ist und für UART1 was 
geändert werden muss.
Ich brauche - wie sollte es auch anders sein UART1 und weiss nicht was 
ich umschreiben muss.

code ist hier unten, weitere infos unter dem Link oben.

Irgendwer irgendwelche Ideen?

Grüße
 Tobi




#ifdef M128DEF_INC  ; is within the chosen include file
;==========================================================
;==================== mega128 =============================
;==========================================================
; UART baud rate setup constant- formula varies by chip type
; where this bootloader code begins, Change if this code outgrows 512 
bytes
.equ  MYORG =  FIRSTBOOTSTART ; NOTE! This chip doesn't support a boot 
memory area as small as 512Bytes; see fuses for it
.equ  UBRRLval = (clock - 8 * bootldr_baud) / (16 * bootldr_baud) ;the 
8* part helps rounding
;--- device code and signature bytes for a atmega8 with bootloader
.equ   DT    = 0x44  ; atmega bootloader
; Chip-dependent names for UART0 registers (See Table, below)
.set  BAUDL   =UBRR0L    ; baud rate low order bits
.set  UARTC  =UCSR0B    ; control
.set  USTAT  =UCSR0A    ; status
.set  UDATA  =UDR0    ; data I/O register
.set  URXC  =RXC0    ; rx char complete status bit number (data has 
arrived)
.set  UTXE  =UDRE0    ; tx data register is empty
.set  UTXC  =TXC0    ; tx complete status bit number


; values to use in configuring UART0
.set  UARTENA  =((1<<RXEN0) | (1<<TXEN0))  ; enable tx,rx for uart 0 or 
1 (see table)
.MACRO BOOTIDSTRING
   .DB "Mega128", 0  ; change this 7 char string.  bootloader ID string, 
information-only to PC

.ENDMACRO
;=========================================================
#endif
Gast #617636
Lesenswert?

ok nächstes Problem - es geht nicht

ich brenn den bootloader von 0x1FC00 an und starte BLIPS. dann versuche 
ich kontakt zum device aufzunehmen.. er tut so als würde das gehen, 
dummerweise funktioniert das programm reinbrennen dann nicht richtig. Er 
tut so als würde er was bekommen tut es aber im Endeffekt nicht.

Mein Programm benutzt den gleichen UART aber eigentlich sollte ja erst 
der Bootloader greifen.

Irgendjemand ideen?

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren