Hi everyone!
I have narrowed down my problem a little. Maybe now someone can point me into the right direction.
So I am using a dspic33fj128mc802 with mplabX. I made a new project and in that project I just created a task that just adds 1 to a variable.
The problem is that when in debug mode the compiler keeps telling me that
No source code lines were found at current PC 0x29e
No source code lines were found at current PC 0x0
I have used mallocfailedhook function and it doesn’t gets called so its not a stack problem.
In the debugging program memory I can see that at 0x29e the program steps on a reset, and I have no idea why or how I can prevent this. Can please someone suggest a way of getting around this?
~~~~~~~
0270 TBLRDL.B [W1++], [W2++]
DEC W3, W3
BRA Z, 0x28E
TBLRDL.B [W1–], [W2++]
DEC W3, W3
BRA Z, 0x28C
CP0 W4
BRA NZ, 0x286
ADD W1, #0x2, W1
ADDC TBLPAG
BRA __memcpypd3
std
TBLRDH.B [W1], [W2++]
DEC W3, W3
BRA NZ, 0x280
INC W1, W1
ADD W1, #0x1, W1
ADDC TBLPAG
RETURN
GOTO prvIdleTask
NOP
GOTO sendtask
NOP
029c BREAK
029E RESET
~~~~~~~
the send_task function
~~~~~~~~~~
void send_task(void *p)
{
while (1)
{
A=A+1;
vTaskDelay(500);
}
}
~~~~~~~~~~~
The main function:
~~~~~~~~~~
int main (void)
{
pll_setup(); // set internal oscillator to 80MHz-->40MIPS FCY=Fosc/2
xTaskCreate(send
task, “sendtask”, 16, NULL, 1, NULL);
vTaskStartScheduler();
return 0;
}
~~~~~~~~~~
Also is that normal that the heap address is 0 and maximum length is 0 as well?
~~~~~~~~~~~~~
Dynamic Memory Usage
region address maximum length (dec)
—— ——- ———————
heap 0 0 (0)
stack 0x1d06 0x2afa (11002)
~~~~~~~~~~~~~~