* [ECOS] rom Application problem with serial port
@ 2005-06-20 13:10 aprakash
2005-06-20 17:14 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: aprakash @ 2005-06-20 13:10 UTC (permalink / raw)
To: ecos-discuss
Hi,
I m trying to run a simple application from flash which will open serial port /dev/ser1 and write hello world message..
I have choosen default option for integrator with posix support and flash support. my flash memory size is 32MB, RAM size is 320KB. i have modified include/pkgconf/*_rom.h file and *_rom.ldi files. I pasted below too...
I have enabled tty channal #0,and #1 also. when my application open my serial port, it returns -2.
please help me to figureout to access serial port ...
// eCos memory layout - Tue Feb 29 14:25:49 2000
// This is a generated file - do not edit
#include <cyg/infra/cyg_type.h>
#include <stddef.h>
#define CYGMEM_REGION_ram (0)
//#define CYGMEM_REGION_ram_SIZE (0x01000000)
#define CYGMEM_REGION_ram_SIZE (0x00050000) // my Ram size..
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x24040000) // my executable in FLASH
#define CYGMEM_REGION_rom_SIZE (0x02000000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
//#define CYGMEM_SECTION_heap1_SIZE (0xf00000 - (size_t) CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x00050000 - (size_t) CYG_LABEL_NAME (__heap1))
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__pci_window) [];
#endif
#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window))
#define CYGMEM_SECTION_pci_window_SIZE (0x100000)
------------------------------
ldi file
// eCos memory layout - Tue Feb 29 14:25:49 2000
// This is a generated file - do not edit
#include <cyg/infra/cyg_type.inc>
MEMORY
{
ram : ORIGIN = 0, LENGTH = 0x00050000
rom : ORIGIN = 0x24040000, LENGTH = 0x02000000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, 0x24040000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA)
// SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_got (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), FOLLOWING (.gcc_except_table))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
// CYG_LABEL_DEFN(__pci_window) = 0xf00000; . = CYG_LABEL_DEFN(__pci_window) + 0x100000;
SECTIONS_END
}
Thanks
Prakash
--
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] rom Application problem with serial port
2005-06-20 13:10 [ECOS] rom Application problem with serial port aprakash
@ 2005-06-20 17:14 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2005-06-20 17:14 UTC (permalink / raw)
To: aprakash; +Cc: ecos-discuss
On Mon, Jun 20, 2005 at 06:09:28PM +0500, aprakash@tataelxsi.co.in wrote:
> Hi,
>
> I m trying to run a simple application from flash which will open serial port /dev/ser1 and write hello world message..
>
> I have choosen default option for integrator with posix support and flash support. my flash memory size is 32MB, RAM size is 320KB. i have modified include/pkgconf/*_rom.h file and *_rom.ldi files. I pasted below too...
>
> I have enabled tty channal #0,and #1 also. when my application open my serial port, it returns -2.
>
packages/error/current/include/code.h:
#define ENOENT 2 /* No such entity */
Have you enabled CYGPKG_IO_SERIAL_DEVICES?
Andrew
--
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:[~2005-06-20 17:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-20 13:10 [ECOS] rom Application problem with serial port aprakash
2005-06-20 17:14 ` Andrew Lunn
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).