This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Please check my *.ecc file


Just so we're straight, you're using the basic 'mbx' port on a platform
which is very much the same, but with a different memory map?

If this is the only difference, then you can use CDL to control and
describe these differences.  Look at the ARM/EDB7xxx ports for examples.

If there are more differences than just the memory map, perhaps you want
to have a completely new platform, with the associated CDL.

In any case, the code cited below is pretty ugly.  I'll apply the attached
patch to make it better.

On 15-Aug-2000 ligl wrote:
> You must to modify the mbx.S for your rom:
> 
>#ifdef CYG_HAL_STARTUP_ROM
>  # move return address to where the ROM is
>  mflr r3
>  andi. r3,r3,0xffff
>  oris r3,r3,0x0600  ====>> oris r3,r3,0xfc00
>  mtlr r3
>#endif
>   ----- Original Message ----- 
>   From: Àå¿øÈ£ 
>   To: ecos-discuss@sources.redhat.com 
>   Sent: Saturday, August 12, 2000 4:39 PM
>   Subject: [ECOS] Please check my *.ecc file
> 
> 
>   Thanks to your e-mail ,I succeeded building the stub.
>   However my stub rom was not running on the MBX .
> 
>   I just modified rom origin address( 0x6000000 -> 0xfc000000) in target.ld file.

You should really make such changes in the MLT.  Editting of 'target.ld' will
only get you into trouble in the long run (plus my patches won't help!)

Index: hal/powerpc/arch/current/ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/powerpc/arch/current/ChangeLog,v
retrieving revision 1.224
diff -u -5 -p -r1.224 ChangeLog
--- hal/powerpc/arch/current/ChangeLog  2000/06/28 09:45:12     1.224
+++ hal/powerpc/arch/current/ChangeLog  2000/08/15 11:04:02
@@ -1,5 +1,9 @@
+2000-08-15  Gary Thomas  <gthomas@redhat.com>
+
+       * src/hal_mk_defs.c: Export memory layout for use by assembly code.
+
 2000-06-27  Jesper Skov  <jskov@redhat.com>
 
        * src/vectors.S: Removed unnecessary
        CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT checks.
 
Index: hal/powerpc/arch/current/src/hal_mk_defs.c
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/powerpc/arch/current/src/hal_mk_defs.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_mk_defs.c
--- hal/powerpc/arch/current/src/hal_mk_defs.c  2000/02/22 10:14:53     1.3
+++ hal/powerpc/arch/current/src/hal_mk_defs.c  2000/08/15 11:04:03
@@ -42,10 +42,11 @@
 //####DESCRIPTIONEND####
 //
 //==========================================================================
 
 #include <pkgconf/hal.h>
+#include CYGHWR_MEMORY_LAYOUT_H     
 
 #include <cyg/hal/hal_arch.h>           // HAL header
 #include <cyg/hal/hal_intr.h>           // HAL header
 #ifdef CYGPKG_KERNEL
 # include <pkgconf/kernel.h>
@@ -121,10 +122,18 @@ main(void)
     DEFINE(CYGNUM_HAL_VSR_COUNT, CYGNUM_HAL_VSR_COUNT);
 
     // Variant definitions - want these to be included instead.
 #ifdef CYGPKG_HAL_POWERPC_MPC8xx
     DEFINE(CYGNUM_HAL_VECTOR_NMI, CYGNUM_HAL_VECTOR_NMI);
+#endif
+
+    // Memory layout values (since these aren't "asm"-safe)
+#ifdef CYGMEM_REGION_rom    
+    DEFINE(CYGMEM_REGION_rom, CYGMEM_REGION_rom);
+#endif
+#ifdef CYGMEM_REGION_ram    
+    DEFINE(CYGMEM_REGION_ram, CYGMEM_REGION_ram);
 #endif
 }
 
 //--------------------------------------------------------------------------
 // EOF hal_mk_defs.c
Index: hal/powerpc/mbx/current/ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/powerpc/mbx/current/ChangeLog,v
retrieving revision 1.61
diff -u -5 -p -r1.61 ChangeLog
--- hal/powerpc/mbx/current/ChangeLog   2000/06/28 09:45:17     1.61
+++ hal/powerpc/mbx/current/ChangeLog   2000/08/15 11:03:16
@@ -1,5 +1,9 @@
+2000-08-15  Gary Thomas  <gthomas@redhat.com>
+
+       * src/mbx.S: Use actual ROM layout instead of magic numbers.
+
 2000-06-28  Jesper Skov  <jskov@redhat.com>
 
        * include/hal_diag.h: 
        * src/hal_diag.c: 
        Cleanup.
Index: hal/powerpc/mbx/current/src/mbx.S
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/powerpc/mbx/current/src/mbx.S,v
retrieving revision 1.15
diff -u -5 -p -r1.15 mbx.S
--- hal/powerpc/mbx/current/src/mbx.S   2000/02/21 14:55:13     1.15
+++ hal/powerpc/mbx/current/src/mbx.S   2000/08/15 11:01:34
@@ -402,11 +402,11 @@ FUNC_START( hal_hardware_init )
 
 #ifdef CYG_HAL_STARTUP_ROM
        # move return address to where the ROM is
        mflr    r3
        andi.   r3,r3,0xffff
-       oris    r3,r3,0xfe00
+       oris    r3,r3,CYGMEM_REGION_rom>>16
        mtlr    r3
 #endif
 
        blr
 FUNC_END( hal_hardware_init )


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]