This is the mail archive of the ecos-patches@sourceware.org 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]
Other format: [Raw text]

New offset option in the AT91SAM7S256 ROM HAL


This patch allows, to make images whit a 0x10000..0x18000 offset.

The reason of this is to allow a RedBoot in the memory from in the range of 0x100000..0x10ffff, to download a image direct to the flash, may be from 0x110000, and start it direct via the "g 0x110000" command.

Oliver



? packages/packages.15.diff
? packages/devs/usb/at91
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00010000_rom.h
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00010000_rom.ldi
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00014000_rom.h
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00014000_rom.ldi
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00018000_rom.h
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x00018000_rom.ldi
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x0_rom.h
? packages/hal/arm/at91/at91sam7s/current/include/pkgconf/mlt_arm_at91sam7s256_0x0_rom.ldi

Index: packages/hal/arm/at91/at91sam7s/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/at91sam7s/current/ChangeLog,v
retrieving revision 1.5
diff -u -r1.5 ChangeLog
--- packages/hal/arm/at91/at91sam7s/current/ChangeLog	13 Mar 2006 07:48:20 -0000	1.5
+++ packages/hal/arm/at91/at91sam7s/current/ChangeLog	2 Apr 2006 19:42:26 -0000
@@ -1,3 +1,11 @@
+2006-04-02  Oliver Munz  <oli@snr.ch>
+
+	* hal_arm_at91sam7s.cdl: Extend the memory-layout configurations
+    for the AT91SAM7S256-ROM target. Allow to link images whit an
+    offset of 0x0, 0x10000, 0x14000 or 0x18000. That enables the 
+    generation of a library for applications, started by RedBoot.
+    There are four new header and linker-script files.
+	
 2006-03-10  Oliver Munz  <oli@snr.ch>
 
 	* hal_arm_at91sam7s.cdl: Change the PLL-defaults so that 96MHz is
Index: packages/hal/arm/at91/at91sam7s/current/cdl/hal_arm_at91sam7s.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/at91/at91sam7s/current/cdl/hal_arm_at91sam7s.cdl,v
retrieving revision 1.3
diff -u -r1.3 hal_arm_at91sam7s.cdl
--- packages/hal/arm/at91/at91sam7s/current/cdl/hal_arm_at91sam7s.cdl	13 Mar 2006 07:48:20 -0000	1.3
+++ packages/hal/arm/at91/at91sam7s/current/cdl/hal_arm_at91sam7s.cdl	2 Apr 2006 19:42:26 -0000
@@ -132,6 +132,19 @@
             into ROM"
     }
 
+    cdl_option CYGNUM_HAL_ARM_AT91_IMAGE_OFFSET {
+        display       "ROM image offset"
+        flavor        data
+        active_if     {(CYG_HAL_STARTUP == "ROM") && (CYGHWR_HAL_ARM_AT91SAM7S == "at91sam7s256")}
+        legal_values {0x0 0x10000 0x14000 0x18000} 
+        default_value 0x0
+        description   "
+            If the imgage will isn't the boot-code and has to be placed some
+            where else in the memory. As example, if the RedBoot is used to
+            boot and start the image, then the offset needs to be in the next
+            not locked memory region. This option is only aviable for the 
+            bigger ROM-configurations and will influence the linker-script."
+    }
         
     # Real-time clock/counter specifics
     cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
