What options needed to link to correct library
When I compile and link with:
-mcpu=cortex-m4 -mfloat-abi=softfp
The map file indicates that memset comes from here:
<toolpath>
and my app crashes at the first call to memset.
I found that adding -mfpu=fpv4-sp-d16 results in my app working great. In this case memset comes from here:
<toolpath>
But that 'trick' doesn't work for -mfloat-abi=soft, in which case I found I must instead use -march=armv7e-m (and this trick doesn't work for the softfp case above) to get:
<toolpath>
I've found this behavior with:
gcc-arm-
gcc-arm-
gcc-arm-
My question: What am I doing wrong? Knowing either -mcpu=cortex-m4 or -march=armv7e-m, I think, would be enough that it wouldn't link to a library with an, apparently, incompatible memset. What's the 'canonical' set of compiler flags to get the right library for each case of float-abi?
-Gary
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Gary Fuehrer for more information if necessary.