We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
C166+AR166, MCBXC167-Net Board with XC167 Controller. The Compiler list the following error: "FIELD.C(89): error C176: 'test': automatics require more than 16384 bytes" What does that mean? How can i solve this problem? Thanks in advance!!! Here is the corresponding function: void test(void) { unsigned char field[288][502]; unsigned char *p_field; p_field = &field[0][0]; }
The auto variable 'field' requires 144576 bytes! For something that big, it's best to allocate it as a static duration data object or as a dynamically allocated data object using malloc/free. Dynamic allocation, ill-advised as it may be, would behave more like an auto variable as far as the data object's lifetime is concerned.