Hello,
I have a problem with iomacros.h under linux with the latest Versions of
mspgcc.
All ioregisters seem to be 16 Bit instead of 8 Bit, so all but one adresses
are wrong.
The following lines in c:
#include <msp430x16x.h>
#include <iomacros.h>
int main (void)
{
char i;
i = port1.in.pin1; // 0x0020
port1.out.pin1 = 1; // 0x0021
port1.dir.pin1 = 1; // 0x0022
i = port1.ifg.pin1; // 0x0023
port1.ie.pin1 = 1; // 0x0025
port1.ies.pin1 = 1; // 0x0024
port1.sel.pin1 = 1; // 0x0026
}
were compiled to:
--- snip ---
int main (void)
{
4036: 31 40 00 39 mov #14592, r1 ;#0x3900
char i;
i = port1.in.pin1;
403a: e2 b3 20 00 bit.b #2, &0x0020 ;r3 As==10
403e: 4f 43 clr.b r15
4040: 4f 63 adc.b r15
port1.out.pin1 = 1;
4042: e2 d3 22 00 bis.b #2, &0x0022 ;r3 As==10
port1.dir.pin1 = 1;
4046: e2 d3 24 00 bis.b #2, &0x0024 ;r3 As==10
i = port1.ifg.pin1;
404a: e2 b3 26 00 bit.b #2, &0x0026 ;r3 As==10
404e: 4f 43 clr.b r15
4050: 4f 63 adc.b r15
port1.ie.pin1 = 1;
4052: e2 d3 2a 00 bis.b #2, &0x002a ;r3 As==10
port1.ies.pin1 = 1;
4056: e2 d3 28 00 bis.b #2, &0x0028 ;r3 As==10
port1.sel.pin1 = 1;
405a: e2 d3 2c 00 bis.b #2, &0x002c ;r3 As==10
}
--- snip ---
What is going wrong?
Thank you in advance,
Rainer Haape
[email protected]