@@ -369,7 +382,10 @@
             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
             calculated { (CYG_HAL_STARTUP == "RAM") ? \
                  "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_ram.ldi>" :
-                 "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_rom.ldi>" }
+                 (CYGNUM_HAL_ARM_AT91_IMAGE_OFFSET) ? \
+                    "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_" . CYGNUM_HAL_ARM_AT91_IMAGE_OFFSET . "_rom.ldi>" :
+                    "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_rom.ldi>" 
+            }
         }
 
         cdl_option CYGHWR_MEMORY_LAYOUT_H {
@@ -379,7 +395,10 @@
             define -file system.h CYGHWR_MEMORY_LAYOUT_H
             calculated { (CYG_HAL_STARTUP == "RAM") ? \
                  "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_ram.h>" :
-                 "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_rom.h>" }
+                 (CYGNUM_HAL_ARM_AT91_IMAGE_OFFSET) ? \
+                     "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_" . CYGNUM_HAL_ARM_AT91_IMAGE_OFFSET . "_rom.h>" :
+                     "<pkgconf/mlt_arm_" . CYGHWR_HAL_ARM_AT91SAM7S . "_rom.h>" 
+            }
         }
     }
 }
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#endif
#define CYGMEM_REGION_ram (0x00200000)
#define CYGMEM_REGION_ram_SIZE (0x10000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x00100000)
#define CYGMEM_REGION_rom_SIZE (0x40000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__reserved_bootmon) [];
#endif
#define CYGMEM_SECTION_reserved_bootmon (CYG_LABEL_NAME (__reserved_bootmon))
#define CYGMEM_SECTION_reserved_bootmon_SIZE (0x01000)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x00210000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#endif
#define CYGMEM_REGION_ram (0x00200000)
#define CYGMEM_REGION_ram_SIZE (0x10000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x00110000)
#define CYGMEM_REGION_rom_SIZE (0x30000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__reserved_bootmon) [];
#endif
#define CYGMEM_SECTION_reserved_bootmon (CYG_LABEL_NAME (__reserved_bootmon))
#define CYGMEM_SECTION_reserved_bootmon_SIZE (0x01000)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x00210000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#endif
#define CYGMEM_REGION_ram (0x00200000)
#define CYGMEM_REGION_ram_SIZE (0x10000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x00118000)
#define CYGMEM_REGION_rom_SIZE (0x28000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__reserved_bootmon) [];
#endif
#define CYGMEM_SECTION_reserved_bootmon (CYG_LABEL_NAME (__reserved_bootmon))
#define CYGMEM_SECTION_reserved_bootmon_SIZE (0x01000)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x00210000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#endif
#define CYGMEM_REGION_ram (0x00200000)
#define CYGMEM_REGION_ram_SIZE (0x10000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x00118000)
#define CYGMEM_REGION_rom_SIZE (0x28000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__reserved_bootmon) [];
#endif
#define CYGMEM_SECTION_reserved_bootmon (CYG_LABEL_NAME (__reserved_bootmon))
#define CYGMEM_SECTION_reserved_bootmon_SIZE (0x01000)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x00210000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0x00200000, LENGTH = 0x10000
    rom : ORIGIN = 0x00100000, LENGTH = 0x40000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . = CYG_LABEL_DEFN(__reserved_bootmon) + 0x01000;
    SECTION_rom_vectors (rom, 0x00100000, 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_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x00200040, 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);
    SECTIONS_END
}
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0x00200000, LENGTH = 0x10000
    rom : ORIGIN = 0x00110000, LENGTH = 0x30000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . = CYG_LABEL_DEFN(__reserved_bootmon) + 0x01000;
    SECTION_rom_vectors (rom, 0x00110000, 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_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x00200040, 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);
    SECTIONS_END
}
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0x00200000, LENGTH = 0x10000
    rom : ORIGIN = 0x00114000, LENGTH = 0x2C000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . = CYG_LABEL_DEFN(__reserved_bootmon) + 0x01000;
    SECTION_rom_vectors (rom, 0x00114000, 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_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x00200040, 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);
    SECTIONS_END
}
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram : ORIGIN = 0x00200000, LENGTH = 0x10000
    rom : ORIGIN = 0x00118000, LENGTH = 0x28000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . = CYG_LABEL_DEFN(__reserved_bootmon) + 0x01000;
    SECTION_rom_vectors (rom, 0x00118000, 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_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x00200040, 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);
    SECTIONS_END
}

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