[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] ".org" in external asm file

From: Keith Gudger
Subject: Re: [avr-gcc-list] ".org" in external asm file
Date: Sat, 19 Jul 2003 11:49:26 -0700 (PDT)

I've just been dealing with this problem... Here's the method that worked
for me.

In your assembly file:

    .section .sboxes,"ax",@progbits             
    .global  sboxes         ; Prototype 

  .byte ...

In your make file:
override LDFLAGS       =

and if you want it in a hex file:

%.hex: %.elf
        $(OBJCOPY) -j .text -j .data -j .sboxes -O ihex $< $@


On 19 Jul 2003, Thomas Rehm wrote:

> Hi,
> how can I set a table of bytes to a specific address correctly?
> I put assembly code with an interrupt routine and a table on an absolute
> address in an external assembler file. The C routine communicate via
> global register variables with the interrupt. - So far it works.
> But I have a problem to define where I want to have my table.
> The table in the asm file looks like this:
>   .org 0x100
>   .byte 0x80,0x82,0x85,0x88,0x8C,0x8F,0x92,0x95
> After compiling this I found the table somewhere higher in the binary.
> After some hacking I found ".org 0xA2" will set the table address to 0x100
> in the compiled binary. - It works, but it's not that pretty...
> Any hint?
> Thanks,
> Tom.
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]