Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: C28 code optimization problem

$
0
0

All right, as expected, the TI compiler update to 6.1.5 didn't make any difference.

But I read in SPRU514 in section 3.5.2 "Use the Volatile Keyword for Necessary Memory Accesses" the reason for my behavior. The optimiziation reduced the memory access because the volatile keyword is missing in the macro HWREGB defined in hw_types.h

#define HWREGB(x) \
        __byte((int *)(x),0)

How can I solve this problem in this special case? __byte((volatile int *)(x),0) does not work.
I found a workaround using a local variable. I have to make changes within the TI middleware. Not good!

In general, How can I check that I don't violate against the rules described in 3.5 of SPRU514? Do I have to revise / test my code manually?

Regards,
Stefan


Viewing all articles
Browse latest Browse all 91752

Trending Articles



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