There is a red message when the code run into the instruction of "printf();"
The message is :
The CIO command cmd:(255) in the CIO buffer at address (0x821b00) was not recognized. Please check the device and program memory maps.
So I increase the heap size first, but the phenomenon is still there. Is the heap size not big enough?
Then I put the funtcion contain "printf()" in a new section "MyTestMem". And CIO is a seperate secion in .cmd file. Below is my .cmd file.
-c
-heap 0x5000
-stack 0x3000
MEMORY
{
L1D: o = 00f00000h l = 00008000h
L1P: o = 00e00000h l = 00008000h
L2: o = 00800000h l = 00200000h
}
SECTIONS
{
.csl_vect > L2
.text > L2
.stack > L2
.bss > L2
.cinit > L2
.cio > L2
.const > L2
.data > L2
.switch > L2
.sysmem > L2
.far > L2
.testMem > L2
.MyDataMem > L2
.MyTestMem > L2
}
Thanks.