We are 4 French students in engineering school. We are currently working on a robotic project of telepresence. We have set up RIOT-OS on a STM32 L152RE board and we are now attempting to add an external library in our project. We have a library libmded.a that contains every .o precompiled provided by mbed, and a folder with the corresponding headers. Then we added the .h path to the INCLUDES var in the makefile and the library to the USEMODULE var. But when we’re trying to compile it, it seems that the makefile isn’t able to find the functions include in this lib. That’s why we would be grateful for any advice that could guide us.
I tried to include my external library as an external module, but it doesn’t work ! I have still the same issue. When we’re trying to compile it, it seems that the makefile isn’t able to find the functions include in this libmbed.a.
As you can see in my Makefile, I use this var:
AJOUT MODULE MBED
EXTERNAL_MODULE_DIRS += “YOUR_PATH”/RIOT-master/examples/test
USEMODULE += libmbed
INCLUDES += -I/”YOUR_PATH”/RIOT-master/MBED
2 things: Have you added the Makefile.base to the directory “YOUR_PATH”/RIOT-master/examples/test?
It has to contain the following
MODULE = libmbed
You can leave out the first line, if the directory it resides in is called libmbed (in your example you would need to rename “YOUR_PATH”/RIOT-master/examples/test to “YOUR_PATH”/RIOT-master/examples/libmbed).
I export all .o depending on my board and create the libmed.a with the command “ar -q libmed.a” . I use the mbed export to gcc, compile it with the “GCC ARM Embedded 4.7 update 4” Toolchain and it works ! But when I tried to compile with RIOT-OS, its like it isn’t able to find the functions include in this lib.
Mind that the external module approach only works if you have the source files (the .c(pp) or .s files) in this directory. If you only have the object files, try copying them into the directory “YOUR_PATH”/RIOT-master/examples/bin/YOUR_BOARD/".