psoc 4 compiler problem error: variably modified 'xxx' at file scope

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
lili_285866
Level 1
Level 1
Distributor - Zenitron(GC)
5 replies posted 5 questions asked 5 sign-ins

Hi All,

I have a problem with the attachment project. Alaways show below error message ,

main.c:328:11: error: variably modified 'bms_ic' at file scope

cell_asic bms_ic[TOTAL_IC];

I have been unable to find a problem, please experts to help me find the problem.

Thanks,

Lin

0 Likes
1 Solution
SrikanthD_56
Employee
Employee
25 sign-ins First question asked First comment on blog

Hi Lin,

Change const uint8_t TOTAL_IC = 1; to #define TOTAL_IC 1 in your code to get rid of that error.

Cheers!

View solution in original post

1 Reply
SrikanthD_56
Employee
Employee
25 sign-ins First question asked First comment on blog

Hi Lin,

Change const uint8_t TOTAL_IC = 1; to #define TOTAL_IC 1 in your code to get rid of that error.

Cheers!