About porting gen68360 BSP to our target

Aaron Xinhuan Liu xliu at csr.UVic.CA
Mon Apr 24 16:08:56 UTC 2000


Hi there,

I'd like to port the gen68360 BSP with RTEMS to our target and get the
helloWorld program to work on our target. I have just modifed the files:
start.s, init68360.c, console.c and linkcmds for our target. The
configuration of the target is:

            33 MHz clock rate MC68EN360
            Flash memory, 2 MB @ 0x00000
            DRAM 4MB @ 0x430000
            EEPROM, 32kB @ 0x800000
            DPRBASE @0x8000000
            console serial port on SMC2
            Ethernet interface on SCC1

I built the sample hello_world program and downloaded to the target, but
it does't work and no message display. I have attached the files I
modefied and created to this message. Any help would be apprecaited.

Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: start360.s
Type: application/x-unknown-content-type-s_auto_file
Size: 11988 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20000424/1c84393f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init68360.c
Type: application/x-unknown-content-type-tornadosourcetype
Size: 5313 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20000424/1c84393f/attachment-0001.bin>
-------------- next part --------------
/*
 * This file contains GNU linker directives for a generic MC68360 board.
 * Variations in memory size and allocation can be made by
 * overriding some values with linker command-line arguments.
 *
 * Saskatchewan Accelerator Laboratory
 * University of Saskatchewan
 * Saskatoon, Saskatchewan, CANADA
 * eric at skatter.usask.ca
 * 
 *  $Id: linkcmds,v 1.10 1998/03/23 18:35:39 joel Exp $
 */

/*
 * Declare some sizes.
 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
 *      number used there is not constant.  If this happens to you, edit
 *      the lines marked XXX below to use a constant value.
 */
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;


/*******************************************************************************
*
* linkcmds
*
* Linker command file for creating a user load for the DP-360.
*
*
******************************************************************************/


/*
 * Declare on-board memory.
 * 36 */
MEMORY {
rom_Reserved : ORIGIN = 0x000000, LENGTH = 1M           /* reserved for boot load */
         rom : ORIGIN = 0x100000, LENGTH = 1M 
mem_Reserved : ORIGIN = 0x400000, LENGTH = 0x030000     /* reserved DO NOT USE */
         ram : ORIGIN = 0x430000, LENGTH = 0x3D0000     /* rest of RAM */
      eeprom : ORIGIN = 0x800000, LENGTH = 32k          
	   p2l : ORIGIN = 0x808000, LENGTH = 2k    	/* port 2 External Latch */
	   p3l : ORIGIN = 0x808800, LENGTH = 2k		/* port 3 External Latch */
	   p4l : ORIGIN = 0x809000, LENGTH = 2k		/* port 4 External Latch */
         fr  : ORIGIN = 0x809800, LENGTH = 2k		/* Flash Reset Using CS5 */
	dpram  : ORIGIN = 0x08000000, LENGTH = 8k
}

/* OUTPUT_FORMAT(binary) */


/*
 * Load objects
 */
SECTIONS {
        /*
         * Download PROM
         */
        rom : {
                _RomBase = .;
                __RomBase = .;
        } >rom

/*
         * Dynamic RAM
         */
        ram : {
                _RamBase = .;
                __RamBase = .;
        } >ram
        

/* .text is the rest of the code. */
    header  : {
        my_hdr = .;
        stack = 0x7FF000; 
        magic = 0x47696E6F;
  _startAddr  = &start;  
        LONG(stack)
        LONG(_startAddr)
        LONG(magic)
    } >ram

        /*
         * Text, data and bss segments
         */


        .text : {
                CREATE_OBJECT_SYMBOLS
                *(.text)
                . = ALIGN (16);

		*(.eh_fram)
		. = ALIGN (16);

		/*
		 * C++ constructors
		 */
		__CTOR_LIST__ = .;
		LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
		*(.ctors)
		LONG(0)
		__CTOR_END__ = .;
		__DTOR_LIST__ = .;
		LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
		*(.dtors)
		LONG(0)
		__DTOR_END__ = .;

                etext = .;
                _etext = .;
        } >ram 

        .data : {
                copy_start = .;
                *(.data)
                . = ALIGN (16);
                _edata = .;
                copy_end = .;
        } >ram

        .bss : {
                M68Kvec = .;
                _M68Kvec = .;
                . += (256 * 4);
                clear_start = .;
                *(.bss)
                *(COMMON)
                . = ALIGN (16);
                _end = .;

                _HeapStart = .;
                __HeapStart = .;
                . += HeapSize;  /* XXX -- Old gld can't handle this */
                . += StackSize; /* XXX -- Old gld can't handle this */
                /* . += 0x10000; */ /* HeapSize for old gld */
                /* . += 0x1000;  */ /* StackSize for old gld */
                . = ALIGN (16);
                stack_init = .;
                clear_end = .;

                _WorkspaceBase = .;
                __WorkspaceBase = .;
        } >ram
/*
         * EEPROM
         */
        eeprom : {
                _EepromBase = .;
                __EepromBase = .;
        } >eeprom

        /*
         * On-chip memory/peripherals
         */
        dpram : {
                m360 = .;
                _m360 = .;
                . += (8 * 1024);

        } >dpram
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: console.c
Type: application/x-unknown-content-type-tornadosourcetype
Size: 8924 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20000424/1c84393f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m68360dp.h
Type: application/x-unknown-content-type-tornadosourcetype
Size: 31824 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20000424/1c84393f/attachment-0003.bin>


More information about the users mailing list