Chinaunix首页 | 论坛 | 博客
  • 博客访问: 495186
  • 博文数量: 63
  • 博客积分: 1187
  • 博客等级: 少尉
  • 技术积分: 706
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-05 16:53
个人简介

Must Be

文章分类

全部博文(63)

文章存档

2019年(1)

2017年(4)

2016年(6)

2015年(2)

2014年(1)

2013年(3)

2012年(10)

2011年(36)

我的朋友

分类: LINUX

2011-03-09 16:35:21

这几天弄一块ixp425的板子,64M的SDRAM,64M的Flash,infineon adm6996L交换芯片。
拿到手的时候redboot已经可以跑了,但是网络不通,网络接口硬件提供的GPIO12,
在main.c第387行填加
HAL_GPIO_OUTPUT_ENABLE(12);//configure gpio 12 as output
HAL_GPIO_OUTPUT_CLEAR(12);   
HAL_DELAY_US(500000);
HAL_GPIO_OUTPUT_SET(12);
redboot 成功跑起来,网络通,能tftp下载文件系统和内核。然后修改硬件环境,改64M sdram为32M sdram
 
由于redboot用得比较少,网上关于这方面的介绍几乎没有,所以打算写下来,希望给需要的提供点思路,我的redboot是基于intel提供的参考包
1 packages\hal\arm\xscale\ixdp425\current\include\ixpdp425.h
原文件为86行
#define IXP425_SDRAM_CONFIG_INIT_64M  (SDRAM_CONFIG_CAS_3 | SDRAM_CONFIG_2x16Mx16)
#define IXP425_SDRAM_CONFIG_INIT_128M  (SDRAM_CONFIG_CAS_3 | SDRAM_CONFIG_4x16Mx16)
#define IXP425_SDRAM_CONFIG_INIT_256M  (SDRAM_CONFIG_CAS_3 | SDRAM_CONFIG_4x32Mx16)
前加入32M定义
#define IXP425_SDRAM_CONFIG_INIT_32M  (SDRAM_CONFIG_CAS_3 | SDRAM_CONFIG_2x8Mx16)
 
2 将packages\hal\arm\xscale\ixdp425\current\include\hal_platform_setup.h
IXP425_SDRAM_CONFIG_INIT_64M改为IXP425_SDRAM_CONFIG_INIT_32M
 
3 将packages\hal\arm\xscale\ixdp425\current\include\pkgconf\mlt_arm_xscale_ixdp425_ram.h
原文件为
#ifndef __ASSEMBLER__
#include
#include
#endif
#define CYGMEM_REGION_ram (0x01000000)
#define CYGMEM_REGION_ram_SIZE (0x03000000)
#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 (0x04000000 - (size_t) CYG_LABEL_NAME (__heap1))
修改为
#ifndef __ASSEMBLER__
#include
#include
#endif
#define CYGMEM_REGION_ram (0x01000000)
#define CYGMEM_REGION_ram_SIZE (0x01000000)
#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 (0x02000000 - (size_t) CYG_LABEL_NAME (__heap1))
 
4 将packages\hal\arm\xscale\ixdp425\current\include\pkgconf
\mlt_arm_xscale_ixdp425_rom.h
原文件
#ifndef __ASSEMBLER__
#include
#include
#endif
#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x04000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x50000000)
#define CYGMEM_REGION_rom_SIZE (0x400000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x04000000 - (size_t) CYG_LABEL_NAME (__heap1))
修改为
#ifndef __ASSEMBLER__
#include
#include
#endif
#define CYGMEM_REGION_ram (0)
#define CYGMEM_REGION_ram_SIZE (0x02000000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x50000000)
#define CYGMEM_REGION_rom_SIZE (0x400000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x02000000 - (size_t) CYG_LABEL_NAME (__heap1))
 
另外有两个文件可能就有点隐秘了
4 将packages\hal\arm\xscale\ixdp425\current\include\pkgconf\mlt_arm_xscale_ixdp425_ram.ldi
将原文件
// eCos memory layout - Fri Oct 20 05:56:24 2000
// This is a generated file - do not edit
#include
MEMORY
{
ram : ORIGIN = 0x01000000, LENGTH = 0x04000000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_fixed_vectors (ram, 0x01000020, LMA_EQ_VMA)
SECTION_rom_vectors (ram, 0x01020000, 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)
SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}
改为
// eCos memory layout - Fri Oct 20 05:56:24 2000
// This is a generated file - do not edit
#include
MEMORY
{
ram : ORIGIN = 0x01000000, LENGTH = 0x02000000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_fixed_vectors (ram, 0x01000020, LMA_EQ_VMA)
SECTION_rom_vectors (ram, 0x01020000, 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)
SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}
 
6
4 将packages\hal\arm\xscale\ixdp425\current\include\pkgconf\mlt_arm_xscale_ixdp425_rom.ldi
将原文件
/ eCos memory layout - Tue Jul 02 10:03:04 2002
// This is a generated file - do not edit
#include
MEMORY
{
ram : ORIGIN = 0, LENGTH = 0x04000000
rom : ORIGIN = 0x50000000, LENGTH = 0x40000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, 0x50000000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), 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_mmu_tables (rom, ALIGN (0x4000), LMA_EQ_VMA)
SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
SECTION_data (ram, 0x8000, FOLLOWING (.mmu_tables))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}
 
改为
/ eCos memory layout - Tue Jul 02 10:03:04 2002
// This is a generated file - do not edit
#include
MEMORY
{
ram : ORIGIN = 0, LENGTH = 0x02000000
rom : ORIGIN = 0x50000000, LENGTH = 0x40000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, 0x50000000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), 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_mmu_tables (rom, ALIGN (0x4000), LMA_EQ_VMA)
SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
SECTION_data (ram, 0x8000, FOLLOWING (.mmu_tables))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}

转自:http://blog.chinaunix.net/u1/37080/showart_1353880.html
阅读(1614) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~