This is the mail archive of the ecos-discuss@sources.redhat.com 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: Re: Fw: Re: Re: How to generate the binay file


The way I generated binary file is correct. Since the serial port works ok, that means 
code is running. In the original code, I don't initialize the GPIO, the LEDs do work.
This time I init the GPIO manually as

 	HAL_WRITE_UINT32(AT91_PIO + AT91_PIO_PER, LED_MASK);
  	HAL_WRITE_UINT32(AT91_PIO + AT91_PIO_OER, LED_MASK);

Then LEDs work.

I don't know why the code works with elf file but not with binary file.
It must be related to memory layout, I think. Tim, can you please make me clear about that?


Best Regards,				 
Lin Ming
2002-11-02

======= 2002-11-01 10:16:00 YOU WROTE:=======

>Can you let us know what the problem was?  This way if
>others have the same problem they can search through
>the email list archives and find the answer.
>
>-tim
>
>
>
>Lin Ming wrote:
>
>> Thanks to God! I have got it work. It really works!!
>>
>>
>>
>> Best Regards,
>> Lin Ming
>> 2002-11-01
>>
>> ************HERE IS THE FORWARD************
>> NAME: 		Lin Ming
>> ADDRESS:	minglin@atmel.com
>>
>>
>> >Hi, Tim,
>> >
>> >Sure I can generate the binary file before.(I am sorry not to make
>> myself clear.)
>> >But I cannot get it run on my EB40A. It seems there is the problem
>> about memory layout.
>> >The elf file can be executed in arm-elf-gdb, but the binary file
>> cannot run.
>> >
>> >I built ecos in default and the rom_vectors in target.ld is 0xC000.
>> The bin cannot run.
>> >Then I changed eCos HAL>ROM monitor support>work with a ROM monitor
>> to behave as a ROM monitor.
>> >And built ecos. Then the rom_vectors in target.ld is changed to
>> 0x0100000 + 10000, still not run.
>> >So I changed target.ld by hand remove + 10000, then the rom_vectors
>> is changed to 0x01000000.
>> >It seems ok. Then my bin runs but not completely: the serial port
>> works well but the LEDs don't
>> >work. I don't know why...
>> >
>> >Yes, I am a newbie in atmel and I don't know much about ecos. I want
>> to make clear how
>> >to develop our AT91 with ecos and gnu tools so that we can have a
>> free development solution
>> >for the customer. So would you please help me?
>> >
>> >Thanks a lot!!
>> >
>> >
>> >
>> >
>> >
>> >Best Regards,				
>> >Lin Ming
>> >2002-11-01
>> >
>> >======= 2002-10-31 10:37:00 YOU WROTE:=======
>> >
>> >
>> >>Your syntax for arm-elf-objcopy doesn't appear correct.
>> >>Running 'arm-elf-obcopy --help' says to use:
>> >>
>> >>arm-elf-objcopy [switches] infile [outfile]
>> >>
>> >>So try:
>> >>
>> >>arm-elf-objcopy -O binary myapp.elf myapp.bin
>> >>
>> >>I do the same thing to make srecs.
>> >>
>> >>-tim
>> >>
>> >>
>> >>Lin Ming wrote:
>> >>
>> >>
>> >>>Hi, All,
>> >>>
>> >>>I am using EB40 and EB40A. Thanks to Tim and Thomas for their patch
>> >>>and I can run my
>> >>>
>> >>>application on EB40A with elf format file by arm-elf-gdb.
>> >>>
>> >>>But when I type the following command:
>> >>>
>> >>>	arm-elf-objcopy -I elf32-little myapp.elf -O binary myapp.bin
>> >>>
>> >>>to generate the binary file and download to flash, it didn't run.
>> >>>
>> >>>Did I do the right way to generate the binary file? Any idea about
>> that?
>> >>>
>> >>>Maybe the elf32-little format I specified is wrong?
>> >>>
>> >>> 				
>> >>>
>> >>>Best Regards,
>> >>>Lin Ming
>> >>>2002-10-30
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >>.
>> >
>> >= = = = = = = = = = = = = = = = = = = =
>> >			
>>
>>
>> = = = = = = = = = = = = = = = = = = = =
>>
>>
>>
>>
>>
>>
>>
>
>
>
>-- 
>Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
>and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>
>
>.

= = = = = = = = = = = = = = = = = = = =
			





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


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