[En-Nut-Discussion] Port to a non ethernut board
Thiago A. Corrêa
thiago.correa at gmail.com
Thu Aug 24 20:05:59 CEST 2006
Hi,
atmega128? I was in a similar situation when I first started out
messing with ethernut, actually I had a lockup exactly where you
describe. The problem were fuse bits if I recall it correctly, or one
of the chip pins were not soldered correctly, not sure. Might be worth
to check those out.
Cheers,
Thiago A. Corrêa
On 8/24/06, Marc Giger <gigerstyle at gmx.ch> wrote:
> Hello all,
>
> I'm trying to "port" Nut/Os to a non ethernet board, but don't get
> it running.
>
> I spend some time reading the source code and the resulting assembler
> code and still don't see why it doesnt work.
>
> The board in question has the following configuration:
> - atmega128 running with an external 16Mhz crystal
> - 32k extended RAM
> - and and and....
>
> I have built NutOs with the following config:
> PLATFORM = "ETHERNUT1"
> AVR_GCC = ""
> MCU_ATMEGA128 = ""
> NUTMEM_START = "0x100"
> NUTMEM_RESERVED = "64"
> NUTXMEM_SIZE = "28416"
> NUTXMEM_START = "0x1100"
> NUT_CPU_FREQ = "16000000"
> STDIO_FLOATING_POINT = ""
>
> The debugging possibilities are limited because of my
> proprietary programmer, precisely it is limited to switch an onboard
> LED on/off :-/
>
> The LED is attached to PORTE6 which i try to activate directly after
> the extended RAM activation in NutInitXRAM(). So it seems the mcu never
> reaches that (early) point.
>
> The disassembled elf file part:
>
> Disassembly of section .text:
>
> 00000000 <__vectors>:
> 0: 0c 94 46 00 jmp 0x8c <NutInitXRAM>
> 4: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 8: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 10: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 14: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 18: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 1c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 20: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 24: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 28: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 2c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 30: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 34: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 38: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 3c: 0c 94 49 07 jmp 0xe92 <__vector_15>
> 40: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 44: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 48: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 4c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 50: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 54: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 58: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 5c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 60: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 64: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 68: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 6c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 70: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 74: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 78: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 7c: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 80: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 84: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
> 88: 0c 94 9a 00 jmp 0x134 <__bad_interrupt>
>
> 0000008c <NutInitXRAM>:
> 8c: 80 ec ldi r24, 0xC0 ; 192
> 8e: 85 bf out 0x35, r24 ; 53 <--MCUCR
> 90: 16 9a sbi 0x02, 6 ; 2 <--DDRE OUT
> 92: 1e 9a sbi 0x03, 6 ; 3 <--LED ON
>
> 00000094 <NutCustomInit>:
> 94: 87 e0 ldi r24, 0x07 ; 7
> 96: 89 b9 out 0x09, r24 ; 9
> 98: 80 93 99 00 sts 0x0099, r24
> 9c: 11 24 eor r1, r1
> 9e: 1f be out 0x3f, r1 ; 63
> a0: cf ef ldi r28, 0xFF ; 255
> a2: d0 e1 ldi r29, 0x10 ; 16
> a4: de bf out 0x3e, r29 ; 62
> a6: cd bf out 0x3d, r28 ; 61
>
> Perhaps somebody knows whats going on and is willing to share
> his/her knowledge with me?
>
> The only difference to my program is that i don't set the SRW10 bit in
> MCUCR, but that shouldn't matter because no SRL bits are set...
>
> Any help is very much appreciated!
>
> Thank you
>
> Marc
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list