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]

FW: Re: both redboot and application 'ROM' startup







From: qlytianya@hotmail.com
To: john@dallaway.org.uk; ecos-discuss@ecos.sourceware.org
Subject: RE: [ECOS] Re: both redboot and application 'ROM' startup
Date: Wed, 15 Sep 2010 19:42:45 +0800





Hi John,

Thanks for your helping!
I have modified the rom.h rom.ldi file as your suggestions.It looks like work well.
While there is a problem about the flash address.
I have modified the rom.ldi as bellow,
#include <cyg/infra/cyg_type.inc>
MEMORY
{
ram : ORIGIN = 0x30000000, LENGTH = 0x00200000
rom : ORIGIN = 0x80100000, LENGTH = 0x1000000
sram : ORIGIN = 0x73000000, LENGTH = 0x4000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, 0x80100000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_RELOCS (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_got (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_eh_frame (rom, ALIGN (0x04), LMA_EQ_VMA)
SECTION_fixed_vectors (ram, 0x30000020, LMA_EQ_VMA)
SECTION_data (ram, 0x30008000, FOLLOWING (.eh_frame))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}

In the redboot ,I use the command 'go 0x80100000' to start the romapp,but failed .
While the command 'go 0x10100000' works well.

I have set the MMU as following,
_MMU(0x100, 0x800, 16, _CACHEABLE, _BUFFERABLE, _PERM_RW_RO); /* Uncached access to NorFlash CS0 */
_MMU(0x100, 0x100, 16, _UNCACHEABLE, _UNBUFFERABLE, _PERM_RW_RO); /* Boot flash ROMspace CS0. */

I don't understand why couldn't use 'go 0x80100000'.But I can use the command 'fis write .... -f 0x80100000' well.
Could you help me analyse it?
Thanks a lot in advance!



> I have certainly demonstrated this in training classes before. In some
> cases, it may be sufficient to modify the ROM startup MLT files in the
> platform HAL package:
> 
> include/pkgconf/mlt_*_rom.h
> include/pkgconf/mlt_*_rom.ldi
> 
> to place the code at a higher address in Flash, aligned with a flash
> block boundary.
> 
> Depending on the platform, there may be issues with re-executing the
> machine initialisation code when you jump into the application code from
> RedBoot. It's not elegant.
> 
> I hope this helps...
> 
> John Dallaway
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>  		 	   		  

-- 
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]