I have a C8051F340 cygnal processor and a section of code that
does a CRC calculation. The calculation uses a 256 variable 16 bit
integer thats initialized at compile time. Like this:
static const uint16_t fcstab[256] = { initialization values };
The code compiles, but locks up before it gets to main with this
variable and its initialization. If i take out the initialization and
leave the variable simply declared, the code runs fine.
I've tried pdata, and idata keywords, but it seems like the array
is too large. Any ideas? Thanks.
Read-Only
Author erik malund
Posted 29-Jan-2007 18:40 GMT
Toolset None
RE: Problems with CRC table
erik malund
static const uint16_t fcstab[256] = { initialization values
};
Guessing that your uint16_t does not include a memory area qualifier,
you are "initializing" the registers, the stack and each and every
DATA and IDAT variable.
"initializing" the stack in the middle of the code WILL blow
whatever you are doing.
Erik
PS why have you declared the toolset 'none' the F340 (at least
regarding tools) is a '51.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.