Skip to main content
Associate
Jun 18, 2025 9:19 AM UTC
Solved

library compiled for stm32F4 series compatible for custom Cortex M4?

Edited to clarify that this is specifically STM32F4 (originally just said "Fx").


I've a library .a file compiled using STM32CubeIDE for STM32F4 series.

Is the .a file be compatible to Custom ARM Cortex M4 to use in IAR Embedded Work bench?

This topic has been closed for replies.
TDK
TDKBest answer
Jun 18, 2025 12:16 PM UTC

Yes, if it doesn't include anything STM32F4-specific, it should work on other Cortex-M4 processors. Something like a DSP library would be compatible.

"If you feel a post has answered your question, please click ""Accept as Solution""."

8 replies

Andrew Neil
Super User
Jun 18, 2025 10:11 AM UTC

There's two independent questions there:

  1. Is the .a library compatible with this "Custom ARM Cortex M4" ?
    I guess if the Custom part has the exact same options as in the STM32Fx, it should work.
     
  2. Can IAR use a GCC .a library created by CubeIDE ?
    You would have to ask IAR that one:
    https://www.iar.com/support 

If you have the source, surely rebuilding from source would be the safest option?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
KnarfB
Super User
Jun 18, 2025 10:34 AM UTC

Fx can be Cortex-M0 or Cortex-M4.

"Custom  ARM Cortex M4" could have other HW features implemented than STM32.

Also check the floating point options which are used on either side.

hth

KnarfB

Andrew Neil
Super User
Jun 18, 2025 10:47 AM UTC

@KnarfB wrote:

Fx can be Cortex-M0 or Cortex-M4.


Also M3, M33, M7, M55:

AndrewNeil_0-1750243613546.png

 

@dwarakanath so did you mean F4 ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate
Jun 18, 2025 11:28 AM UTC

Hi @Andrew Neil 

Yes. F4 here in my case.

Also the .a file doesn't have any peripheral related inclusions. Its purely some algo part.

@KnarfB 

No float support in either the cores.

TDK
TDKBest answer
Jun 18, 2025 12:16 PM UTC

Yes, if it doesn't include anything STM32F4-specific, it should work on other Cortex-M4 processors. Something like a DSP library would be compatible.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
Jun 18, 2025 12:27 PM UTC

Let me check and update 

Associate
Jun 19, 2025 11:08 AM UTC

It didn't work. some stack related linking error popped up. I think this is compiler dependent.

 

Thanks folks for the encouraging support.