Hi,
I'm trying to simulate C and Assembly code on DS-5 Simulator with Cortex-A8 as a bare metal application on Linux. Im having issue with the memcpy.
Im trying to use Memcpy( a, b, size). Here source and destinations, a and b are pointers to the same structure of size 31 bytes. Address of a is 0x0014 b1a4 and b is 0x0014 b183. Size is 31 bytes. So is the problem due to non-alignment of memory or anything else. Can anyone help me out to resolve this issue?
Thanks in advance .
Pavitra
Peter,
Yes, the address returned by malloc is perfectly valid and it is working fine when I initially added small piece of code, but later when 've added few more files and also I've modified the scatter file as below and configured the heap here.
APP_DATA +0
{
* (+RW, +ZI) ; Application RW (.data) and ZI (.bss) data
}
ARM_LIB_HEAP 0x00040000 EMPTY 0x05FC0000 ; Application heap
{ }
ARM_LIB_STACK 0x07000000 EMPTY -0x01000000 ; Application (SVC mode) stack
IRQ_STACK 0x08000000 EMPTY -0x01000000 ; IRQ mode stack
TTB 0x09000000 EMPTY 0x40000 ; Level-1 Translation Table for MMU