Add freertos wrapper library, need help with library.json

Hello I am trying to platformio support to an existing library, I’m having big problems with building the project with the library. Heres the fork I’ve made for adding platformio support,
https://github.com/DanaDynamics/freertos-addons

Original repository:

I’m using STM32F446 with Arduino as the platform. I also use STM32Duino Freertos 10.0.1 which should be compatible with the wrappers.
The errors I get fall into two categories

  • error: template with C linkage,
  • undefined reference

https://github.com/DanaDynamics/freertos-addons/blob/2bb800d8b2e4955ea7c5a9de5bed6cb45943afa4/library.json#L19-L32

So you’re compiling none of the code in the c/ directory? And what references are you missing?

Yes, I have been trying to isolate the problem, I went through the C++ headers and as far as I could see there were no depencencies from the c/ directory.

I just created a blank project and tried to build with the following platformio.ini, and main.cpp, but complains about missing references

I made a mistake in my lib_deps, I corrected it to lib_deps from lip_deps

[env:nucleo_f446re]
platform = ststm32
board = nucleo_f446re
framework = arduino

lib_deps = 
STM32duino FreeRTOS@10.0.1
freertos-addons=https://github.com/DanaDynamics/freertos-addons.git

Source code main.cpp:
#include <Arduino.h>

#include <STM32FreeRTOS.h>

#include "semaphore.hpp"

#include "thread.hpp"

using namespace cpp_freertos;

void setup() {

// put your setup code here, to run once:

BinarySemaphore *Sem;

Sem = new BinarySemaphore();

}

void loop() {

// put your main code here, to run repeatedly:

}

now I get the following error which I cannot seem to get rid of

src/main.cpp: In function 'void setup()':
src/main.cpp:9:20: warning: variable 'Sem' set but not used [-Wunused-but-set-variable]    
   BinarySemaphore *Sem;
                    ^~~
Linking .pio/build/nucleo_f446re/firmware.elf
.pio/build/nucleo_f446re/src/main.cpp.o: In function `setup':
main.cpp:(.text.setup+0xe): undefined reference to         
`cpp_freertos::BinarySemaphore::BinarySemaphore(bool)'
collect2: error: ld returned 1 exit status
*** [.pio/build/nucleo_f446re/firmware.elf] Error 1

Alright so we must check whether the C++ filese for that class are compiled at all or if they are all removed by the src_filter. You can check that with a simple compile log and check if the filenames for the binary semaphore show up. When I have time later in the day I can check that too.

Hello max, thank you for helping out this far. I have looked through the compile log, and it seems like the C++ sources are not compiled at all. To be sure,i added a #pragma message directive to make sure that the compiler notifies me when it goes through the sources and compiles it.

Here is my compiler log:

CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/nucleo_f446re.html
PLATFORM: ST STM32 5.6.0 > ST Nucleo F446RE
HARDWARE: STM32F446RET6 180MHz, 128KB RAM, 512KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES: framework-arduinoststm32 3.10601.190716 (1.6.1), toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <STM32duino FreeRTOS> 10.0.1
|-- <freertos-addons> 1 #2bb800d
|   |-- <STM32duino FreeRTOS> 10.0.1
Compiling .pio/build/nucleo_f446re/FrameworkArduinoVariant/PeripheralPins.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduinoVariant/variant.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/IPAddress.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/Print.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/RingBuffer.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/Stream.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/Tone.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/USBSerial.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/WInterrupts.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/WMath.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/WSerial.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/WString.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/abi.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/avr/dtostrf.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/board.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/hooks.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/itoa.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/main.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/new.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/pins_arduino.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_adc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_adc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_can.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_cec.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_comp.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_comp_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_cortex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_crc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_crc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_cryp.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_cryp_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dac.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dac_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dcmi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dcmi_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dfsdm.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dfsdm_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dma.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dma2d.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dma_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_dsi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_eth.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_eth_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_exti.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_fdcan.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_firewall.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_flash.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_flash_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_flash_ramfunc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_fmpi2c.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_fmpi2c_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_gfxmmu.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_gpio.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_gpio_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_hash.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_hash_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_hcd.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_hrtim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_hsem.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_i2c.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_i2c_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_i2s.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_i2s_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_ipcc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_irda.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_iwdg.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_jpeg.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_lcd.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_lptim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_ltdc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_ltdc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_mdios.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_mdma.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_mmc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_mmc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_msp_template.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_nand.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_nor.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_opamp.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_opamp_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_ospi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pccard.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pcd.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pcd_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pka.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pwr.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_pwr_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_qspi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_ramecc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_rcc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_rcc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_rng.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_rtc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_rtc_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sai.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sai_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sd.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sd_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sdadc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sdram.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_smartcard.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_smartcard_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_smbus.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_spdifrx.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_spi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_spi_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_sram.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_swpmi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_tim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_tim_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_timebase_tim_template.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_tsc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_uart.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_uart_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_usart.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_usart_ex.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/HAL/stm32yyxx_hal_wwdg.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_adc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_bdma.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_comp.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_crc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_crs.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_dac.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_delayblock.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_dma.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_dma2d.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_exti.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_fmc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_fsmc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_gpio.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_hrtim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_i2c.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_lptim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_lpuart.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_mdma.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_opamp.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_pka.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_pwr.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_rcc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_rng.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_rtc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_sdmmc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_spi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_swpmi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_tim.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_ucpd.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_usart.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_usb.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/LL/stm32yyxx_ll_utils.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/PortNames.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/analog.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/bootloader.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/clock.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/core_callback.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/dwt.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/hw_config.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/interrupt.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/low_power.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/pinmap.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/rtc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/spi_com.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/startup_stm32yyxx.S.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/stm32_def.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/stm32_eeprom.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/system_stm32yyxx.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/timer.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/twi.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/uart.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/cdc/cdc_queue.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/cdc/usbd_cdc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/cdc/usbd_cdc_if.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/hid/usbd_hid_composite.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/hid/usbd_hid_composite_if.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usb_device_core.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usb_device_ctlreq.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usb_device_ioreq.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usbd_conf.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usbd_desc.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/stm32/usb/usbd_if.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/syscalls.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/wiring_analog.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/wiring_digital.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/wiring_pulse.cpp.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/wiring_shift.c.o
Compiling .pio/build/nucleo_f446re/FrameworkArduino/wiring_time.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/croutine.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/event_groups.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/list.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/queue.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/stream_buffer.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/tasks.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/FreeRTOS/Source/timers.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/STM32FreeRTOS.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/cmsis_os.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/heap.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/mpu_wrappers.c.o
Compiling .pio/build/nucleo_f446re/lib8ad/STM32duino FreeRTOS_ID2093/port.c.o
Compiling .pio/build/nucleo_f446re/src/main.cpp.o
Archiving .pio/build/nucleo_f446re/lib917/libfreertos-addons.a
Indexing .pio/build/nucleo_f446re/lib917/libfreertos-addons.a
src/main.cpp:5:17: note: #pragma message: 
******************************** 
 compile main 

 #pragma message "\n******************************** \n compile main \n"
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp: In function 'void setup()':
src/main.cpp:9:20: warning: variable 'Sem' set but not used [-Wunused-but-set-variable]
   BinarySemaphore *Sem;
                    ^~~
