problem with latest (or GCC ?)

Stan zylog at club-internet.fr
Mon Dec 3 13:45:11 UTC 2001


Hello,

I use the latest (ss-20011025) : Linux 7.1, autoconf 2.52, automake 1.5 and m68k-rtems-gcc 2.95.3.
My custom BSP is based upon efi68k (it running properly with RTEMS 4.5.0).
However, I have found an strange error : 


********** console.c
[...]
 #define REG_DELAY for(cx=0; cx < 10; cx++);


long cx;
[...]

0155         /* UART D */
0156         /* ------ */
0157         *(VOIE4 + CDE_REG)      = 0x20; /* reset le recepteur */
0158         REG_DELAY;
0159         *(VOIE4 + CDE_REG)      = 0x30; /* reset l'emetteur */
0160         REG_DELAY;
0161         *(VOIE4 + CDE_REG)      = 0x40; /* reset les erreurs */
0162         REG_DELAY;
0163         *(VOIE4 + CDE_REG)      = 0x50; /* reset break detect */
0164         REG_DELAY;
0165         *(VOIE4 + CDE_REG)      = 0xb0; /* reset reg mode pour acceder a MR0 */
0166         REG_DELAY;
0167         *(VOIE4 + MODE_REG)     = 0x80; /* Watchdog pour caracteres dans RxFIFO */
0168         REG_DELAY;
0169         *(VOIE4 + MODE_REG)     = 0x13; /* MR1= no RTS Control, no parity, 8 bits */
0170         REG_DELAY;
0171         *(VOIE4 + MODE_REG)     = 0x7;  /* MR2= 1 Stop bit, Cts enable, normal  */
0172         REG_DELAY;
0173         *(VOIE4 + CK_SEL_REG) = 0xbb;   /* CSR= 9600 bps vitesses Tx/Rx */
0174         REG_DELAY;
0175         *(VOIE4 + CDE_REG)      = 0x05;         /* rts=0, enable Tx et Rx */
0176         REG_DELAY;

[...]
**********
0165         *(VOIE4 + CDE_REG)      = 0xb0; /* reset reg mode pou
000010F0 13FC00B00010.. move.b    #$B0,$00100035
0166         REG_DELAY;
000010F8 7000           moveq     #0,D0
000010FA 7409           moveq     #9,D2
000010FC B480           cmp.l     D0,D2
000010FE 6C02           bge.s     $00001102
00001100 6004           bra.s     $00001106
00001102 5280           addq.l    #1,D0
00001104 60F4           bra.s     $000010FA
0167         *(VOIE4 + MODE_REG)     = 0x80; /* Watchdog pour cara
00001106 13FC00800010.. move.b    #$80,$00100031
0168         REG_DELAY;
0000110E 7000           moveq     #0,D0
00001110 7409           moveq     #9,D2
00001112 B480           cmp.l     D0,D2
00001114 6C006004       bge.w     $0000711A
                                     ^^^^^^^^^^^^^^ ^^^^^^^^^
                                very, very strange :(                                     
       
00001118 5280           addq.l    #1,D0
0000111A 60F4           bra.s     $00001110
0169         *(VOIE4 + MODE_REG)     = 0x13; /* MR1= no RTS Contro
0000111C 13FC00130010.. move.b    #$13,$00100031
0170         REG_DELAY;
00001124 7000           moveq     #0,D0
00001126 7409           moveq     #9,D2
00001128 B480           cmp.l     D0,D2
0000112A 6C02           bge.s     $0000112E
0000112C 6004           bra.s     $00001132
0000112E 5280           addq.l    #1,D0
00001130 60F4           bra.s     $00001126
0171         *(VOIE4 + MODE_REG)     = 0x7;  /* MR2= 1 Stop bit, C
00001132 13FC00070010.. move.b    #$07,$00100031
***********

I will use rtems_bsp_delay ;)
but, I will know what going on.
This code is correct with RTEMS 4.5.0 (GCC 2.95.2).

What can I do? 

Thanks.


Stan.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20011203/efd8edcb/attachment.html>


More information about the users mailing list