mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Vanalme Filip <F.Vanalme@TELEVIC.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: test app
Date: Tue, 8 Mar 2011 13:22:18 +0200	[thread overview]
Message-ID: <20110308112217.GD22012@jasper.tkos.co.il> (raw)
In-Reply-To: <6EE7D1502C48E44E92DCADF9DD3E0DB9017FF3B0120B@SRV-VS06.TELEVIC.COM>

Hi Vanalme,

On Tue, Mar 08, 2011 at 11:09:57AM +0100, Vanalme Filip wrote:
> As a start, I just took over your Makefile and a minimal source file :
> 
> __asm__ (".text\n"
>         ".globl _start\n"
>         "_start:\n"
>         "ldr    sp, =0xA7E00000\n"
>         "bl     main\n"
>         "stop:\n"
>         "b      stop\n"
>         );
> 
> int main (int argc, char *argv[])
> {
> 	return 0;
> }
> 
> I think I might still miss something because the assembler part gives me errors e.g. 
> 	" Error: no such instruction: 'ldr sp,=0xA7E00000' "
> 	" Error: no such instruction: 'bl main' "
> 	" Error: no such instruction: 'b stop' "
> 
> Maybe a tab/space related issue ?

Works for me (using the CodeSourcery toolchain):

$ cat baretest.c 
__asm__ (".text\n"
        ".globl _start\n"
        "_start:\n"
        "ldr    sp, =0xA7E00000\n"
        "bl     main\n"
        "stop:\n"
        "b      stop\n"
        );

int main (int argc, char *argv[])
{
        return 0;
}
$ arm-none-linux-gnueabi-gcc -Wall -Os -nostdlib baretest.c -o baretest.elf -Wl,-Ttext=0x78000000
$ arm-none-linux-gnueabi-objdump -S baretest.elf 

baretest.elf:     file format elf32-littlearm


Disassembly of section .text:

78000000 <_start>:
78000000:   e59fd00c    ldr sp, [pc, #12]   ; 78000014 <main+0x8>
78000004:   eb000000    bl  7800000c <main>

78000008 <stop>:
78000008:   eafffffe    b   78000008 <stop>

7800000c <main>:
7800000c:   e3a00000    mov r0, #0
78000010:   e12fff1e    bx  lr
78000014:   a7e00000    .word   0xa7e00000

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-03-08 11:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 13:05 Vanalme Filip
2011-03-08  5:40 ` Baruch Siach
2011-03-08  8:13   ` Vanalme Filip
2011-03-08 10:09     ` Vanalme Filip
2011-03-08 11:22       ` Baruch Siach [this message]
2011-03-08 15:52         ` Vanalme Filip
2011-03-08 18:08           ` Baruch Siach
2011-03-09  8:28             ` Vanalme Filip
2011-03-14 14:55               ` Vanalme Filip
2011-03-14 17:31                 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-14 18:03                 ` Baruch Siach
2011-03-15 11:03                   ` Vanalme Filip
2011-03-15 11:47                     ` Zoltán Kócsi
2011-03-08 11:43       ` Sascha Hauer
2011-03-08 12:43         ` Vanalme Filip
2011-03-08 11:50 ` Sascha Hauer

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=20110308112217.GD22012@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=F.Vanalme@TELEVIC.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox