cancel
Showing results for 
Search instead for 
Did you mean: 

create library for STM32F4

Fristedt.Jan
Associate II
Posted on March 11, 2013 at 21:55

Hi All,

I need to create a library for a project using the STM32F4. I have tried using both CoIDE and GCC command line tools. No luck at all, I ended up in Default_Handler() when the library function was called. Creating a library using command line tools for Cygwin or Linux is no problem.

I guess it's just a stupid mistake on my behalf. Any ideas?

/Janne

#stm32f4-create-library""
2 REPLIES 2
Posted on March 11, 2013 at 23:42

That is often a common dumping point for things like HardFault, why would it fault, the number one reason for libraries is that you have linked 32-bit ARM code, not 16-bit Thumb code.

If you debug you code you might notice a BLX to the subroutine. Look also at the .MAP file.

Make sure you build your libraries objects with the right cpu/architecture settings.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Fristedt.Jan
Associate II
Posted on March 12, 2013 at 03:07

Thank you for your quick reply.

It was just a stupid mistake by me. I had forgotten to point the linker to my latest attempt to create the library.