Hi,
I'm using CCS5 with a MSP430F247. I need outputs to help with debugging and monitoring.
I set up the 'Variant' field. Enabled CI\O support and increased stack and heap sizes.
My code is as follows: (by the way, how come there are no <code> tags?)
#include <msp430.h>
#include <stdio.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
putc ('a', stderr);
return 0;
}
This is just a test project so I could rely on the console in the future.
When I run the run this, the character 'a' gets printed to the CIO console, but I get "MSP430: Trouble Writing Memory Block at 0x1240 on Page 0 of Length 0xa: Could not write device memory" on the project console and the debugger gets stuck at function C$$IO$$(). The memory address 0x1240 points to the beginning of _CIOBUF_.
If I use fprintf(stderr, "string"), it will also print and give the same error and get stuck.
if I use the regular printf() or fprintf() with stdout, nothing happens (even though in the wiki pages it says it should print to the console).
I would highly appreciate ideas as to how to print safely to the console.
Thanks.