2024-05-02 06:01 AM
Hello,
I would like to know if is it possible to load an array data (from a text file or something like that) while debugging.
Imagine to have the array
int data[100];
I would like to be able to fill it (while debugging) with values generated by me.
Is there a way to do that?
Thanks in advance
2024-05-02 06:13 AM
Hello,
What do you mean by "from a text file or something like that"?
int data[100] will consumes 400 bytes (4*100). So you need to take care about the RAM size of your device.
2024-05-02 06:45 AM
In the debugger, commands like "p data[0] = 0x1234567" will write to the array. Gdb can work with scripts, so create a script with the values you want and run that script.
2024-05-02 06:58 AM
I mean that I would like to load in my array data created by excel to simulate the acquisition.
Anyway, I have enough RAM to create some constant array already filled with my data and use them
Thanks for your help
2024-05-02 06:59 AM
I'll try them thanks
2024-05-02 07:00 AM - edited 2024-05-02 07:01 AM
With Python and probably Excel, you should be able to generate such a script.