[En-Nut-Discussion] Questions re devUart1

Harald Kipp harald.kipp at egnite.de
Wed Feb 18 13:35:55 CET 2004


At 13:51 18.02.2004 +0200, you wrote:
>Thanks.
>
>Not soon after I sent the mail I discovered the problem:  devDebug defaults
>to a baudrate of 115200 and devUart not.

Oops! Exactly the same happened to me two days ago.
I tried to test an overclocked Ethernut, running at
18.432 MHz. All baudrate settings failed until I
discovered the hardcoded baudrate. For devDebug0
it should be

static int DebugIOCtl(NUTDEVICE * dev, int req, void *conf)
{
     if(req == UART_SETSPEED) {
         outb(UBRR, (u_char) ((((2UL * NutGetCpuClock()) / (*((u_long 
*)conf) * 16UL)) + 1UL) / 2UL) - 1);
         return 0;
     }
     return -1;
}




> > For RAM usage: Using more than 4k for bss should be
> > no problem (for ICC, enable the external RAM option).
> > But I think there is a problem when using nearly 4k.
>How do GCC users achieve this?

It is fixed in the linker script. If I remember correctly,
GCC assumes 64k RAM, so no change should be required.

Last time I tried to verify what's going on in case
bss ends near below 4k, I ran into the problem of
avr-objcopy crashes. Unable to find out, why this
happened, I tried to get the source...later find out
I need to do the whole toolchain...updated Cygwin...
etc...etc...and my day was gone.



> > This is no mailing list for C newbies - go playing
> > with BASIC. :-)
>I'm just a lazy C++ programmer.  When you have driven a Porsche for so long
>it's quite tiresome to find your way around a Trabant. (-: A common nemesis
>of many folks have once made a very true statement: "Most engineers use a
>subset of C plus plus called C plus plus minus minus".

Too true...or...MSC++, if you look to all the "so
called C++" code in the net. uisp is one of the
really bad examples (Sorry Ted, I know it's not
your code).

Harald




More information about the En-Nut-Discussion mailing list