Debug vs Boot from EEPROM running differently

2 posts / 0 new
Last post
JBaczuk
Offline
Last seen:1 year 5 months ago
加入:2014-12-31 23:41
Debug vs Boot from EEPROM running differently

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
}
}

Keywords:
MHv_Dialog
Offline
Last seen:1 week 4 days ago
工作人员
加入:2013-12-06 15:10
Hi,

Hi,

Have you tried to load the hex file into sysram via SmartSnippets' bootloader, "booter"?