Debug
Debug¶
use gdb to print local variable in other files
- value has been optimized out
It means you compiled with e.g.
gcc -O3and the gcc optimiser found that some of your variables were redundant in some way that allowed them to be optimised away. In this particular case you appear to have three variables a, b, c with the same value and presumably they can all be aliassed to a single variable. Compile with optimisation disabled, e.g.gcc -O0, if you want to see such variables (this is generally a good idea for debug builds in any case).
print structure base on structure pointer address
using i2c-tool to configure i2c registers, get following value



Result¶
The reason of registers cannot be set is because I confuse hexadecimal with decimal, i.e. I mis-use hexadecimal as decimal to check binary bitset value.