This is the mail archive of the ecos-discuss@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]

Re: Running Redboot RAM mode on custom AT91x40 board


Here is my build script and the changes I made to the at91 tree.

[davidho@penguin ecos-dev]$ cat build.sh
export ECOS_REPOSITORY=~/ecos-dev/ecos-2.0/packages
export ARCH_DIR=arm
#export TARGET=eb40a
#export PLATFORM_DIR=at91/eb40a
export TARGET=at91
export PLATFORM_DIR=at91
#export REDBOOT_CFG=redboot_ROM
export REDBOOT_CFG=redboot_RAM
#export REDBOOT_CFG=redboot_ROMRAM
export VERSION=v2_0

. ~/ecos-dev/ecosenv.sh
rm -rf ~/ecos-dev/${REDBOOT_CFG}
mkdir ~/ecos-dev/${REDBOOT_CFG}
cd ~/ecos-dev/${REDBOOT_CFG}
ecosconfig new ${TARGET} redboot
ecosconfig import
${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm
ecosconfig tree
make

diff --git a/packages/hal/arm/at91/v2_0/cdl/hal_arm_at91.cdl
b/packages/hal/arm/at91/v2_0/cdl/hal_arm_at91.cdl
index 3d67540..c082c00 100644
--- a/packages/hal/arm/at91/v2_0/cdl/hal_arm_at91.cdl
+++ b/packages/hal/arm/at91/v2_0/cdl/hal_arm_at91.cdl
@@ -134,7 +134,7 @@ cdl_package CYGPKG_HAL_ARM_AT91 {
    cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
        display       "CPU clock speed"
        flavor        data
-        calculated    32768000
+        calculated    25000000
    }

    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
diff --git a/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.h
b/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.h
index c641278..47ec526 100644
--- a/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.h
+++ b/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.h
@@ -8,13 +8,13 @@ #include <stddef.h>

#endif
#define CYGMEM_REGION_sram (0)
-#define CYGMEM_REGION_sram_SIZE (0x1000)
+#define CYGMEM_REGION_sram_SIZE (0x40000)
#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
-#define CYGMEM_REGION_ram (0x2000000)
-#define CYGMEM_REGION_ram_SIZE (0x80000)
+#define CYGMEM_REGION_ram (0x10000000)
+#define CYGMEM_REGION_ram_SIZE (0x100000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
-#define CYGMEM_SECTION_heap1_SIZE (0x2080000 - (size_t)
CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x10080000 - (size_t)
CYG_LABEL_NAME (__heap1))
diff --git a/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.ldi
b/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.ldi
index 287aba3..4d0399f 100644
--- a/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.ldi
+++ b/packages/hal/arm/at91/v2_0/include/pkgconf/mlt_arm_at91_eb40_ram.ldi
@@ -6,15 +6,15 @@ #include <cyg/infra/cyg_type.inc>

MEMORY
{
-    sram : ORIGIN = 0, LENGTH = 0x1000
-    ram : ORIGIN = 0x2000000, LENGTH = 0x80000
+    sram : ORIGIN = 0, LENGTH = 0x40000
+    ram : ORIGIN = 0x10000000, LENGTH = 0x100000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
-    SECTION_rom_vectors (ram, 0x2020000, LMA_EQ_VMA)
+    SECTION_rom_vectors (ram, 0x10020000, LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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