hi,
I'm testing my device driver code now and I got a very strange problem this the error:
undefined reference to 'memcpy'
One example is I called one function from my device driver c file into the main() function:
//in device driver signed char CC2420_set_VREG_EN(volatile CC2420_t CC2420) { gpio_set_gpio_pin(CC2420.VREG_EN_pin); return CC2420_SUCCESS; }
// in main() CC2420_set_VREG_EN(CC2420);
Then this function call give me the above mentioned error.
But if I change it to:
// in main() gpio_set_gpio_pin(CC2420.VREG_EN_pin);
Then the error is gone.
And if I change it to:
// in main() CC2420_set_VREG_EN(CC2420); gpio_set_gpio_pin(CC2420.VREG_EN_pin);
then it will be gpio_set_gpio_pin which get the same error!!!
So why???!!!
Cheng