public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Building rommable images for the AEB-1C
@ 2000-01-06  5:40 Nicholas_Clarey
  0 siblings, 0 replies; 10+ messages in thread
From: Nicholas_Clarey @ 2000-01-06  5:40 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8173 bytes --]

----- Forwarded by Nick Clarey/ivesco on 01/06/00 01:48 PM -----




Nick Clarey
01/06/00 01:33 PM


        To:        Gary Thomas <gthomas@cygnus.co.uk>
        cc:        
        Subject:        RE: [ECOS] Building rommable images for the AEB-1C Link

Hi Gary,

I've corrected the two warnings that were my fault - I figured that was the problem any way - but the other messages stay.

/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x40219c0 of a.out section .text is not within region rom
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x4021c4c of a.out section .rodata is not within region rom
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory region specified for section `.glue_7'
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory region specified for section `.glue_7t'
collect2: ld returned 1 exit status

As for the toolchain, I'm using exactly what I was told to use :->

2.9-ecosSWtools-arm-990321
GNU ld 2.9-ecosSWtools-arm-990321
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   armelf
GNU assembler 2.9-ecosSWtools-arm-990321
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `arm-elf'.

Should I be using a more recent version?

And the code I'm trying to use - nobody laugh too much, this was just a 2 minute experiment;

#include <cyg/kernel/kapi.h>
#include <cyg/io/serialio.h>
#include <cyg/io/io.h>
#include <cyg/error/codes.h>
#include <stdio.h>

static cyg_serial_info_t serial_port_setup;
static cyg_io_handle_t serial_port_handle;

void cyg_user_start(void)
{

        cyg_uint32 i = 0;
        cyg_uint32 length;
        Cyg_ErrNo error;

        serial_port_setup.baud = CYGNUM_SERIAL_BAUD_38400;
        serial_port_setup.stop = CYGNUM_SERIAL_STOP_1;
        serial_port_setup.parity = CYGNUM_SERIAL_PARITY_NONE;
        serial_port_setup.word_length = CYGNUM_SERIAL_WORD_LENGTH_8;
        serial_port_setup.flags = 0;

        // Open the serial port
        error =        cyg_io_lookup("/dev/serial0", &serial_port_handle);

        length = sizeof(serial_port_setup);

        cyg_io_set_config(serial_port_handle, CYG_IO_SET_CONFIG_SERIAL_INFO, 
                        (void *) &serial_port_setup, &length);

        length = 9;

        for(i=0;i<100;i++)
        {
                // Dump some data down it
                cyg_io_write(serial_port_handle, "TESTTEST\n", &length);
        }

        // Close the serial port

}

One thing I'm pretty sure is wrong anyway is the "/dev/serial0" device opening - I think that should be "/dev/serial1" from what I've read of the AEB-1C docos, but I was going to play with that once I could get it in ROM.

I'll check out that file you mentioned for the GDB stubs; I'll try to get that going.

Thanks,

Nick







Gary Thomas <gthomas@cygnus.co.uk>
Sent by: ecos-discuss-owner@sourceware.cygnus.com
01/06/00 01:00 PM

        
        To:        Nicholas_Clarey@ivesco.co.uk
        cc:        ecos-discuss@sourceware.cygnus.com
        Subject:        RE: [ECOS] Building rommable images for the AEB-1C


On 06-Jan-00 Nicholas_Clarey@ivesco.co.uk wrote:
> Howdy all,
> 
> I've been trying to create an image that I can put into the Arm Evaluation 
> 
> Board flash rom so that I can take over the serial port and play with it. 
> Unfortunately, it's not working.
> 
> I have managed the first stage of producing the CVS gdb stubs and flashed 
> them successfully, and have written test programs, downloaded them and 
> played with them fine. I followed all the necessary instructions in the 
> documentation to do this.
> 
> Here's what I've done so far;
> 
> - produced the build directory with the following command;
> 
> tclsh BASE_DIR/packages/pkgconf.tcl --target=arm 
> --platform=aebC--startup=rom
> 
> which I figured would do what was necessary to give me libraries and stuff 
> 
> I could link with and place in ROM rather than RAM.
> 
> - edited the pkgconf/serial_io.h header file to enable the serial port(s) 
> by #defining the aeb serial port stuff
> - run "make"
> - wrote a simple c program that opened the serial port and dumped some 
> trivial data to it
> 
> When I try to compile the c program in the last step, I did the following;
> 
> arm-elf-gcc -Iinstall/include testfile.c -Linstall/lib -Ttarget.ld 
> -nostdlib
> 
> and I get two errors and two warnings;
> 
> testfile.c: In function `cyg_user_start':
> testfile.c:32: warning: passing arg 4 of `cyg_io_set_config' makes pointer 
> 
> from integer without a cast
> testfile.c:37: warning: passing arg 3 of `cyg_io_write' makes pointer from 
> 
> integer without a cast

