This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

_fp_init startup code crashing

I have a strange failure happening in the _fp_init function which is part of the C library startup code. When my application does NOT include a 3rd party library, the _fp_init function looks like this:

_fp_init: B510 PUSH {r4, lr} F7FEFAE6 BL.W __rt_fp_status_addr F04F0100 MOV r1,#0x00 6001 STR r1,[r0,0x00]

That code runs and works correctly. However, when I include a particular 3rd party library in my build, the _fp_init function now looks like this:

__fp_init: F04F7040 MOV r0,#0x3000000 EEE10A10 MCR P10,0x07,r0,C1,C0

This code always crashes on the MCR instruction. This code is programmed into Flash, and I've examined the code immediately after flash programming (i.e. the software is not corrupting the flash).

Can anyone explain this? How can the C runtime startup code change based on whether or not a completely unrelated library is being linked into the build? What other explanation for this could there be?

I am using Keil tools C Compiler version 4.0.0.728.