How can I add/import the ChibiOS library for an embedded project in Visual Studio?

470 views Asked by At

I want to use the ch.h file from ChibiOS in my project. The embedded project is created and is using HAL drivers for STM32. I want to find a way to add or import the ChibiOS library to the current project.

My question is that

  1. how can I add these embedded libraries with lots of dependencies by VisualGDB in Visual Studio?
  2. Do I need to create .lib files of ChibiOS/RT?
  3. What are the differences between C/C++ paths and linker paths?
  4. Is adding .a and .h files enough or do I have to look for other files?

There are three ways that I followed and it wasn't successful.

  1. I followed the link to add the paths. The files that added to projects are libch.a and ch.h. It is called other header files inside ch.h. Then, I added the other header paths to C/C++ "additional include directories" too. After I added the third header file, I got the error "redefinition".

  2. The second way, I wanted to use vcpkg, a library manager. But the ChibiOS/RT library wasn't available in vcpkg.

  3. One other way is to add libraries in standard libraries without adding any paths. But how can I find standard libraries? If the location is in the compiler (gcc-arm-none-eabi), the ChibiOS package was added, but it still wasn't detected in Visual Studio.

I really appreciate it if you know any tutorials or ways to add ChibiOS/RT in Visual Studio.

0

There are 0 answers