Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | declaring an array in embedded C

There are 7 messages in this thread.

You are currently looking at messages 0 to 7.

declaring an array in embedded C - satish - 03:19 21-08-08

hi iam new to this embedded field iam had a problem in declaring an
array in embedded C..iam using SDCC compiler for compilation..if u
know..please pass that information.
 
thank you



Re: declaring an array in embedded C - Chris H - 03:32 21-08-08

In message 
<1...@a2g2000prm.googlegroups.com>, 
satish <s...@gmail.com> writes
>hi iam new to this embedded field iam had a problem in declaring an
>array in embedded C.

No such thing as "embedded C" just C.  You declare an array as you would 
in C

>.iam using SDCC compiler for compilation.

That is your main problem.

What is the target MCU.

-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/




Re: declaring an array in embedded C - Boudewijn Dijkstra - 03:43 21-08-08

Op Thu, 21 Aug 2008 09:19:22 +0200 schreef satish  
<s...@gmail.com>:
> hi iam new to this embedded field iam had a problem in declaring an
> array in embedded C..

It's no different than in regular C.

> iam using SDCC compiler for compilation..if u
> know..please pass that information.

I know, but it depends on the circumstance.

http://c-faq.com/aryptr/index.html


-- 
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/

Re: declaring an array in embedded C - Bill Davy - 07:06 21-08-08

One thing that is a bit different in embedded is that you can (usually) 
infleunce where your data goes.  If it is constant data then placing it in 
"code" may help (and the 8051 is quite good at indexing small arrays in the 
code space).

Rgds,
   Bill

"Boudewijn Dijkstra" <b...@indes.com> wrote in message 
news:o...@azrael.lan...
> Op Thu, 21 Aug 2008 09:19:22 +0200 schreef satish 
> <s...@gmail.com>:
>> hi iam new to this embedded field iam had a problem in declaring an
>> array in embedded C..
>
> It's no different than in regular C.
>
>> iam using SDCC compiler for compilation..if u
>> know..please pass that information.
>
> I know, but it depends on the circumstance.
>
> http://c-faq.com/aryptr/index.html
>
>
> -- 
> Gemaakt met Opera's revolutionaire e-mailprogramma: 
> http://www.opera.com/mail/

One thing that is a bit different in embedded is that you can (usually) 
infleunce where your data goes.  If it is constant data then placing it in 
"code" may help (and the 8051 is quite good at indexing small arrays in the 
code space).

Rgds,
   Bill 



Re: declaring an array in embedded C - Neil - 03:00 22-08-08

satish wrote:
> hi iam new to this embedded field iam had a problem in declaring an
> array in embedded C..iam using SDCC compiler for compilation..if u
> know..please pass that information.
>  
> thank you

char anArray[42];    // this array is in the RAM The specific CPU and 
memory model determines where.




Re: declaring an array in embedded C - Spehro Pefhany - 09:09 22-08-08

On Thu, 21 Aug 2008 12:06:15 +0100, "Bill Davy" <B...@XchelSys.co.uk>
wrote:

Sandwich posting? 


>One thing that is a bit different in embedded is that you can (usually) 
>infleunce where your data goes.  If it is constant data then placing it in 
>"code" may help (and the 8051 is quite good at indexing small arrays in the 
>code space).
>
>Rgds,
>   Bill
>
>"Boudewijn Dijkstra" <b...@indes.com> wrote in message 
>news:o...@azrael.lan...
>> Op Thu, 21 Aug 2008 09:19:22 +0200 schreef satish 
>> <s...@gmail.com>:
>>> hi iam new to this embedded field iam had a problem in declaring an
>>> array in embedded C..
>>
>> It's no different than in regular C.
>>
>>> iam using SDCC compiler for compilation..if u
>>> know..please pass that information.
>>
>> I know, but it depends on the circumstance.
>>
>> http://c-faq.com/aryptr/index.html
>>
>>
>> -- 
>> Gemaakt met Opera's revolutionaire e-mailprogramma: 
>> http://www.opera.com/mail/
>
>One thing that is a bit different in embedded is that you can (usually) 
>infleunce where your data goes.  If it is constant data then placing it in 
>"code" may help (and the 8051 is quite good at indexing small arrays in the 
>code space).
>
>Rgds,
>   Bill 
>
Best regards, 
Spehro Pefhany
-- 
"it's the network..."                          "The Journey is the reward"
s...@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

Re: declaring an array in embedded C - Bill Davy - 09:59 22-08-08

I just like to annoy everyone equally.  Democratic.

"Spehro Pefhany" <s...@interlogDOTyou.knowwhat> wrote in message 
news:0...@4ax.com...
> On Thu, 21 Aug 2008 12:06:15 +0100, "Bill Davy" <B...@XchelSys.co.uk>
> wrote:
>
> Sandwich posting?
>
>
>>One thing that is a bit different in embedded is that you can (usually)
>>infleunce where your data goes.  If it is constant data then placing it in
>>"code" may help (and the 8051 is quite good at indexing small arrays in 
>>the
>>code space).
>>
>>Rgds,
>>   Bill
>>
>>"Boudewijn Dijkstra" <b...@indes.com> wrote in message
>>news:o...@azrael.lan...
>>> Op Thu, 21 Aug 2008 09:19:22 +0200 schreef satish
>>> <s...@gmail.com>:
>>>> hi iam new to this embedded field iam had a problem in declaring an
>>>> array in embedded C..
>>>
>>> It's no different than in regular C.
>>>
>>>> iam using SDCC compiler for compilation..if u
>>>> know..please pass that information.
>>>
>>> I know, but it depends on the circumstance.
>>>
>>> http://c-faq.com/aryptr/index.html
>>>
>>>
>>> -- 
>>> Gemaakt met Opera's revolutionaire e-mailprogramma:
>>> http://www.opera.com/mail/
>>
>>One thing that is a bit different in embedded is that you can (usually)
>>infleunce where your data goes.  If it is constant data then placing it in
>>"code" may help (and the 8051 is quite good at indexing small arrays in 
>>the
>>code space).
>>
>>Rgds,
>>   Bill
>>
> Best regards,
> Spehro Pefhany
> -- 
> "it's the network..."                          "The Journey is the reward"
> s...@interlog.com             Info for manufacturers: 
> http://www.trexon.com
> Embedded software/hardware/analog  Info for designers: 
> http://www.speff.com


I just like to annoy everyone equally.  Democratic.