First all, a correction is necessary: P2REN = 0x00; because you are using the port 2.
Enabling pull-up resistors on the input ports of MSP430F2274 can be accomplished by adding lines similar to each button in the bsp_button_defs.h library, for example:
/* enable a pull-up resistor for button #1 */
#define __bsp_BUTTON_EXTENDED_CONFIG__() st( P1OUT |= BV( __bsp_BUTTON1_BIT__ ); \
P1REN |= BV( __bsp_BUTTON1_BIT__ ); \
P2OUT |= BV( __bsp_BUTTON2_BIT__ ); \
P2REN |= BV( __bsp_BUTTON2_BIT__ ); )
Etc...
Perhaps, also works with a declaration for each button separately:
/* enable a pull-up resistor for button #2 */
#define __bsp_BUTTON_EXTENDED_CONFIG__() st( P1OUT |= BV( __bsp_BUTTON2_BIT__ ); \
P1REN |= BV( __bsp_BUTTON1_BIT__ ); )
Etc...
It should be remembered, that a floating input can crash or exhibit unexpected behavior microcontroller in the program.
This was a successful test, however, does not mean it is the correct and necessary.
Other libraries are involved and the inheritance hierarchy and the C++ language are important in this process.
The manipulation of pre-existing libraries seems simpler, and faster, than the creation of new algorithms and codes for certain features already established.
It would be interesting if the Software Compilers presented an option to create a timeline of commands using sample applications.
Does the IAR has this functionality?
The compilation errors only indicate an inconsistency between commands in libraries, without even showing the options available, automatically, as happened in most of the old DOS commands, poor and limited, but extremely efficient and fast.
You can not make those features in current compilers?
Thank you!
Luiz.