Recently, I have come across me - strange behavior in my firmware.
What I got: Launching a 32-bit AVR32 controller, launching a program from an external SDRAM, because the file size is too large to run directly from a microcontroller flash. Due to the physical memory card, the memory areas are split between:
(start at 0x1000, length 0xF000) (<0x1000 protected by MPU)
EBI SDRAM (start with 0xD0000000, length 0x00400000).
What happens: Unfortunately, I got an exception that does not reproduce. If you look at my specified stack trace, the following irregular event will occur:
Name: bus error data selection - Event Source: Data bus - Saved return address: first incomplete command
In addition, the stack pointer has a valid value, while the address at which the exception occurs (the last entry point for dialing instructions) indicates a nirvana of memory (for example, 0x496e6372, something around 0x5 ..., 0x6 .... ) I think this should be the "First Incomplete Assignment", which is mentioned in the manual. However, the string in my source code is always the same: access to a member function from a data array using a pointer.
if(mSomeArray[i])
{
mSomeArray[i]->someFunction(); <-- Crash
}
The point is this: adding or removing another source code causes the event to disappear and return again.
What I was thinking about: Something is distorting my memory (matching). What errors are possible for this?
- Buffer overflow?
- SDRAM , . ,
- ,
- AVR .
: ? , AVRStudio. ? - ?
:
:
: ( ) , . , , , , . , .
.
;)