* [U-Boot-Users] help in understand the address of standaloneapplications, ARM MCU
2008-05-11 18:31 [U-Boot-Users] help in understand the address of standalone applications, " Wolfgang Denk
@ 2008-05-11 20:40 ` Ulf Samuelsson
2008-05-12 0:01 ` J.P. Casainho
0 siblings, 1 reply; 3+ messages in thread
From: Ulf Samuelsson @ 2008-05-11 20:40 UTC (permalink / raw)
To: u-boot
> In message <200805111736.50691.casainho@gmail.com> you wrote:
>>
>> I am using an Olimex dev. board with a ARM9, AT91SAM9260 MCU. On my makefile I
>
> Is this board supported in the public U-Boot git tree?
>
>> am linking with address 0xc100000, "LDFLAGS=-Bstatic -Ttext 0xc100000" -- is
>
> What makes you think we would know the memory map of your board better
> than you?
>
>> this address correct? How can I have sure of that? -- I got this value from
>> makefile of "hello world" example.
By looking at the datasheet of the part in questions!
The AT91SAM9260 has fixed decoding of chip selects.
If you want to put your code in SDRAM, you need to put
is somewhere from [0x20000000 .. 0x20000000 + SDRAM_SIZE ]
U-Boot is typically located at [0x20000000 + SDRAM_SIZE - 0x100000]
>
> As the first step you have to understand the memory map of your
> system. We cannot know this.
>
>> When I do "tftp 0xc100000 flash_led.bin" the system hangs.. while If I try to
>
> Then the address is obviously wrong - seems there is no RAM there.
>
>> do for example "tftp 0x1000 flash_led.bin" the code loads ok but after "go
>
> Are you sur the code is really stored to this address? I seriously
> doubt that. 0x1000 is probably an address in flash memory on your
> system, and you do not program the flash (normally) when running a
> "tftp" command.
>
0x1000 looks like internal SRAM. This is VERY limited in size.
>> 0x1000", the code does not work... It evens return while shouldn't because of
>> an infinite loop on the code.
>
> You are probably executing random code that happens to be at that
> location in flash.
>
>> In the manual of the dev. board I have a memory map that says the 64MB RAM
>> starts at 0x20000000 and ends on 0x23FFFFFF - If I do "tftp 0x20000000
>
> Ah, see! So what makes you think 0xc100000 could work?
>
>> flash_LED.bin" system also hangs...
>
> Probably because you are overwriting the exception vectors?
>
>> I must say that with my dev. board comes an "hello world" example which is an
>> empty function :-( -- but even I don't know to what address I should load it.
>
> Ask the company who provided that port of U-Boot and the example
> program?
>
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help in understand the address of standaloneapplications, ARM MCU
2008-05-11 20:40 ` [U-Boot-Users] help in understand the address of standaloneapplications, " Ulf Samuelsson
@ 2008-05-12 0:01 ` J.P. Casainho
0 siblings, 0 replies; 3+ messages in thread
From: J.P. Casainho @ 2008-05-12 0:01 UTC (permalink / raw)
To: u-boot
I would like to "thank you" everyone who did answered to my questions.
I got now a simple code to work, my first stand alone application :-) - I did
used that values suggested by Wolfgang Den and Alessandro Rubini, both values
work :-)
I did read the include/configs/sam9l9260.h but I couldn't understand where is
the information of the first address on SDRAM that I can use for a standalone
application. I am not worried for now about that.
I tried a more complex code that uses a periodic interval timer to do a delay
on flash LED code however this code does not work, It comes back to U-Boot
shell with return value of 1. What can I be doing wrong?
So, to resume and maybe in hope to help someone like me:
My standalone application that is working:
http://code.google.com/p/rockboxplayer/source/browse/flash_led-0.c
My make file:
http://code.google.com/p/rockboxplayer/source/browse/Makefile?r=11
And I just needed to do on U-Boot shell:
"tftp 0x20040000 flash_LED.bin" and after "go 0x20040000" :-) :-)
Thank you all :-) :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help in understand the address of standaloneapplications, ARM MCU
@ 2008-05-12 8:50 J.P. Casainho
0 siblings, 0 replies; 3+ messages in thread
From: J.P. Casainho @ 2008-05-12 8:50 UTC (permalink / raw)
To: u-boot
"I tried a more complex code that uses a periodic interval timer to do a delay
on flash LED code however this code does not work, It comes back to U-Boot
shell with return value of 1. What can I be doing wrong?" -- to answer my own
questions, the page
http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork did help
because I was not going to the right entry point :-)
Thank you all :-) :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-12 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-12 8:50 [U-Boot-Users] help in understand the address of standaloneapplications, ARM MCU J.P. Casainho
-- strict thread matches above, loose matches on Subject: below --
2008-05-11 18:31 [U-Boot-Users] help in understand the address of standalone applications, " Wolfgang Denk
2008-05-11 20:40 ` [U-Boot-Users] help in understand the address of standaloneapplications, " Ulf Samuelsson
2008-05-12 0:01 ` J.P. Casainho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox