public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] 16bit RAM
       [not found] <1086018489.5534.7.camel@linux.local>
@ 2004-06-01  6:34 ` sandeep
  2004-06-01  7:24 ` Nick Garnett
  1 sibling, 0 replies; 2+ messages in thread
From: sandeep @ 2004-06-01  6:34 UTC (permalink / raw)
  To: Sven Rehfuss; +Cc: ecos-discuss

Hi Sven,
> 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".
did you try stepping through above strcpy call? that might help you further.
my guess is if you try strcpy(a,"/dev/ser00"); (for that matter any even length 
string) you are likely to get what you expect, assuming buffer pointed by a is 
big enough.

> 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 ("$$").
I have one small doubt here, say if two characters were read, is $$ , what you 
expect? what is the outcome of cyg_io_read call, when len=1/2/3/4 and what you 
expect in each case?

-- 
regards
sandeep
--------------------------------------------------------------------------
Graduate life: It's not just a job.  It's an indenture.
--------------------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] 16bit RAM
       [not found] <1086018489.5534.7.camel@linux.local>
  2004-06-01  6:34 ` [ECOS] 16bit RAM sandeep
@ 2004-06-01  7:24 ` Nick Garnett
  1 sibling, 0 replies; 2+ messages in thread
From: Nick Garnett @ 2004-06-01  7:24 UTC (permalink / raw)
  To: Sven Rehfuss; +Cc: ecos-discuss

Sven Rehfuss <sven.rehfuss@b2motion.de> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-01  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1086018489.5534.7.camel@linux.local>
2004-06-01  6:34 ` [ECOS] 16bit RAM sandeep
2004-06-01  7:24 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).