STM32 libraries

Hello,

I’d like to use the STM32 internal libraries like stm32f2xx_adc.h or stm32f2xx_wwdg.h (link to the files).

I included the file (#include “stm32f2xx_wwdg.h”) but it returns “undefined reference”. How can I use the libraries with the Particle IDE?

Thank you

@apica, you will need to use a local toolchain to include those files and successfully compile.

Thank you for your reply @peekay123, I’ll go for the FAQ guide.

1 Like

Hello again.

I’ve followed the guide, and managed somehow to set it up (even though the Electron Monolithic bug), and adding #include "Particle.h". At this point, I can compile locally but still can’t reach the STM32 libraries.

I’ve tried #include "stm32f2xx_wwdg.h", #include "..\platform\MCU\STM32F2xx\STM32_StdPeriph_Driver\inc\stm32f2xx_wwdg.h" and similars, but always failing during compilation. The “undefined reference” keeps showing :frowning2: for watchdog functions.

Am I missing anything @peekay123? Thank you

@apica, first, make sure you are compiling from the “main” directory in the firmware repo. I just compiled an app with and without #include "stm32f2xx_wwdg.h" and had no errors. I compiled with both the latest develop branch and the latest release, again without errors.

I compiled my app from the “main” directory using:
make clean all PLATFORM=photon APP=xxxxx or
make clean all PLATFORM=photon PARTICLE_DEVELOP=1 APP=xxxxx

I tested with both PLATFORM=photon and PLATFORM=electron with the same results.

Sorry for the delay.

My APP project is located outside the particle firmware main folder. Is that the problem? The folder structure follows this structure:

  • Project Folder
  • Application.cpp
  • Particle Firmware Folder
  • main Folder
    • Default files (not used in my APP)

I though this structure made sense, because there can be other project APP folders. Also, it’s easy to manage the Particle Firmware git.

Thank you

That should work. What is your make command?

I’ve just followed the tutorial in the FAQ section (choosing Cygwin64).

-Enverioment variable MAKEOPTS: MODULAR=y DEBUG_BUILD=y USE_SWD_JTAG=y

-Makefile:

# Assumption: These variables will be set in the environment
# $(APPDIR) 
# $(FIRMWARE) 
# $(PATH)
# $(PLATFORM)
# $(TARGETBIN)
# Optionally set $(MAKEOPTS) for things like MODULAR=n DEBUG_BUILD=y USE_SWD_JTAG=y

all : $(TARGETBIN)

# Use the wildcard function explicitly, because just using a dependency on .h files will
# fail if the project doesn't contain any .h files. This will work either way.
source := $(wildcard *.cpp) $(wildcard *.h)

$(TARGETBIN) : $(source)
	cd "$(FIRMWARE)/main" && make all PLATFORM=$(PLATFORM) APPDIR="$(APPDIR)" $(MAKEOPTS)

clean :
	cd "$(FIRMWARE)/modules" && make clean all PLATFORM=$(PLATFORM) APPDIR="$(APPDIR)" $(MAKEOPTS)


.PHONY: all clean

-And the output:

make all 
cd "D:/Code/ParticleFirmware/main" && make all PLATFORM=electron APPDIR="D:/Code/Project" MODULAR=y DEBUG_BUILD=y USE_SWD_JTAG=y
...

Thank you

@apica, again, I compiled with a similar command line without any errors. Try “make clean all …” to see if that helps. I use Cygwin x64 on Windows 10 so not sure what the issue is. Can you provide the full error output text?

Hi,

I think it can come from the used functions. If I use IWDG_ReloadCounter or IWDG_WriteAccessCmd, it compiles successfully. But, if I use functions like WWDG_DeInit, the error appears.

Is there an explanation of the hierarchy and structure of the Firmware repository?

The output log of the clean command (cut due to post-size limitations) is:

	09:58:57 **** Clean-only build of configuration Default for project Project ****
	make -j4 clean 
cd "D:/Code/ParticleFirmware/modules" && make clean all PLATFORM=electron APPDIR="D:/Code/Project" MODULAR=y DEBUG_BUILD=y USE_SWD_JTAG=y
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/cygdrive/d/Code/ParticleFirmware/modules'
  /cygdrive/d/Code/ParticleFirmware/modules/electron/system-part1/makefile /cygdrive/d/Code/ParticleFirmware/modules/electron/system-part2/makefile /cygdrive/d/Code/ParticleFirmware/modules/electron/system-part3/makefile /cygdrive/d/Code/ParticleFirmware/modules/electron/user-part/makefile
make -C /cygdrive/d/Code/ParticleFirmware/modules/electron/system-part1/ clean all  USE_SWD_JTAG=y DEBUG_BUILD=y MODULAR=y APPDIR=D:/Code/Project PLATFORM=electron
make[2]: Entering directory '/cygdrive/d/Code/ParticleFirmware/modules/electron/system-part1'
make -C ../../../services-dynalib clean
make[3]: Entering directory '/cygdrive/d/Code/ParticleFirmware/services-dynalib'
rm -f ../build/target/services-dynalib/arm/./src/services_dynalib.o   ../build/target/services-dynalib/arm/./src/services_dynalib.o.d   ../build/target/services-dynalib/arm/libservices-dynalib.a
rm -f -r ../build/target/services-dynalib/arm
make[3]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/services-dynalib'
make -C ../../../rt-dynalib clean
make[3]: Entering directory '/cygdrive/d/Code/ParticleFirmware/rt-dynalib'
rm -f ../build/target/rt-dynalib/platform-10-m/./src/rt_dynalib.o   ../build/target/rt-dynalib/platform-10-m/./src/rt_dynalib.o.d   ../build/target/rt-dynalib/platform-10-m/librt-dynalib.a
rm -f -r ../build/target/rt-dynalib/platform-10-m
make[3]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/rt-dynalib'
make -C ../../../platform clean
make[3]: Entering directory '/cygdrive/d/Code/ParticleFirmware/platform'
rm -f ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/system_stm32f2xx.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/hw_config.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usb_bsp.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_usr.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_composite.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_mcdc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_mhid.o ../build/target/platform/platform-10-m/./MCU/shared/STM32/src/hw_ticks.o ../build/target/platform/platform-10-m/./MCU/shared/STM32/src/hw_system_flags.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_core.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_req.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_ioreq.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dfu_core.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dfu_mal.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_flash_if.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dct_if.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/misc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_adc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_can.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_dac.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_crc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_dma.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_exti.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_flash.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_gpio.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_i2c.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_iwdg.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_pwr.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rcc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rng.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rtc.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_spi.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_syscfg.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_tim.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_usart.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_core.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_dcd_int.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_dcd.o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/dcd_flash_impl.o  ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/system_stm32f2xx.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/hw_config.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usb_bsp.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_usr.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_composite.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_mcdc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/usbd_mhid.o.d ../build/target/platform/platform-10-m/./MCU/shared/STM32/src/hw_ticks.o.d ../build/target/platform/platform-10-m/./MCU/shared/STM32/src/hw_system_flags.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_core.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_req.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_ioreq.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dfu_core.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dfu_mal.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_flash_if.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_Device_Driver/src/usbd_dct_if.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/misc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_adc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_can.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_dac.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_crc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_dma.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_exti.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_flash.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_gpio.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_i2c.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_iwdg.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_pwr.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rcc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rng.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_rtc.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_spi.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_syscfg.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_tim.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_StdPeriph_Driver/src/stm32f2xx_usart.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_core.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_dcd_int.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/STM32_USB_OTG_Driver/src/usb_dcd.o.d ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/dcd_flash_impl.o.d  ../build/target/platform/platform-10-m/libplatform.a
rm -f -r ../build/target/platform/platform-10-m
make[3]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/platform'
rm -f ../../../build/target/system-part1/platform-10-m/src/bootloader_hal.o ../../../build/target/system-part1/platform-10-m/src/usb_hal.o ../../../build/target/system-part1/platform-10-m/src/init_dynalib.o ../../../build/target/system-part1/platform-10-m/src/module_info.o ../../../build/target/system-part1/platform-10-m/src/import_gpio_hal.o ../../../build/target/system-part1/platform-10-m/src/import_core_hal.o ../../../build/target/system-part1/platform-10-m/src/import_hal.o ../../../build/target/system-part1/platform-10-m/src/import_concurrent_hal.o ../../../build/target/system-part1/platform-10-m/src/export_cellular_hal.o ../../../build/target/system-part1/platform-10-m/src/module_system_part3.o ../../../build/target/system-part1/platform-10-m/src/newlib_stubs.o ../../../build/target/system-part1/platform-10-m/src/export_usb_hal.o ../../../build/target/system-part1/platform-10-m/src/cellular_hal.o ../../../build/target/system-part1/platform-10-m/src/export_bootloader_hal.o ../../../build/target/system-part1/platform-10-m/src/export_socket_hal.o  ../../../build/target/system-part1/platform-10-m/src/bootloader_hal.o.d ../../../build/target/system-part1/platform-10-m/src/usb_hal.o.d ../../../build/target/system-part1/platform-10-m/src/init_dynalib.o.d ../../../build/target/system-part1/platform-10-m/src/module_info.o.d ../../../build/target/system-part1/platform-10-m/src/import_gpio_hal.o.d ../../../build/target/system-part1/platform-10-m/src/import_core_hal.o.d ../../../build/target/system-part1/platform-10-m/src/import_hal.o.d ../../../build/target/system-part1/platform-10-m/src/import_concurrent_hal.o.d ../../../build/target/system-part1/platform-10-m/src/export_cellular_hal.o.d ../../../build/target/system-part1/platform-10-m/src/module_system_part3.o.d ../../../build/target/system-part1/platform-10-m/src/newlib_stubs.o.d ../../../build/target/system-part1/platform-10-m/src/export_usb_hal.o.d ../../../build/target/system-part1/platform-10-m/src/cellular_hal.o.d ../../../build/target/system-part1/platform-10-m/src/export_bootloader_hal.o.d ../../../build/target/system-part1/platform-10-m/src/export_socket_hal.o.d  elf bin lst hex size
rm -f -r ../../../build/target/system-part1/platform-10-m
make -C ../../../services-dynalib 
make[3]: Entering directory '/cygdrive/d/Code/ParticleFirmware/services-dynalib'
Building c file: src/services_dynalib.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/services-dynalib/arm/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../dynalib/inc -I../services/inc -I. -MD -MP -MF ../build/target/services-dynalib/arm/./src/services_dynalib.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=108 -DMODULE_FUNCTION=4 -DMODULE_INDEX=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o ../build/target/services-dynalib/arm/./src/services_dynalib.o src/services_dynalib.c

Building target: ../build/target/services-dynalib/arm/libservices-dynalib.a
Invoking: ARM GCC Archiver
mkdir -p ../build/target/services-dynalib/arm/
arm-none-eabi-gcc-ar -cr ../build/target/services-dynalib/arm/libservices-dynalib.a ../build/target/services-dynalib/arm/./src/services_dynalib.o

make[3]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/services-dynalib'
make -C ../../../rt-dynalib 
make[3]: Entering directory '/cygdrive/d/Code/ParticleFirmware/rt-dynalib'
Building c file: src/rt_dynalib.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/rt-dynalib/platform-10-m/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -fno-builtin -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I./inc -I../dynalib/inc -I. -MD -MP -MF ../build/target/rt-dynalib/platform-10-m/./src/rt_dynalib.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=108 -DMODULE_FUNCTION=4 -DMODULE_INDEX=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o ../build/target/rt-dynalib/platform-10-m/./src/rt_dynalib.o src/rt_dynalib.c

...

Building c file: MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I./shared/inc -I./MCU/STM32F2xx/CMSIS/Include -I./MCU/STM32F2xx/CMSIS/Device/ST/Include -I./MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I./MCU/shared/STM32/inc -I./MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I./MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I./MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I./MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../services/inc -I../hal/inc -I../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../hal/src/electron -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../dynalib/inc -I. -MD -MP -MF ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=108 -DMODULE_FUNCTION=4 -DMODULE_INDEX=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o ../build/target/platform/platform-10-m/./MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.o MCU/STM32F2xx/SPARK_Firmware_Driver/src/flash_mal.c

Building target: ../build/target/wiring_globals/platform-10-m/libwiring_globals.a
Invoking: ARM GCC Archiver
mkdir -p ../build/target/wiring_globals/platform-10-m/
arm-none-eabi-gcc-ar -cr ../build/target/wiring_globals/platform-10-m/libwiring_globals.a ../build/target/wiring_globals/platform-10-m/src/spark_wiring_gpio.o ../build/target/wiring_globals/platform-10-m/src/wiring_globals_spi.o ../build/target/wiring_globals/platform-10-m/src/spark_wiring_watchdog.o ../build/target/wiring_globals/platform-10-m/src/wiring_globals_eeprom.o ../build/target/wiring_globals/platform-10-m/src/wiring_globals_cloud.o ../build/target/wiring_globals/platform-10-m/src/wiring_globals_ipaddress.o ../build/target/wiring_globals/platform-10-m/src/wiring_globals_i2c.o

make[3]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/wiring_globals'
Building c file: src/user_export.c
Invoking: ARM GCC C Compiler
mkdir -p D:/Code/Project/target//obj/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../hal/inc -I../../../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../../../hal/src/electron -I../../../hal/src/stm32f2xx -I../../../hal/src/stm32 -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/stm32f2xx/inc -I../../../modules/electron/system-part2/inc -I../../../modules/shared/stm32f2xx/inc -I../../../platform/shared/inc -I../../../platform/MCU/STM32F2xx/CMSIS/Include -I../../../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../../../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../../../platform/MCU/shared/STM32/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I. -MD -MP -MF D:/Code/Project/target//obj/src/user_export.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,108 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o D:/Code/Project/target//obj/src/user_export.o src/user_export.c

Building c file: src/module_info.c
Invoking: ARM GCC C Compiler
mkdir -p D:/Code/Project/target//obj/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../hal/inc -I../../../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../../../hal/src/electron -I../../../hal/src/stm32f2xx -I../../../hal/src/stm32 -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/stm32f2xx/inc -I../../../modules/electron/system-part2/inc -I../../../modules/shared/stm32f2xx/inc -I../../../platform/shared/inc -I../../../platform/MCU/STM32F2xx/CMSIS/Include -I../../../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../../../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../../../platform/MCU/shared/STM32/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I. -MD -MP -MF D:/Code/Project/target//obj/src/module_info.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,108 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o D:/Code/Project/target//obj/src/module_info.o src/module_info.c

Building c file: src/user_module.c
Invoking: ARM GCC C Compiler
mkdir -p D:/Code/Project/target//obj/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../hal/inc -I../../../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../../../hal/src/electron -I../../../hal/src/stm32f2xx -I../../../hal/src/stm32 -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/stm32f2xx/inc -I../../../modules/electron/system-part2/inc -I../../../modules/shared/stm32f2xx/inc -I../../../platform/shared/inc -I../../../platform/MCU/STM32F2xx/CMSIS/Include -I../../../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../../../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../../../platform/MCU/shared/STM32/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I. -MD -MP -MF D:/Code/Project/target//obj/src/user_module.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,108 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o D:/Code/Project/target//obj/src/user_module.o src/user_module.c

Building cpp file: src/newlib_stubs.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p D:/Code/Project/target//obj/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../hal/inc -I../../../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../../../hal/src/electron -I../../../hal/src/stm32f2xx -I../../../hal/src/stm32 -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/stm32f2xx/inc -I../../../modules/electron/system-part2/inc -I../../../modules/shared/stm32f2xx/inc -I../../../platform/shared/inc -I../../../platform/MCU/STM32F2xx/CMSIS/Include -I../../../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../../../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../../../platform/MCU/shared/STM32/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I. -MD -MP -MF D:/Code/Project/target//obj/src/newlib_stubs.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,108 -D_WINSOCK_H -D_GNU_SOURCE  -fno-exceptions -fno-rtti -fcheck-new -c -o D:/Code/Project/target//obj/src/newlib_stubs.o src/newlib_stubs.cpp

Building target: D:/Code/Project/target/Project.elf
Invoking: ARM GCC C++ Linker
mkdir -p D:/Code/Project/target/
arm-none-eabi-g++ -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.2 -DDEBUG_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../hal/inc -I../../../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../../../hal/src/electron -I../../../hal/src/stm32f2xx -I../../../hal/src/stm32 -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/stm32f2xx/inc -I../../../modules/electron/system-part2/inc -I../../../modules/shared/stm32f2xx/inc -I../../../platform/shared/inc -I../../../platform/MCU/STM32F2xx/CMSIS/Include -I../../../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../../../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../../../platform/MCU/shared/STM32/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../../../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I. -MD -MP -MF D:/Code/Project/target/Project.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,108 -D_WINSOCK_H -D_GNU_SOURCE D:/Code/Project/target//obj/src/user_export.o D:/Code/Project/target//obj/src/module_info.o D:/Code/Project/target//obj/src/user_module.o D:/Code/Project/target//obj/src/newlib_stubs.o  --output D:/Code/Project/target/Project.elf -nostartfiles -Xlinker --gc-sections -L../../../build/arm/linker/stm32f2xx -L../../../build/arm/linker/stm32f2xx  -L../../../build/target/user/platform-10-m/Project/ -L../../../build/target/services-dynalib/arm/ -L../../../build/target/hal-dynalib/platform-10-m/ -L../../../build/target/system-dynalib/platform-10-m/ -L../../../build/target/rt-dynalib/platform-10-m/ -L../../../build/target/wiring/platform-10-m/ -L../../../build/target/communication-dynalib/platform-10-m/ -L../../../build/target/platform/platform-10-m/ -L../../../build/target/wiring_globals/platform-10-m/ -L../../../build/arm/linker -Wl,--whole-archive -luser -lhal-dynalib -lservices-dynalib -lsystem-dynalib -lrt-dynalib -lwiring -lcommunication-dynalib -lplatform -lwiring_globals -Wl,--no-whole-archive -lnosys --specs=nano.specs -L../../../modules/electron/system-part1 -L../../../modules/electron/system-part3 -L../../../modules/electron/system-part2 -L. -T./linker.ld -Wl,--defsym,USER_FIRMWARE_IMAGE_SIZE=0x20000 -Wl,--defsym,USER_FIRMWARE_IMAGE_LOCATION=0x8080000 -Wl,-Map,D:/Code/Project/target/Project.map
../../../build/target/user/platform-10-m/Project/\libuser.a(main.o): In function `Main_Initialization':
D:/Code/Project/main.cpp:340: undefined reference to `WWDG_DeInit'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [../../../build/module.mk:225: D:/Code/Project/target/Project.elf] Error 1
make[2]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/modules/electron/user-part'
make[1]: Leaving directory '/cygdrive/d/Code/ParticleFirmware/modules'
make[1]: *** [makefile:86: /cygdrive/d/Code/ParticleFirmware/modules/electron/user-part/makefile] Error 2
make: *** [Makefile:19: clean] Error 2

10:01:32 Build Finished (took 2m:35s.152ms)

Thank you