public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Simpkins, Andy" <Andy.Simpkins@Transcomm.uk.com>
To: ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] forwarded message from Simpkins, Andy
Date: Fri, 17 Aug 2001 08:24:00 -0000	[thread overview]
Message-ID: <919A3A7F776FD311AFD600508B44A7F30179584A@ramhqlon.transcomm.uk.com> (raw)

Configuration of the system
	Target Platform : Custom board (ARM7TDMI core)
	Development Host: Windows NT 4 sp6, cygwin, eCos 1.3.1, GCC 2.95.2
	
This is the current test file I am using:

main.cpp (entire file)

	/* INCLUDES */
	
	#include <stdio.h>                      /* printf */
	#include <string.h>                     /* strlen */
	#include <cyg/kernel/kapi.h>            /* All the kernel specific
stuff */
	#include <cyg/io/io.h>                  /* I/O functions */
	#include <cyg/hal/hal_arch.h>           /*
CYGNUM_HAL_STACK_SIZE_TYPICAL */
	#include <cyg/infra/diag.h>             /* diag_printf */
	#include <cyg/hal/t3.h>                 /* LED Control */
	#include <stdlib.h>
	
	
	void __attribute__ ((section (".2ram.flash_query"), long_call))
flash_query(void)
	{
	   for (int i=0; i < 0xffff; i++);
	}
	
	
	extern "C" int main(void)
	{   
	   flash_query();
	 
	   return 0;
	}

the build process (with errors returned)

	$ cd /z/TMCB/Build/ARM/eCos/app/testFLASH
	$ rm *.o
	$ arm-elf-gcc -c -I /i/eCOSbuilds/a161_install/include/
../../../../../source/app/testFLASH/*.cpp -fno-rtti -fno-exceptions
	../../../../../source/app/testFLASH/main.cpp: In function `void
flash_query()':
	../../../../../source/app/testFLASH/main.cpp:14: warning:
`long_call' attribute directive ignored
	$ arm-elf-gcc *.o -L /i/eCOSbuilds/a161_install/lib/ -Ttarget.ld
-nostdlib -Xlinker -Map -Xlinker mapfile.txt
	main.o: In function `main':
	main.o(.text+0x10): relocation truncated to fit: R_ARM_PC24
flash_query(void)
	collect2: ld returned 1 exit status

and to round things off the mods to arm.ld (extract) as suggested by
Jesper...

	#define SECTION_data(_region_,  _vma_, _lma_) \
	    .data _vma_ : _lma_ \
	    { __ram_data_start = ABSOLUTE (.); *(.data*) *(.data1)
MERGE_IN_RODATA \
	    _GOT1_START_ = ABSOLUTE (.); *(.got1) _GOT1_END_ = ABSOLUTE (.);
\
	    _GOT2_START_ = ABSOLUTE (.); *(.got2) _GOT2_END_ = ABSOLUTE (.);
\
	    . = ALIGN (4); \
	    __DEVTAB__ = ABSOLUTE (.); KEEP (*(SORT (.devtab*)))
__DEVTAB_END__ = ABSOLUTE (.); \
	    __NETDEVTAB__ = ABSOLUTE (.); KEEP (*(SORT (.netdevtab*)))
__NETDEVTAB_END__ = ABSOLUTE (.); \
	    __CTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.ctors*)))
__CTOR_END__ = ABSOLUTE (.); \
	    __DTOR_LIST__ = ABSOLUTE (.); KEEP (*(SORT (.dtors*)))
__DTOR_END__ = ABSOLUTE (.); \
	    *(.dynamic) *(.sdata*) *(.sbss*)  \
	    . = ALIGN (4); *(.2ram.*) } \
	    > _region_ \
	    __rom_data_start = LOADADDR (.data); \
	    __ram_data_end = .; PROVIDE (__ram_data_end = .); _edata = .;
PROVIDE (edata = .); \
	    PROVIDE (__rom_data_end = LOADADDR (.data) + SIZEOF(.data));



---
Transcomm UK Ltd.   DDI : +44 (0)23 80662155
Yeoman Park         Fax : +44 (0)23 80662120
Test Lane 
Southampton         www.transcomm.uk.com
SO16 9JX 

             reply	other threads:[~2001-08-17  8:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-17  8:24 Simpkins, Andy [this message]
2001-08-17  9:10 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2001-08-20  8:47 Simpkins, Andy
2001-08-20  1:12 Simpkins, Andy
2001-08-20  6:25 ` Jonathan Larmour
2001-08-17  9:33 Simpkins, Andy
2001-08-17  9:24 Simpkins, Andy
2001-08-17  9:31 ` Jonathan Larmour
2001-08-17 10:13 ` Mark Salter
2001-08-17  7:42 Simpkins, Andy
2001-08-17  7:46 ` Mark Salter
2001-08-17  7:46 ` David Airlie
2001-08-17  7:31 Simpkins, Andy
2001-08-17  7:36 ` Mark Salter
2001-08-17  7:05 Simpkins, Andy
2001-08-17  7:18 ` Mark Salter
2001-08-17  6:44 Jesper Skov
2001-08-17  6:55 ` Mark Salter

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=919A3A7F776FD311AFD600508B44A7F30179584A@ramhqlon.transcomm.uk.com \
    --to=andy.simpkins@transcomm.uk.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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).