I've got a script that is working but only in debug mode. When I use Keil in debug mode, it works fine, but when I use SmartSnippets to burn the firmware to the EEPROM, it loads and then runs normally until a certain point in the script, it gets stuck. I think the HEX file that it loads in debug mode must be different from the HEX that is loaded to the EEPROM, but I don't know for sure. It may be optimizing out some of my code, for example, I have an arbitrary delay (just for testing). This is the while loop it gets stuck at the 3rd line:
while(1)
{
float *data;
data = acc_read_axes();
printf_string ("x axis: "); // Gets stuck right after this (but not in debug mode)
printf_float(*data, fstr, 3);
printf_string (" y axis: ");
printf_float(*(data+1), fstr, 3);
printf_string (" z axis: ");
printf_float(*(data+2), fstr, 3);
printf_string ("\n\r");
for(int i = 0; i < 500000; i++)
{
// Arbitrary delay
}
}
Hi,
Have you tried to load the hex file into sysram via SmartSnippets' bootloader, "booter"?