I have been working on a cube timer project for a while and I can't get my variable archived.
I created a uint8_t algorithm [100][40] to store the scrambles, when I try to archive it, the calculator just crashed and cleared the ram.
Code:
But, when I changed up the size to [100][39], the code works, no crash. Also, size [100][40] works if I don't archive the variable.
Code:
I don't know if [100][40] is too big for ti_setarchivestatus() or if I have done anything wrong, I am pretty new to C. And, it seems like uint8_t [100][39] is the biggest size ti_setarchivestatus() can handle, if I save one more variable, it will also crash. In addition, if I try to save them in seperate files, it still would not work.
Any help is appreciated.
I created a uint8_t algorithm [100][40] to store the scrambles, when I try to archive it, the calculator just crashed and cleared the ram.
Code:
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fileioc.h>
void main(void) {
uint8_t algorithm[100][40]; //this causes ram clear
ti_var_t historyfile;
ti_CloseAll();
historyfile = ti_Open("HIST","w");
ti_Write(&algorithm, sizeof(uint8_t), sizeof(algorithm)/sizeof(uint8_t), historyfile);
ti_SetArchiveStatus(true, historyfile); //this causes ram clear
}
But, when I changed up the size to [100][39], the code works, no crash. Also, size [100][40] works if I don't archive the variable.
Code:
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fileioc.h>
void main(void) {
uint8_t algorithm[100][39]; //this works
ti_var_t historyfile;
ti_CloseAll();
historyfile = ti_Open("HIST","w");
ti_Write(&algorithm, sizeof(uint8_t), sizeof(algorithm)/sizeof(uint8_t), historyfile);
ti_SetArchiveStatus(true, historyfile); //this works
}
I don't know if [100][40] is too big for ti_setarchivestatus() or if I have done anything wrong, I am pretty new to C. And, it seems like uint8_t [100][39] is the biggest size ti_setarchivestatus() can handle, if I save one more variable, it will also crash. In addition, if I try to save them in seperate files, it still would not work.
Any help is appreciated.