/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / unsigned char[] limit

Username:     
Password:     
             

Forum

# 1   2010-01-16 23:48:22 unsigned char[] limit

logictechs
Member
Registered: 2009-05-07
Posts: 68

unsigned char[] limit

Hi,

I'm trying to have an unsigned char[] variable greater than 10000 size.  I've changed my ld file to 48K of RAM.  Program locks up during debugging.  I also cannot load the release version.  Throws a bunch of errors including:  undefined reference to `_read .  Says it's in a file called readr.c.  Any help would be great!

Thanks,

Logictechs

Offline

 

# 2   2010-01-18 08:44:25 unsigned char[] limit

matloub
Member
Registered: 2008-02-21
Posts: 98

Re: unsigned char[] limit

Hi

It seems you are reporting two issues in your post, I suggest you separate them in two different posts so it will be easier to treat.
Also for both issues you would to describe how to reproduce them so that if
nobody recognize your issue and give you a solution we can try to reproduce it.

Regards
Matloub

Offline

 

# 3   2010-01-18 14:04:48 unsigned char[] limit

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: unsigned char[] limit

Didn't think I really had to spell out my problem but here goes...

1.  Create a new project.
2.  Insert and variable like this:   unsigned char mycar[30000]
3.  Insert a function in the program that fills that variable such as: 

for(int i = 0; i < 30000; i++;)
{
     mycar[i] = 1;
}

4.  Start the debugger.

Oh, and I modified the ld file to have 50K of RAM.

Any help would be great.

Offline

 

# 4   2010-01-18 16:38:07 unsigned char[] limit

matloub
Member
Registered: 2008-02-21
Posts: 98

Re: unsigned char[] limit

Hi

I followed the steps you described and have met not problem.
I did not modified the .ld, did you try without this modification?

Regards
Matloub

Offline

 

# 5   2010-01-18 18:57:37 unsigned char[] limit

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: unsigned char[] limit

Ok, I stand correct, that did work with an un edit ld file.  My program is in need of an about 620000 byte array told hold a text.  The text will then be transfered to the SD card.  I'm hoping this will rid me of my file writing problem I posted in another post.

When I use an unsigned char[620000] the Primer2 locks with a fault.

Offline

 

Board footer