Linking .pio/build/nucleo_f446re/firmware.elf
.pio/build/nucleo_f446re/src/main.cpp.o: In function `setup':
main.cpp:(.text.setup+0xe): undefined reference to `cpp_freertos::BinarySemaphore::BinarySemaphore(bool)'
collect2: error: ld returned 1 exit status
*** [.pio/build/nucleo_f446re/firmware.elf] Error 1

https://github.com/DanaDynamics/freertos-addons/blob/2bb800d8b2e4955ea7c5a9de5bed6cb45943afa4/library.json#L21

What if you change this to first include everything then remove stuff? Like

   "srcFilter":[
      "+<*>",
      "-<Linux/*>"
   ],

Okay, I tried to do that, but it results in a never ending stream of errors like this:

/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:4787:3: error: template with C linkage
   template<typename _RandomAccessIterator, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:4824:3: error: template with C linkage
   template<typename _RandomAccessIterator>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_tempbuf.h:211:3: error: template specialization with C linkage
   template<>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:642:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:646:3: error: template with C linkage
   template<typename _IIter, typename _Tp>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:650:3: error: template with C linkage
^C^C^C   template<typename _FIter1, typename _FIter2>
   ^~~~~~~~
^C/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:654:3: error: template with C linkage
   template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:658:3: error: template with C linkage
   template<typename _IIter, typename _Predicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:662:3: error: template with C linkage
   template<typename _IIter, typename _Funct>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:666:3: error: template with C linkage
   template<typename _FIter, typename _Generator>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:670:3: error: template with C linkage
   template<typename _OIter, typename _Size, typename _Generator>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:674:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:678:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:682:3: error: template with C linkage
   template<typename _FIter>
   ^~~~~~~~
^C/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:687:3: error: template with C linkage
^C^C   template<typename _FIter, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:692:3: error: template with C linkage
^C   template<typename _IIter1, typename _IIter2, typename _OIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:696:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _OIter,
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:701:3: error: template with C linkage
   template<typename _FIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:706:3: error: template with C linkage
   template<typename _FIter, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:711:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:715:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:719:3: error: template with C linkage
   template<typename _RAIter>
   ^~~~~~~~
^C/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:687:3: error: template with C linkage
^C^C   template<typename _FIter, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:556:3: error: template with C linkage
   template<typename _InputIterator, typename _Predicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:692:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _OIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:580:3: error: template with C linkage
   template<typename _InputIterator, typename _Predicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:696:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _OIter,
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:701:3: error: template with C linkage
   template<typename _FIter>
   ^~~~~~~~
^C/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:706:3: error: template with C linkage
^C^C   template<typename _FIter, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:601:3: error: template with C linkage
   template<typename _ForwardIterator, typename _Predicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:711:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:715:3: error: template with C linkage
   template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:719:3: error: template with C linkage
   template<typename _RAIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:723:3: error: template with C linkage
   template<typename _RAIter, typename _Compare>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:639:3: error: template with C linkage
   template<typename _InputIterator, typename _OutputIterator,
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:727:3: error: template with C linkage
   template<typename _RAIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:731:3: error: template with C linkage
   template<typename _RAIter, typename _Compare>
^C   ^~~~~~~~
^C^C^C/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:668:3: error: template with C linkage
   template<typename _InputIterator, typename _OutputIterator, typename _Tp>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:735:3: error: template with C linkage
   template<typename _BIter, typename _Predicate>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/stl_algo.h:700:3: error: template with C linkage
   template<typename _InputIterator, typename _OutputIterator,
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:739:3: error: template with C linkage
   template<typename _RAIter>
   ^~~~~~~~
/home/john/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/bits/algorithmfwd.h:743:3: error: template with C linkage
   template<typename _RAIter, typename _Generator>