Hello!
I'm on a Win7-64-bit system with CCS 6.1.3.00034, building an RTOS application, and I'm running the application on an AM3358 custom platform (similar to the evmAM3358 General Purpose Evaluation Module). I'm using a custom "platform" which has memory distributions similar to the evmAM3358 except that it only has 256 MB of RAM. I have included the platform files in the attached ZIP file under the "my" folder.
However, there is something I am running into as I build pieces of this and test it: I'm getting a series of RTOS errors accessing memory before the program starts. I'm sure it is something about how I have memory configured, but I need to learn what it is so I don't run into this again.
This wasn't always happening, but rather just started recently (perhaps around the time I started including a large image in a 'const uint32_t' array -- however, in the attached example, that array is very small, and it is still happening, so not sure if this is related). To try to isolate where the problem is coming from, I removed chunks of the program, and got it to a point where it is runs and is not generating the errors detailed below. When it is running normally, my XDS560v2 STM in LAN configuration loads the program, and in somewhere around 100 ms later (very quick), it reaches the breakpoint at the beginning of the main() function. In RTOS Object View (ROV), under application.out > BIOS > Scan for errors... tab, no errors are present.
As I add chunks back into the program to try to replicate the problem to see what part is causing it (an example is attached, with a portion of unnecessary intellectual property removed so I can share it), after the XDS50v2 STM (LAN) loads the program into DDR, there is a long lag (~ 8 seconds), and THEN it reaches the breakpoint at main(). The program runs fine, blinks an LED and displays an image under an RTOS task (I omitted the image in the attached so I could upload the project). If I let the program run, there does not seem to be any errors. An LED blinks, and the desired image is displayed on the 800x480 LCD Panel (in the attached example, the image on the LCD panel is black).
But -- during the 8-ish second lag before it hits the breakpoint at main(), I believe it is running into problems. Now when I go to the RTOS Object View (ROV), under application.out > BIOS > Scan for errors... tab, there are 9 exceptions (copied and pasted here):
=-=-= Error List =-=-=
Columns: mod, tab, inst, field, message
ti.sysbios.family.arm.exc.Exception, Module, N/A, N/A, Caught exception in view init code: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x80026c88, length: 2This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.sysbios.heaps.HeapMem,Detailed,(0x80024c78),totalFreeSize,Corrupted free list header next ptr (0x814b0c30) at freeList entry 0x80024c84
,ti.sysbios.heaps.HeapMem,FreeList,HeapMem@80024c78-freeList,Address,Bad next pointer = 0x814b0c30
,ti.sysbios.knl.Task,Detailed,ghUiTaskHandle,stackPeak,Error: Problem fetching Task stack: JavaException: java.lang.Exception: Target memory read failed at address: 0x80025c88, length: 4096This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.sysbios.knl.Task,Detailed,ti.sysbios.knl.Task.IdleTask,stackPeak,Error: Problem fetching Task stack: JavaException: java.lang.Exception: Target memory read failed at address: 0x80025488, length: 2048This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.uia.loggers.LoggerStopMode,Records,ghLoggerStopMode0,sequence,Caught exception while reading buffer: JavaException: java.lang.Exception: Target memory read failed at address: 0x814abd80, length: 16This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.uia.loggers.LoggerStopMode,Records,Load Logger,sequence,Caught exception while reading buffer: JavaException: java.lang.Exception: Target memory read failed at address: 0x814ad680, length: 16This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.uia.loggers.LoggerStopMode,Records,Main Logger,sequence,Caught exception while reading buffer: JavaException: java.lang.Exception: Target memory read failed at address: 0x814a9d80, length: 16This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
,ti.uia.loggers.LoggerStopMode,Records,SYSBIOS System Logger,sequence,Caught exception while reading buffer: JavaException: java.lang.Exception: Target memory read failed at address: 0x814ae780, length: 16This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
=-=-= End of Error List =-=-=
After it has reached the breakpoint at main(), if I go to ROV > app.out > Viewable Modules > SysMin > OutputBuffer tab, the output from System_printf() calls is missing, and instead this message is displayed: "Target memory read failed at address: 0x814a9580, length: 2048. This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
The project demonstrating these problems (minus the sensitive image) is attached. It compiles and runs up to the breakpoint at main() which is all that is needed to see these errors.
Q1:
What am I not doing correctly about my memory setup?
Q2:
Where should I be looking in documentation to learn about this?
Kind regards,
Vic