EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Lookup table in GAS!!!!

Started by vineet jain October 17, 2005
Hello ppl,
I am using the GNU tool under the Keil environment. I wanted to know if there is anyway I could make a lookup table(in code memory, flash) from a particular location.

for eg..some assemblers support the following:

org 1000h
db 25h,34h,45h

so the data is stored from 1000h onwards. Is there any equivalent facility in GAS(GNU assembler).

Also is there any place where I could find gcc documents specfic to ARM other than the hitex book. It would be really helpful.!!!!

Thanks in advance.

Vineet.
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.



An Engineer's Guide to the LPC2100 Series

use .word

like this,
.word 0x123456678

Cheers,
-Mike.

--- vineet jain <vineetrvce@vine...> wrote:

> Hello ppl,
> I am using the GNU tool under the Keil
> environment. I wanted to know if there is anyway I
> could make a lookup table(in code memory, flash)
> from a particular location.
>
> for eg..some assemblers support the following:
>
> org 1000h
> db 25h,34h,45h
>
> so the data is stored from 1000h onwards. Is there
> any equivalent facility in GAS(GNU assembler).
>
> Also is there any place where I could find gcc
> documents specfic to ARM other than the hitex book.
> It would be really helpful.!!!!
>
> Thanks in advance.
>
> Vineet. >
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million
> songs. Try it free.
>
> [Non-text portions of this message have been
> removed]


__________________________________


You can use an __attribute__((section(".lookup_table"))) and create a
section in your linker script. I used the following linker script for
some calibration data in a LPC2292:

MEMORY
{
CONF (r) : ORIGIN = 0x00038000, LENGTH = 0x00006000
}

SECTIONS
{
.calibration :
{
*(.calibration1)
*(.calibration2)
*(.calibration3)
*(.calibration4)
*(.calibration5)
*(.calibration6)
*(.calibration7)
*(.calibration8)
} >CONF
} Richard Duits.
vineet jain wrote:

> Hello ppl,
> I am using the GNU tool under the Keil environment. I wanted to know
> if there is anyway I could make a lookup table(in code memory, flash)
> from a particular location.
>
> for eg..some assemblers support the following:
>
> org 1000h
> db 25h,34h,45h
>
> so the data is stored from 1000h onwards. Is there any equivalent
> facility in GAS(GNU assembler).
>
> Also is there any place where I could find gcc documents specfic to
> ARM other than the hitex book. It would be really helpful.!!!!
>
> Thanks in advance.
>
> Vineet. >
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free. > >. >
>




Hello Vineet,

documentation can be found under:
http://www.gnu.org/software/binutils/manual/gas-2.9.1/as.html

Why you want to build up such lookup table in assembler?

Sten

vineet jain wrote:
> Hello ppl,
> I am using the GNU tool under the Keil environment. I wanted to know if there is anyway I could make a lookup table(in code memory, flash) from a particular location.
>
> for eg..some assemblers support the following:
>
> org 1000h
> db 25h,34h,45h
>
> so the data is stored from 1000h onwards. Is there any equivalent facility in GAS(GNU assembler).
>
> Also is there any place where I could find gcc documents specfic to ARM other than the hitex book. It would be really helpful.!!!!
>
> Thanks in advance.
>
> Vineet.
>

--
/************************************************
Do you need a tiny and efficient real time
operating system (RTOS) with a preemtive
multitasking for LPC2000 or AT91SAM7?

http://nanortos.net-attack.de/

Or some open-source tools and code for LPC2000?

http://www.net-attack.de/

************************************************/




The 2024 Embedded Online Conference