Was having an odd error so I checked for updates in CCS and installed them. After re-compiling, I started having issues with lockups when adding items to a vector. I performed this isolation. In the middle of the main function are two commented out lines referencing the reservation of size in the vector. This also causes a hang.
Please let me know if I'm simply going about this entirely incorrectly :)
CCS 5.3.0.00090, ARM Compiler Tools 4.9.7. Entering into debugger mode via USB to a Stellaris Launchpad development board.
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "utils/uartstdio.h"
#include "utils/ustdlib.h"
#include "utils/ustdlib.c"
#include <vector>
int main(void)
{
// UART console
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_GPIOPinConfigure(GPIO_PA0_U0RX);
ROM_GPIOPinConfigure(GPIO_PA1_U0TX);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTStdioInit(0);
// Character buffer
char buffchar[50];
UARTprintf("\n\n");
UARTprintf("Attempting some vector work\n");
UARTprintf("Create a vector\n");
std::vector<int> testVector;
//UARTprintf("Resize vector\n");
//testVector.reserve(10);
UARTprintf("Size of vector: ");
usprintf(buffchar, "%i", testVector.capacity());
UARTprintf(buffchar);
UARTprintf("\n");
UARTprintf("Add elements to vector\n");
testVector.push_back(5);
testVector.push_back(7);
testVector.push_back(23);
UARTprintf("Size of vector: ");
usprintf(buffchar, "%i", testVector.size());
UARTprintf(buffchar);
UARTprintf("\n");
return 0;
}