I'm coding with C++ on an MSC8156EVM. As I'm either reading large input data files (40MB of total data that I need to save to memory) and storing them into memory:
float *tx_x = new float [640];
.
.
or performing a function that I've defined:
mat = new char *[d1];
for (int i = 0; i < d1; i++)
{
mat[i] = new char [d2];
results << mat[i] << "\n"; //To check the progress of this loop (only iterates 24 times)
}
for (int i=0; i < d1; i++) //Program never gets here
for (int j = 0; j < d2; j++)
mat[i][j] = 0.0;
Everything builds, compiles, and begins running fine but quickly terminates with a reference to "rte" in the startup__startup_msc8156_.asm file.
I've increased my heap size to "0xc000" which is the max I can make it, but am still hitting this wall. Is my problem a memory problem? Do I need to modify the LCF?
Any suggestions are very much appreciated Attached is one of the codes I've written that generates this error.
Solved! Go to Solution.
Thanks for the help CrasyCat! You're comments clued me into the fact that DDR wasn't being accessed at all because I kept getting data read/write misses at the memory locations I was trying to access. I tried to use pointers to store my arrays directly into DDR but it wasn't doing it until I disabled memory protection in the lcf, now everything's working great.
Hello
Is this rte located just after the label "___EmptyIntHandler"?
In this case an exception or interrupt has been generated for some reason.
When working with StarCore this might be related to an MMU Exception.
Can you please check the following after you are stopped on the rte in the debugger:
- Select Windows -> Show View -> Other.
- In the Show View dialog select Debug -> MMU Configurator. A new view is opened in the debugger.
This view is called MMU Configurator.
- Make sure you are in et general tab inside of the MMU Configurator view.
- Check the content of the Violation Monitor edit box. If you have reached an MMU exception, you will see
the reason for the exception as well as the address where it arises.
If the Violation Monitor edit box is empty, you have another exception arising.
You need to create your own interrupt vector section and associate a separate function to each interrupt source.
We provide a generic implementation of the interrupt vector section in the file
{Install}\SC\StarCore_Support\compiler\src\rtlib\expanded\intvec__msc8156_.asm.
I hope this helps.
CrasyCat
Thanks for the help CrasyCat! You're comments clued me into the fact that DDR wasn't being accessed at all because I kept getting data read/write misses at the memory locations I was trying to access. I tried to use pointers to store my arrays directly into DDR but it wasn't doing it until I disabled memory protection in the lcf, now everything's working great.
For a bit more info. I'm running CodeWarrior for StarCore Version 10.2.10 on Windows 7.