Hi!
I'd like to report a serious bug in the GCC stdlib implementation.
atoi() calls a function __mulsi2(), which seems to mess around with the PMM registers (for a reason unclear for me), even with reserved addresses above PM5CTL0 (0x0138 and 0x0134) The PMM being locked previously by the password, (I use driverlib for reising the vcore voltage), this operation causes the processor to reboot. A workaround would be of course to temporarily unlock the PMM, what else can I do...
__mulsi2():
015990: 1202 PUSH SR
015992: C232 DINT
015994: 4303 NOP
015996: 4C82 0130 MOV.W R12,&PMM__Power_Management_System_PM5CTL0
01599a: 4E82 0138 MOV.W R14,&0x0138
01599e: 4C82 0134 MOV.W R12,&0x0134
0159a2: 421C 013A MOV.W &0x013a,R12
0159a6: 4292 013C 013A MOV.W &0x013c,&0x013a
0159ac: 4F82 0138 MOV.W R15,&0x0138
0159b0: 4D82 0134 MOV.W R13,&0x0134
0159b4: 4E82 0138 MOV.W R14,&0x0138
0159b8: 421D 013A MOV.W &0x013a,R13
0159bc: 4132 POP.W SR
0159be: 0110 RETA
I am using GCC version 4.9.1., and large memory model.