optimisation broke programming. thanks to jim for raising the fault
--- a/src/dotconf.c Tue Jan 29 12:15:09 2019 +0000
+++ b/src/dotconf.c Tue Feb 26 12:41:11 2019 +0000
@@ -85,7 +85,7 @@
snprintf(p.dotfile, STRLEN, "%s", filename);
if (getdotpath() == 0)
return;
- printf("%s: warning: PICKLE environment variable invalid\n", __func__);
+ printf("%s: warning: invalid PICKLE environment variable\n", __func__);
}
char dir[STRLEN];
--- a/src/pic16n.c Tue Jan 29 12:15:09 2019 +0000
+++ b/src/pic16n.c Tue Feb 26 12:41:11 2019 +0000
@@ -725,16 +725,16 @@
{
uint16_t word;
- pic16n_load_pc_address(address);
-
if (panel_size == 2) { /* DS40001874F */
word = panel[0] | panel[1] << 8;
+ pic16n_load_pc_address(address);
pic16n_program_data_command(word, 0, PIC16N_TPINT_Q);
} else {
for (uint32_t i = 0; i < panel_size; i += 2) {
word = panel[i] | panel[i + 1] << 8;
pic16n_load_data_for_nvm(word, 1);
}
+ pic16n_load_pc_address(address);
pic16n_begin_internally_timed_programming(PIC16N_TPINT_CODE);
}
}