Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 224308

Forum Post: TMS320F28377D: global variables in structure are changed randomly

$
0
0
Part Number: TMS320F28377D Tool/software: Hi Expert Customer reports the issue with CCS6.2 and v15.12.3.LTS compiler. once the --opt_level set to 0/1/2 the issue can be reproduced, set to off the issue cannot be reproduced below are the actions customer take to reproduce the issue: 1. claim a structure like this: { Var1 Var2 .... } Structure 1 2. claim a structure nest Structure1 like this: { Var1 Var2 .... Structure 1 instance & function handler &Structure 2 address } Structure_2 3. Claim the array Structure_2[N], and write a for loop to select the largest Var1 in Structure_2[N], for example: Temp = 0 for (i = 0; i<N; i++) { if Temp < Structure_2[N].Var1 { Temp = Structure_2[N].Var1 } } 4. set --opt_level to any 0/1/2 level, build and run the project, the variables value in Structure_2 will be changed randomly. 5. if set --opt_level to off, or block the for loop or write the compare statement N times instead of for loop, the issue won't happen. Could you please share some advices to debug this issue? Thanks Joe

Viewing all articles
Browse latest Browse all 224308

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>