This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Export array variable data

Other Parts Discussed in Thread: CC2531

Hi,

I'm working with IAR 8051 IDE and CC2531 platform.

Could we export an array variable to a text file or another format during debugging?

Best regards,

Manuel

  • As I know, there is no this function to export array to a text file in IAR. However, you can use address of array pointer to check content in memory.
  • Yes, I know that I can check content in memory but I need to export this data in a file text... I think this is not a crazy idea. this is not a efficent solution (big array with ADC data) for my issue.

    However, thank you YK.
  • You can #include <stdio.h> and use printf() to output array data in your code. For this to work with the debugger console you will have to go to Project options -> Linker -> Output (tab) and in the "Format" section where you have selected "Debug information for C-SPY" you need to have "With I/O emulation modules" checked (this requires "with runtime control modules"). This will make the linker use its special low-level I/O routines (putchar() , getchar() ) which will route it to/from the debug terminal I/O console.

    When entering debug mode you get the debug console window displayed by selecting View -> Terminal I/O from the top menu. You will probably notice that if you try to printf too much text it will make the output lag a bit. But it can surely be a handy tool for debugging your application anyway.
  • Thank you YK.

    That is what I want . Perfect solution for my issue.

    Best regards,

    Manuel
  • It is good to know this works for your case.