We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have some question about memcpy?
when i use memcpy with STM32F4,i wanna copy some data to structure in other data(copy data size 16byte), but however i used microlib or not this memcpy translation by keil,i see this thumb code become STRD r1,r12,[r2,#0x08] ,but R2 reg is 0x20017977 is a not word align. R2 reg number is memcpy Dst addr.When i use memcpy like "memcpy(0x20017977,(u8*)Src_addr,16)" i see translation thumb code use "__aeabi__memcpy(0x080001E4)",that`s all right.
so, I want know whey Armcc translation code do this?And How can i safe use when i use memcpy funcation?
I would agree there is a stellar amount of stupidity making memcpy() fault on unaligned data, it used to be the default method of pulling unaligned data into aligned local variables on old ARM7/ARM9 boards.
There are occasions when you want memcpy() to be fast, but most need it to be safe.
Thanks for u answer the question.thanks~!