From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13121 invoked by alias); 1 Jun 2004 07:24:45 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 13103 invoked from network); 1 Jun 2004 07:24:44 -0000 Received: from unknown (HELO anchor-post-34.mail.demon.net) (194.217.242.92) by sourceware.org with SMTP; 1 Jun 2004 07:24:44 -0000 Received: from [83.104.54.243] (helo=xl5.calivar.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1BV3db-0006Hs-0Y; Tue, 01 Jun 2004 08:24:43 +0100 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 10B9D29376; Tue, 1 Jun 2004 08:24:43 +0100 (BST) To: Sven Rehfuss Cc: ecos-discuss@sources.redhat.com References: <1086018489.5534.7.camel@linux.local> From: Nick Garnett Date: Tue, 01 Jun 2004 07:24:00 -0000 In-Reply-To: <1086018489.5534.7.camel@linux.local> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] 16bit RAM X-SW-Source: 2004-06/txt/msg00002.txt.bz2 Sven Rehfuss writes: > Hello, > again a problem using 16bit RAM. > The RAM is connected to an ARM7 (AT91R40008) and is working. > The RAM is addressed as a 16bit memory without byte select lines (the > flash is connected the same way). I can read and write but if I do a > strcpy(a,"/dev/ser0"); > the string in "a" is "/dev/ser". > The next thing is reading from the serial port. With another board I get > one byte by > int read ; > len = 1 ; > cyg_io_read(handleComPort, &read, &len); > and e.g. read = 0x24 ("$"). > > With the new board I get > read = 0x2424 ("$$"). > How can I tell eCos that the memory is a 16bit RAM (e.g. a char maybe > 16bit wide)? The last thing you want to do is to start messing about with the C compiler to fix this. You need to take a look at how the memory controller is being set up and maybe change it to match the memory you have attached. Clearly you cannot change the hardware under the feet of the code and expect it to still work. You will find the MEMC setup in hal_platform_setup.h. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com/ The eCos and RedBoot experts -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss