Hi Brian,
I have not tried this but feel free to give it a go.
In the PSP mqx_cnfg.h header is the following comments and "#define".
/*
** When this option is defined as 1, private MQX implementation of memcpy is used instead
** the one from standard library.
** MGCT: <option type="bool"/>
*/
#ifndef MQXCFG_MEM_COPY
#define MQXCFG_MEM_COPY 0
#endif
So you could and add "#define MQXCFG_MEM_COPY 1" in your user_config.h header.
The mem_cpy() routine is also in PSP and in file mem_copy.c with following comments and initial function call:
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name : _mem_copy
* Returned Value : none
* Comments :
* This function copies the specified number of bytes from the
* source address to the destination address. No attempt is made
* to handle overlapping copies to prevent loss of data.
* The copying is optimized to avoid alignment problems, and attempts
* to copy 32bit numbers optimally
*
*END*----------------------------------------------------------------------*/
#if MQXCFG_MEM_COPY
void _mem_copy
(
/* [IN] address to copy data from */
pointer from_ptr,
/* [IN] address to copy data to */
pointer to_ptr,
/* [IN] number of bytes to copy */
register _mem_size number_of_bytes
)
{ /* Body */
#if MQX_USE_SMALL_MEM_COPY
register uint_8_ptr from8_ptr = (uint_8_ptr) from_ptr;
register uint_8_ptr to8_ptr = (uint_8_ptr) to_ptr;
if (number_of_bytes) {
while (number_of_bytes--) {
*to8_ptr++ = *from8_ptr++;
} /* Endwhile */
} /* Endif */
#else
uint_8_ptr from8_ptr = (uint_8_ptr) from_ptr;
uint_8_ptr to8_ptr = (uint_8_ptr) to_ptr;
uint_16_ptr from16_ptr = (uint_16_ptr) from_ptr;
uint_16_ptr to16_ptr = (uint_16_ptr) to_ptr;
register uint_32_ptr from32_ptr = (uint_32_ptr) from_ptr;
Regards,
David