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
- posted
15 years ago
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
In message , satish writes
No such thing as "embedded C" just C. You declare an array as you would in C
That is your main problem.
What is the target MCU.
-- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
Op Thu, 21 Aug 2008 09:19:22 +0200 schreef satish :
It's no different than in regular C.
I know, but it depends on the circumstance.
-- 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
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
char anArray[42]; // this array is in the RAM The specific CPU and memory model determines where.
Sandwich posting?
Best regards, Spehro Pefhany
-- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com
I just like to annoy everyone equally. Democratic.
I just like to annoy everyone equally. Democratic.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.