简体   繁体   中英

ARM hard fault on runtime function call in simulator

I'm trying to build and run some project from 3rd party sources for bare-metal(no OS)ARM Cortex M3.

I build it with arm-none-eabi-gcc(success) with newlib.

I run it under simulator of TI Code Composer Studio.

The problem:

When I run it, it fails into hard fault (entering into corresponding ISR) on the first call to the runtime library function

Till now I sow it failing on calls to memmove or memcpy. When tracing the disassembly I see that it fails exactly on the instruction

BLX memset

The question: What can cause the fault and how to debug it ???

Are you using both ARM and Thumb? 'BLX label' calls the label, (using link register for return address), and changes to Thumb mode. Are you linking with the correct version of the library?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM