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.

Increased Heap Size Prevents Software Execution

Hello,

I am trying to run a handful of tasks that have large stack sizes within a program on a F28377D. Ive gathered from reading other posts on the forums that when I dynamically allocate tasks using Task_create that it will place the task stacks onto the BIOS designated heap. My initial thought was to increase the heap size. I can set my BIOS.heapSize = 0x71FF(29183). At that value, I can run the software and can start a majority of the tasks but there are some tasks that have not started yet that would require more size than that on the heap than that.

The map file says that the area I am allocating the .ebss to has plenty of room for growth:

LS04SARAM            origin:00008000   len:0000ffff  used:00009bf4  unused:0000640b

The related section of the command file:

PAGE 1 : /* Data Memory */

BOOT_RSVD : origin = 0x000002, length = 0x000120 /* Part of M0, BOOT rom
will use this for
stack */

M01SARAM : origin = 0x000122, length = 0x0006DE /* on-chip RAM */

LS04SARAM : origin = 0x008000, length = 0x00FFFF /* on-chip RAM */
LS5SARAM : origin = 0x017FFF, length = 0x000001 /* on-chip RAM */

SECTIONS
{
/* Initialized Global and Static Variables */
.cinit : > FLASHA | FLASHB | FLASHC | FLASHD | FLASHE |
FLASHF | FLASHG | FLASHH | FLASHI PAGE = 0
START(_cinitStart),
SIZE(_cinitSize)

/* Linker File Copy Tables */
.binit : > FLASHA | FLASHB | FLASHC | FLASHD | FLASHE |
FLASHF | FLASHG | FLASHH | FLASHI PAGE = 0
START(_binitStart),
SIZE(_binitSize)

/* C++ Constructors (Unused) */
.pinit : > FLASHA | FLASHB | FLASHC | FLASHD | FLASHE |
FLASHF | FLASHG | FLASHH | FLASHI PAGE = 0
START(_pinitStart),
SIZE(_pinitSize)

/* Executable Code and constants */
.text : > FLASHA | FLASHB | FLASHC | FLASHD | FLASHE |
FLASHF | FLASHG | FLASHH | FLASHI PAGE = 0
LOAD_START(_textLoadStart),
RUN_START(_textRunStart),
SIZE(_textSize)

/* Label for the Start Vector Location */
codestart : > BEGIN PAGE = 0
START(_codestartStart),
SIZE(_codestartSize)

/* System Stack Space */
.stack : > M01SARAM | LS04SARAM PAGE = 1
START(_stackStart),
SIZE(_stackSize)

/* Global & Static Variables and System Heap */
.ebss : > M01SARAM | LS04SARAM PAGE = 1
START(_ebssStart),
SIZE(_ebssSize)

So I tried increasing heap further, to 0x81FF, and the map file still says I have a great deal of unused space. But when I the load the software and press the run button, I see no execution. If I look at disassembly code, it no longer points to start of my main() function but rather to an ESTOP command. The ROV also produces an error "Received exception from ROV server: Target memory read failed at address 0x4, length: 0x12". Does anyone have a solution on how to bump up my memory size successfully so I can run multiple large tasks? Could the increase be bashing the memory that contains code start location? I dont see why the increase prevents running yet produces no errors besides in the ROV.

Thanks