I'd have to see your sources to know exactly why you get these warnings.
However, they are from the compiler, telling you that you are apparently not
passing the correct "type" of information to the cyg_io_XXX() functions.

The severity of such missuse can range from being totally benign to complete
failure.  In particular, the second warning says that you've passed an integer
and not a pointer as the third parameter to 'cyg_io_write()'.  This parameter
must be a pointer to the length, not the length itself.  This is because the
function returns the actual number of bytes written in the variable, in case
it differed for some reason from the requested number.

> /usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
> 
> -ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x40219ac of 
> a.out section .text is not within region rom
> /usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
> 
> -ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x4021c34 of 
> a.out section .rodata is not within region rom

If you look at the ROM layout, you'll see that it is only set up to handle
small programs in the flash/ROM.  The default setup is for 32K (0x8000) bytes
at the end of the flash.  The flash on that board is quite limited (128K) and
we didn't want to destroy what was already there (the boot loader, etc).

> /usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
> 
> -ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory 
> region specified for section `.glue_7'
> /usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
> 
> -ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory 
> region specified for section `.glue_7t'

I don't understand these warnings at all [yes, I know what they mean, I just
don't know how you created them].  

What compiler/toolset are you using?
Did you use any special compiler options when building the program?

The other thing to note about running programs in flash/ROM on the AEB is that
eCos assumes that the ARM bootloader is in place, even for these.  This means
that you'll need to set up a flash image "module" which follows the ARM rules.
This is a rather tricky process and not terribly simple to automate.  You
can look at ".../hal/arm/aeb/XXX/misc/PKGconf.mak" to see how it is done for
the GDB stubs.




^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <OF7B928FC7.8F137C30-ON8025685E.005316F3@ivesco.co.uk>]
[parent not found: <OF3C6DA87D.CDC4B358-ON8025685E.004A10DF@ivesco.co.uk>]
* [ECOS] Building rommable images for the AEB-1C
@ 2000-01-06  4:38 Nicholas_Clarey
  2000-01-06  5:00 ` Gary Thomas
  0 siblings, 1 reply; 10+ messages in thread
From: Nicholas_Clarey @ 2000-01-06  4:38 UTC (permalink / raw)
  To: ecos-discuss

Howdy all,

I've been trying to create an image that I can put into the Arm Evaluation 
Board flash rom so that I can take over the serial port and play with it. 
Unfortunately, it's not working.

I have managed the first stage of producing the CVS gdb stubs and flashed 
them successfully, and have written test programs, downloaded them and 
played with them fine. I followed all the necessary instructions in the 
documentation to do this.

Here's what I've done so far;

- produced the build directory with the following command;

tclsh BASE_DIR/packages/pkgconf.tcl --target=arm --platform=aebC--startup=rom

which I figured would do what was necessary to give me libraries and stuff 
I could link with and place in ROM rather than RAM.

- edited the pkgconf/serial_io.h header file to enable the serial port(s) 
by #defining the aeb serial port stuff
- run "make"
- wrote a simple c program that opened the serial port and dumped some 
trivial data to it

When I try to compile the c program in the last step, I did the following;

arm-elf-gcc -Iinstall/include testfile.c -Linstall/lib -Ttarget.ld -nostdlib

and I get two errors and two warnings;

testfile.c: In function `cyg_user_start':
testfile.c:32: warning: passing arg 4 of `cyg_io_set_config' makes pointer 
from integer without a cast
testfile.c:37: warning: passing arg 3 of `cyg_io_write' makes pointer from 
integer without a cast
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x40219ac of 
a.out section .text is not within region rom
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: address 0x4021c34 of 
a.out section .rodata is not within region rom
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory 
region specified for section `.glue_7'
/usr/cygnus/ecosSWtools-arm-990321/i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9 
-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld: warning: no memory 
region specified for section `.glue_7t'
collect2: ld returned 1 exit status

Can someone tell me what I have to do to produce an image that I can stick 
in flash rom and run instead of the gdb stubs? Also, what do the two *link* 
warnings mean?

Thanks,

Nick

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

end of thread, other threads:[~2000-01-07  7:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06  5:40 [ECOS] Building rommable images for the AEB-1C Nicholas_Clarey
     [not found] <OF7B928FC7.8F137C30-ON8025685E.005316F3@ivesco.co.uk>
2000-01-06  7:15 ` Gary Thomas
2000-01-07  6:46   ` Dan Hovang
2000-01-07  7:19     ` Gary Thomas
     [not found] <OF3C6DA87D.CDC4B358-ON8025685E.004A10DF@ivesco.co.uk>
2000-01-06  6:45 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2000-01-06  4:38 Nicholas_Clarey
2000-01-06  5:00 ` Gary Thomas
2000-01-06  6:50   ` Grant Edwards
2000-01-06  7:01     ` Gary Thomas
2000-01-06  7:03     ` Dan Hovang

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).