This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 16bit RAM


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]