rtems on m5282lite
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Fri Apr 15 16:33:08 UTC 2005
g_YaneV wrote:
> Hello,
>
> I find some new info about the issue with the hanging of my m5282lite board.
>
> I set a breakpoint in _uhoh, and YES .... this is why my board hang. STOP
> #0x2700(which is the next instruction) will stop the CPU core with all
> interrupts disabled. Just from curiosity I remove the assembler code that
> copy the vector table(so I run the program with vector table defined by dBUG)
> and all test programs now run correctly. What the problem can be?
>
> My dBUG session follows
My guess is that the BSP is allowing the CPU to be shutdown before all
serial output has gone out.
I wonder if putting a tcdrain(1); tcdrain(2); in hello world just before
calling shutdown/exit will fix it.
If so, then we have to discuss if close() on a tty device should make
sure it is drained.
--joel
> regards
> Georgi
>
> ---------------------------------start-----------------------------------------
> dBUG> dn -e p-0.3.nxe
> Ethernet Address is 00:CF:52:82:CF:01
> Downloading ELF 'p-0.3.nxe' from 10.10.10.4
> Program Headers:
> Segment #0 (Vaddr: 00010000, Paddr: 00010000, Size: 0001D520)
> Section Headers:
> Section 0 (Type: 00000000, Addr: 00000000, Size: 00000000)
> Section 1 (Type: 00000001, Addr: 00010000, Size: 0001A980)
> Section 2 (Type: 00000001, Addr: 0002A980, Size: 00000910)
> Section 3 (Type: 00000008, Addr: 0002B290, Size: 00002290)
> Section 4 (Type: 00000001, Addr: 00000000, Size: 0000121C)
> Section 5 (Type: 00000001, Addr: 00000000, Size: 00000700)
> Section 6 (Type: 00000001, Addr: 00000000, Size: 00000AA8)
> Section 7 (Type: 00000001, Addr: 00000000, Size: 0001876F)
> Section 8 (Type: 00000001, Addr: 00000000, Size: 000040A7)
> Section 9 (Type: 00000001, Addr: 00000000, Size: 00005920)
> Section 10 (Type: 00000001, Addr: 00000000, Size: 000015D8)
> Section 11 (Type: 00000001, Addr: 00000000, Size: 00003A91)
> Section 12 (Type: 00000001, Addr: 00000000, Size: 00000210)
> Section 13 (Type: 00000003, Addr: 00000000, Size: 000000A0)
> Section 14 (Type: 00000002, Addr: 00000000, Size: 00005110)
> Section 15 (Type: 00000003, Addr: 00000000, Size: 00005157)
> TFTP download successful
> Read 323555 bytes (632 blocks)
> dBUG> br _uhoh
> dBUG> go 0x10000
>
>
> *** HELLO WORLD TEST ***
> Hello World
> *** END OF HELLO WORLD TEST ***
> number:0
>
> register 0x40000c00 = 0x0
> register 0x40000c04 = 0x0
> register 0x40000c08 = 0xFFFFFFFF
> register 0x40000c0c = 0xF7EF1F7E
> register 0x40000d00 = 0x0
> register 0x40000d04 = 0x0
> register 0x40000d08 = 0xFFFFFFFF
> registBreakpoint encountered at 0x00010400
> PC: 00010400 SR: 2300 [t.Sm.011...xnzvc]
> An: 0001215C 00000000 000353C4 00000000 00000000 00000000 00000000 00034A64
> Dn: 00000000 00000001 00003001 00000000 00000000 00000000 00000000 00000000
> 00010400:
> 00010400: _uhoh:
> 00010400: 4E71 NOP
> dBUG>
> dBUG> dis _uhoh
> 00010400:
> 00010400: _uhoh:
> 00010400: 4E71 NOP
> 00010402: 4E72 2700 STOP #0x2700
> 00010406: 6000 FFF8 BRA _uhoh
> 0001040A: 0000 DC.W 0x0000
> 0001040C: 52B9 0002 A980 ADDQ.L #0x01,_data_dest_start
> 00010412: 4E73 RTE
> 00010414: 46FC 2700 MOVE #0x2700,SR
> 00010418: 203C 4000 0001 MOVE.L #0x40000001,D0
> 0001041E: 23C0 4000 0000 MOVE.L D0,(0x40000000.L)
> 00010424: 203C 2000 0201 MOVE.L #0x20000201,D0
> 0001042A: 4E7B 0C05 MOVEC D0,RcC05
> 0001042E: 23C0 4000 0008 MOVE.L D0,(0x40000008.L)
> 00010434: 2E7C 2000 FFFC MOVEA.L #0x2000FFFC,A7
> 0001043A: 41FA FCC4 LEA -828(PC),A0
> 0001043E: 43F8 0100 LEA (0x0100.W),A1
> 00010442: 203C 0000 00BF MOVE.L #0x000000BF,D0
>
> ---------------------------------end-------------------------------------------
>
> On Wednesday 13 April 2005 20:42, Etienne Fortin wrote:
>
>> Hi Georgi,
>>When I started working with RTEMS, a similar problem gave me headaches at
>>the beginning. It was the watchdog timer which wasn't set-up correctly. I
>>think Eric Norum already proposed that. Was it the source of your problems?
>>
>>Etienne Fortin
>>
>>
>>-----Message d'origine-----
>>De : g_YaneV [mailto:g_yanev at bulpost.com]
>>Envoyé : 9 avril, 2005 11:16
>>À : rtems-users at rtems.com
>>Objet : rtems on m5282lite
>>
>> Hello,
>>
>>
>> I have m5282LITE bord and I run successfully uclinux on it. But I need a
>>real time OS so I look in to rtems. In the CVS there is port to uCdimm
>>board whit
>>the same processor(uC5282). I modify
>>c/src/lib/libbsp/m68k/uC5282/startup/linkcmds to correct the difference in
>>RAM/FLASH base and size, and the value of _DownloadLocation to match my
>>board. I set the UART speed to be 19200, and compile. I don't find any
>>ather difference between uC5282 and m5282LITE.
>> But when I transfer any of the samples in my board RAM and execute them
>>they all start but after a short time the board hang. I modify hello_world
>>to be a simple loop from 1 to 1000 and each time to print the counter of
>>the loop.
>>Each time i run this program it hang on different place(from 5-th to 50-th
>>printed messages).
>> Where the problem can be? Can someone gave me any advice.
>>
>>Regards,
>>Georg
>
> i
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list