Linking a Static Library built with arm-none-eabi- in Keil uVision Project

1.2k Views Asked by At

I was trying to add the Helix MP3 decoder to my embedded project for almost couple of days, but because the library was built with gcc toolchain, I had plenty of issues compiling under Keil uVision.

I thought the only viable option would be creating a static lib.a file with gcc based toolchain and having that linked with ArmLink in uVision. Unfortunately, that did not work for me either. After linking/including the library I created with gcc in my Keil uVision project, I get over a dozen of errors from the linker like this one:

Error: L6242E: Cannot link object mp3dec.o as its attributes are incompatible with the image attributes.

I tried to add the following flag to the compiler: --wchar32, but that caused the linker to complain about something else:

STM32F407_MPMB\STM32F407_MPMB.axf: Error: L6406E: No space in execution regions with .ANY selector matching buffers.o(.bss).

STM32F407_MPMB\STM32F407_MPMB.axf: Error: L6407E: Sections of aggregate size 0x6ac8 bytes could not fit into .ANY selector(s).

I'm not very familiar with the linker scripts/options, memory sections, scatter file, but would love to learn about it if that helps!

Anyways, I have no problem getting things done with the Eclipse-Based gcc toolchain, however, I started to use Keil uVision for several projects recently and would like to stick with it for this one, at least for some time.

0

There are 0 best solutions below