Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch


Discussion Groups

Discussion Groups | Code-Composer | Bug in Codecompose Studio 2.0 for C6201 - local arrays

Technical discussions about Code Composer Studio.

  

Post a new Thread

Bug in Codecompose Studio 2.0 for C6201 - local arrays - Rene Tschaggelar - Feb 25 13:16:00 2002



I found local arrays are forbidden. There is no feedback,
the code just does not work at all.

main(){

int mydata[100]; // doesn't work
int far mydata[100]; // doesn't work
int near mydata[100]; // doesn't work
far int mydata[100]; // doesn't work

static int mydata[100]; // works

is there a workaround ? Rene
--
Tel. 01 / 633 47 39
HCI F236
ETH Hoenggerberg





(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

RE: Bug in Codecompose Studio 2.0 for C6201 - local arrays - Author Unknown - Feb 25 14:23:00 2002


Hi Rene,

If you say doesn't work, you mean the code fails, or that the compiler/linker
complains.
I assume it the code that fails, did you check the allocated stack size?
Personally I wouldn't use local arrays, since they are allocated on the stack.
This means that there is no feedback if there is
enough free stack space for the arrays. Only a not working application if there
isn't enough space.
static (or global static) arrays are located in normal memory, so the linker
would complain of insufficient memory.
Another option might be to dynamically allocated the arrays. But that depends on
your application.

Cheers,

Paul Kamphuis
software architect
Relitech BV
The Netherlands
-----Original Message-----
From: "Rene Tschaggelar" <>
Sent: Monday, February 25, 2002 2:16 PM
To: "" <>
Subject: [code-comp] Bug in Codecompose Studio 2.0 for C6201 - local
arrays

I found local arrays are forbidden. There is no feedback,
the code just does not work at all.

main(){

int mydata[100]; // doesn't work
int far mydata[100]; // doesn't work
int near mydata[100]; // doesn't work
far int mydata[100]; // doesn't work

static int mydata[100]; // works

is there a workaround ? Rene
--
Tel. 01 / 633 47 39
HCI F236
ETH Hoenggerberg
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Secure all your Web servers now - with a proven 5-part
strategy. The FREE Server Security Guide shows you how.
http://us.click.yahoo.com/uCuuSA/VdiDAA/yigFAA/26EolB/TM
---------------------------------------------------------------------~->

_____________________________________





(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )