
In message 454BDA40.5090806@freescale.com you wrote:
I don't see any problem that needed fixing.
The problem is that without specifying the section attribute, when I ran my code, i2c_bus_num was equal to 0xFFFFFFFF.
Yes, this to be expected. And explained in the README:
... and BSS is not initialized as zero.
What exactly is the "problem" you are experiencing? Did you read the documentation, especially section "Initial Stack, Global Data" in the README? Please let me know if there is anything in this text which is not clear enough.
That section doesn't address issues with global (static or otherwise) variables that need to be read prior to relocation.
Yes, it does:
This means that we don't have writable Data or BSS segments, and BSS is not initialized as zero.
Best regards,
Wolfgang Denk