[En-Nut-Discussion] WinAVR 20050214, Ethernut 3.9.5 on STK501

Mark E. Scott Jr. mscott at awfs.net
Thu Apr 21 23:16:38 CEST 2005


I checked, and it didn't appear to have dropped any options out, it looks like this:

AVR_GCC = ""
MCU_ATMEGA128 = ""
NUTMEM_SIZE = "4096"
NUTMEM_START = "0x100"
NUTMEM_RESERVED = "64"

I don't know if I made the proper fix for the error:

C:/Programming/ethernut/nut/dev/spidigio.c: In function `SpiDigitalInit':

C:/Programming/ethernut/nut/dev/spidigio.c:486: error: `SPIDIGIO_SIN_PORT' undeclared (first use in this function)

C:/Programming/ethernut/nut/dev/spidigio.c:486: error: (Each undeclared identifier is reported only once

C:/Programming/ethernut/nut/dev/spidigio.c:486: error: for each function it appears in.)

C:/Programming/ethernut/nut/dev/spidigio.c:487: error: `SPIDIGIO_SIN_DDR' undeclared (first use in this function)

But I added the following to line 143 of avrpio.h

#ifndef SPIDIGIO_SIN_AVRPORT
#define SPIDIGIO_SIN_AVRPORT AVRPORTD
#endif

It cleared up the spidigio.c error.  However, from there on out, I get errors on any attempt to call memcpy passing it a const variable as the second argument

I get:

C:/Programming/ethernut/nut/crt/vsprintf.c: In function `_sputb':
C:/Programming/ethernut/nut/crt/vsprintf.c:61: warning: passing arg 2 of `memcpy' discards qualifiers from pointer target type

The function originally looked like:

static int _sputb(int fd, CONST void *buffer, size_t count)
{
    char **spp = (char **) ((uptr_t) fd);


    memcpy(*spp, buffer, count);
    *spp += count;

    return count;
}

I added a cast of buffer to (unsigned char *)buffer and it compiles that okay, but it appears any point that memcpy is called with a const variable as the source, we get this problem.  Is there something obvious I am missing here?  It seems that memcpy is defined as follows:

--string.h--
extern void *memcpy(void *, const void *, size_t);

Which should handle the original call just fine.


Mark E. Scott Jr.
mscott at awfs.net
512-478-7727 ext. 122
AWS, Inc.

-----Original Message-----
From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Vesa Jääskeläinen
Sent: Tuesday, April 19, 2005 3:49 PM
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] WinAVR 20050214, Ethernut 3.9.5 on STK501

Mark E. Scott Jr. wrote:
> I am trying to get a simplistic compile of Ethernut going using WinAVR 
> 20050214 and Ethernut OS 3.9.5.  I have some errors that others have 
> posted about, and some that appear new to me.

> I used the Nut/OS configurator, and loaded up the stk501 configuration 
> file, made system path changes, and saved it as stk501 - mark, then 
> built the directory tree, which worked fine.

Compare contents of the original stk501 file and your own modifications. 
Are there any fields missing that should be in new one too? I have seen 
cases where saving settings from configurator doesn't save all fields 
and causes failures in the process. Usually I look in configurator what 
I want to change and then make custom file by using text editor and then 
load it to configurator.

Thanks,
Vesa Jääskeläinen
_______________________________________________
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