public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: aprakash@tataelxsi.co.in
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] rom Application problem with serial port
Date: Mon, 20 Jun 2005 13:10:00 -0000	[thread overview]
Message-ID: <1fff121fd960.1fd9601fff12@vsnl.net> (raw)

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

             reply	other threads:[~2005-06-20 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20 13:10 aprakash [this message]
2005-06-20 17:14 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fff121fd960.1fd9601fff12@vsnl.net \
    --to=aprakash@tataelxsi.co.in \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).