- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The device is developed using PSOC5 (PSoc Creator 4.3) on CY8C5888AXI-LP096.
The compiler uses "ARM GCC 5.4-2016-q2-update".
The upper part of the following if statement is normal, but the lower part gives a compile error.
Please tell me the cause.
prj.M0120:Build error: region RAM overflowed with stack
int KaDIM[2][5] ={0};
const KaDIM_ini[2][5] = { {1,2,3,4,5} ,{7,8,9,10,11}};
#if 0
KaDIM[0][0] = KaDIM_ini[0][0];
KaDIM[0][1] = KaDIM_ini[0][1];
KaDIM[0][2] = KaDIM_ini[0][2];
KaDIM[0][3] = KaDIM_ini[0][3];
KaDIM[0][4] = KaDIM_ini[0][4];
KaDIM[1][0] = KaDIM_ini[1][0];
KaDIM[1][1] = KaDIM_ini[1][1];
KaDIM[1][2] = KaDIM_ini[1][2];
KaDIM[1][3] = KaDIM_ini[1][3];
KaDIM[1][4] = KaDIM_ini[1][4];
#else
for(int i=0;i<2;i++)
{
for(int j=0;j<5;j++)
{
KaDIM
= KaDIM_ini ; }
}
#endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your comment, Ryan.
Even if the stack size is increased, the same error will occur.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can the project in post#1 be built successfully?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yuna,
I find one potential issue with your code:
const KaDIM_ini[2][5] = { {1,2,3,4,5} ,{7,8,9,10,11}};
You don't specify the size of the KaDIM_ini variable.
Use instead:
const int KaDIM_ini[2][5] = { {1,2,3,4,5} ,{7,8,9,10,11}};
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
len
Thank you for your advice.
In the actual source code, it is correctly defined as an int type.