bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
207 stars 27 forks source link

Custom folder called "drivers" not scanned or added to STM32Make.make #118

Closed KlaasHofmanVH closed 2 years ago

KlaasHofmanVH commented 2 years ago

Hi, First of all, thanks for this great plugin!

I happen to notice that sources under the directory called "drivers" are not included in the makefile. My sandbox looks like this:


├── application_xxxx
│   ├── application : **OK sources are added **
│   ├── drivers ** FAIL: sources are missing **
├── build
├── Core
│   ├── Inc
│   ├── Src
│   └── Startup
├── Drivers
│   ├── CMSIS
│   │   ├── Device
│   │   │   └── ST
│   │   │       └── STM32L4xx
│   │   │           ├── Include
│   │   │           └── Source
│   │   │               └── Templates
│   │   └── Include
│   └── STM32L4xx_HAL_Driver
│       ├── Inc
│       │   └── Legacy
│       └── Src

Could it be the plugin is confused by the name "drivers" which is the same as STM's HAL call ed "Drivers" ?

jortbmd commented 2 years ago

Hi! Thanks for opening up an issue. Could you perhaps share your STM32-for-VSCode.config.yaml? It should not automatically exclude the driver folder in your aplication_xxxx. Make sure that the globs/source file inclusion in includeDirectories and sourceFiles are correct.

e.g.:


# Include directories (directories containing .h or .hpp files)
# If a CubeMX makefile is present it will automatically include the include directories from that makefile.
includeDirectories:
 - Core/Src/**
 - Core/Inc/**
 - application_xxxx/**

sourceFiles:
 - Core/Src/**
 - Core/Inc/**
 - application_xxxx/**
KlaasHofmanVH commented 2 years ago

Thanks for the input. Editing the Yaml file did solve my issue. To be honest I wasn't aware of this file and its function :)