This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
rom Application problem with serial port
- From: aprakash at tataelxsi dot co dot in
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 20 Jun 2005 18:09:28 +0500
- Subject: [ECOS] rom Application problem with serial port
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