Discussion:
[libopencm3-devel] example linking an external c++ library
kristoff
2016-04-23 12:45:07 UTC
Permalink
Hi,


I do not know if there is still activity in this group.



I am new to libopencm3 (I have been looking at all different kinds of
libraries and IDEs for stm32).

I found a large number of examples using libopencm3 in the "-examples"
github archive, but one of the things I am missing is a example linking
libopencm3 code with an external library.



I have a mbed library -which is by itself a port of a arduino library-
to access NXP's MFRC522 RFID chip and work with MIFARE cards. It's a C++
library and I modified it slightly to use the opencm3 spi calls.
https://developer.mbed.org/users/kirchnet/code/RFID-RC522/

However, my question is how to link this to my "main" application
(either in C or C++) and how to build a Makefile for that.


I managed to use arm-none-eabi-g++ to build two .o files, but I do not
know to link it all together to generate a .elf file.


Are there any examples on how to do this?



Cheerio! Kr. Bonne.

Loading...