Tool/software: TI C/C++ Compiler
I am seeing a odd issue when using memcpy routine, from <string.h> standard c library. I am trying to copy data from one array to another, whose types are uint32_t . I am seeing that if i use memcpy to do this, as below it only copies half the array.
static uint32_t vehicle_key[8] = {0x55555555U, 0x55555555U, 0x55555555U, 0x55555555U, 0x55555555U, 0x55555555U, 0x55555555U, 0x55555555U};
memcpy(vehicle_key_dest, vehicle_key, 8);
But, if i do it by using a for loop (as shown below), then it works as expected.
for ( i = 0; i < 8; i++ )
{
vehicle_key_dest[i] = vehicle_key[i];
}
Does anyone know why i would be seeing different behavior from these functions?