From: Jesper Vestergaard <openocd@jespervestergaard.dk>
To: u-boot@lists.denx.de
Subject: [U-Boot] What mkimage arguments for standalone AVR32 app?
Date: Tue, 05 May 2009 12:05:19 +0200 [thread overview]
Message-ID: <4A000F5F.30806@jespervestergaard.dk> (raw)
In-Reply-To: <200905050512.09903.vapier@gentoo.org>
Mike Frysinger wrote:
> On Tuesday 05 May 2009 04:55:44 Jesper Vestergaard wrote:
>
>> mkimage -A avr32 -O u-boot -T standalone -C none -a 0x11000000 -e
>> 0x11000000 -n "myapp" -d test.bin test_uboot.bin
>>
>
> the entry/load addresses need to match reality. you cant pick them out of the
> air without properly setting them everywhere.
>
> you also didnt say how you compiled/linked the standalone code ... you must be
> sure to not use any files/libraries/toolchain that expect an operating system
> (like Linux).
>
Here's how i compiled it:
avr32-gcc -O2 -Wall -c -fmessage-length=0 -mpart=ap7000
-ffunction-sections -o test.o test.c
avr32-ld test.o -e 0x00000000 -T simple.lds -o test.out
avr32-objcopy -O binary test.out test.bin
And the simple.lds:
SECTIONS
{
. = 0x11000000;
/*. = 0x00000000; */
.text : { *(.text) }
/* . = 0x8000000; */
.data : { *(.data) }
.bss : { *(.bss) }
}
and a objectdump:
avr32-objdump -d test.out
test.out: file format elf32-avr32
Disassembly of section .text.main:
11000000 <main>:
11000000: d7 03 nop
11000002: d7 03 nop
11000004: d7 03 nop
11000006: d7 03 nop
11000008: c0 08 rjmp 11000008 <main+0x8>
>
>> ICnova> tftp 11000000 test_uboot.bin
>> ICnova> bootm 11000000
>> Load Address: 11000000
>> Entry Point: 11000000
>>
> you shoulud not load (tftp) the bootable image to the same address that it
> will be uncompressing to (load address).
>
> really you should read doc/README.standalone and the simple examples in
> examples/ instead of trying random commands.
> -mike
>
According to the Makefile in the example directory i should load the
binary to 0x00000000
ifeq ($(ARCH),avr32)
LOAD_ADDR = 0x00000000
endif
but looking at the uboot startup it says that the flash is placed at
that address and that the SDRAM is placed at 0x10000000.
Flash: 8 MB at address 0x00000000
SDRAM: 64 MB at address 0x10000000
Which of the addresses should i use?
I couldn't find any documentation about what entry address i should use
for the avr32 but according to the README.standalone it is only the
power pc which needs a entry address different from the load address so
i guess load address=entry address.
next prev parent reply other threads:[~2009-05-05 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 8:55 [U-Boot] What mkimage arguments for standalone AVR32 app? Jesper Vestergaard
2009-05-05 9:12 ` Mike Frysinger
2009-05-05 10:05 ` Jesper Vestergaard [this message]
2009-05-05 11:32 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A000F5F.30806@jespervestergaard.dk \
--to=openocd@jespervestergaard.dk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.