diff --git a/framework/libs/CMSIS/lib.mak b/framework/libs/CMSIS/lib.mak index e4d9b739..765ad508 100644 --- a/framework/libs/CMSIS/lib.mak +++ b/framework/libs/CMSIS/lib.mak @@ -27,8 +27,8 @@ ifneq (,$(findstring CMSIS, $(LIBS))) # peripheral include INCDIRS := $(INCDIRS) $(LIBPATH)/Device/ST/STM32F4xx/Include - LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c - LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f40_41xxx.s + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Device/ST/STM32F4xx/Source/system_stm32f4xx.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Device/ST/STM32F4xx/Source/startup_stm32f40_41xxx.s endif # check cpu define diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/Release_Notes.html b/framework/libs/st_otg/Release_Notes.html similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/Release_Notes.html rename to framework/libs/st_otg/Release_Notes.html diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_bsp.h b/framework/libs/st_otg/inc/usb_bsp.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_bsp.h rename to framework/libs/st_otg/inc/usb_bsp.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_conf_template.h b/framework/libs/st_otg/inc/usb_conf_template.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_conf_template.h rename to framework/libs/st_otg/inc/usb_conf_template.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_core.h b/framework/libs/st_otg/inc/usb_core.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_core.h rename to framework/libs/st_otg/inc/usb_core.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_dcd.h b/framework/libs/st_otg/inc/usb_dcd.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_dcd.h rename to framework/libs/st_otg/inc/usb_dcd.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_dcd_int.h b/framework/libs/st_otg/inc/usb_dcd_int.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_dcd_int.h rename to framework/libs/st_otg/inc/usb_dcd_int.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_defines.h b/framework/libs/st_otg/inc/usb_defines.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_defines.h rename to framework/libs/st_otg/inc/usb_defines.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_hcd.h b/framework/libs/st_otg/inc/usb_hcd.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_hcd.h rename to framework/libs/st_otg/inc/usb_hcd.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_hcd_int.h b/framework/libs/st_otg/inc/usb_hcd_int.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_hcd_int.h rename to framework/libs/st_otg/inc/usb_hcd_int.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_otg.h b/framework/libs/st_otg/inc/usb_otg.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_otg.h rename to framework/libs/st_otg/inc/usb_otg.h diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_regs.h b/framework/libs/st_otg/inc/usb_regs.h similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/inc/usb_regs.h rename to framework/libs/st_otg/inc/usb_regs.h diff --git a/framework/libs/st_otg/lib.mak b/framework/libs/st_otg/lib.mak new file mode 100644 index 00000000..c39b6b83 --- /dev/null +++ b/framework/libs/st_otg/lib.mak @@ -0,0 +1,11 @@ +ifneq (,$(findstring ST_OTG, $(LIBS))) + # lib path + LIBPATH = $(FRAMEWORK_DIR)/libs/st_otg + $(info using LIB: $(LIBPATH)) + + # peripheral include + INCDIRS := $(INCDIRS) $(LIBPATH)/inc + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/usb_core.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/usb_dcd.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/usb_dcd_int.c +endif diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_bsp_template.c b/framework/libs/st_otg/src/usb_bsp_template.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_bsp_template.c rename to framework/libs/st_otg/src/usb_bsp_template.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_core.c b/framework/libs/st_otg/src/usb_core.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_core.c rename to framework/libs/st_otg/src/usb_core.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_dcd.c b/framework/libs/st_otg/src/usb_dcd.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_dcd.c rename to framework/libs/st_otg/src/usb_dcd.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_dcd_int.c b/framework/libs/st_otg/src/usb_dcd_int.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_dcd_int.c rename to framework/libs/st_otg/src/usb_dcd_int.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_hcd.c b/framework/libs/st_otg/src/usb_hcd.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_hcd.c rename to framework/libs/st_otg/src/usb_hcd.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_hcd_int.c b/framework/libs/st_otg/src/usb_hcd_int.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_hcd_int.c rename to framework/libs/st_otg/src/usb_hcd_int.c diff --git a/framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_otg.c b/framework/libs/st_otg/src/usb_otg.c similarity index 100% rename from framework/libs/STM32_USB_OTG_Driver-2.2.0/src/usb_otg.c rename to framework/libs/st_otg/src/usb_otg.c diff --git a/framework/libs/st_spl_f4/lib.mak b/framework/libs/st_spl_f4/lib.mak index b12a7aea..ed8f48ca 100644 --- a/framework/libs/st_spl_f4/lib.mak +++ b/framework/libs/st_spl_f4/lib.mak @@ -15,10 +15,57 @@ ifneq (,$(findstring STM32F4, $(CPU))) endif # peripheral include - INCDIRS := $(INCDIRS) $(LIBPATH)/inc/ + INCDIRS := $(INCDIRS) $(LIBPATH)/inc + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/misc.c - ifneq (,$(findstring UART ,$(PERIPH))) - LIBSOURCES := $(LIBSOURCES) &(LIBPATH)/src/stm32f4xx_usart.c + ifneq (,$(findstring UART, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_usart.c endif + + ifneq (,$(findstring ADC, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_adc.c + endif + + ifneq (,$(findstring TIM, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_tim.c + endif + + ifneq (,$(findstring DAC, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_dac.c + endif + + ifneq (,$(findstring GPIO, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_gpio.c + endif + + ifneq (,$(findstring CRC, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_crc.c + endif + + ifneq (,$(findstring RCC, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_rcc.c + endif + + ifneq (,$(findstring PWR, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_pwr.c + endif + + ifneq (,$(findstring FLASH, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_flash.c + endif + + ifneq (,$(findstring DMA, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_dma.c + endif + + ifneq (,$(findstring SPI, $(PERIPH))) + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/stm32f4xx_spi.c + endif + + $(info libsrc: $(LIBSOURCES)) + $(info inc: $(INCDIRS)) + endif -endif \ No newline at end of file +endif + + diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Class/CDC/Inc/usbd_cdc.h b/framework/libs/st_usb_f3/Class/CDC/Inc/usbd_cdc.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Class/CDC/Inc/usbd_cdc.h rename to framework/libs/st_usb_f3/Class/CDC/Inc/usbd_cdc.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Class/CDC/Src/usbd_cdc.c b/framework/libs/st_usb_f3/Class/CDC/Src/usbd_cdc.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Class/CDC/Src/usbd_cdc.c rename to framework/libs/st_usb_f3/Class/CDC/Src/usbd_cdc.c diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Class/DFU/Inc/usbd_dfu.h b/framework/libs/st_usb_f3/Class/DFU/Inc/usbd_dfu.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Class/DFU/Inc/usbd_dfu.h rename to framework/libs/st_usb_f3/Class/DFU/Inc/usbd_dfu.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Class/DFU/Src/usbd_dfu.c b/framework/libs/st_usb_f3/Class/DFU/Src/usbd_dfu.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Class/DFU/Src/usbd_dfu.c rename to framework/libs/st_usb_f3/Class/DFU/Src/usbd_dfu.c diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_core.h b/framework/libs/st_usb_f3/Core/Inc/usbd_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_core.h rename to framework/libs/st_usb_f3/Core/Inc/usbd_core.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_ctlreq.h b/framework/libs/st_usb_f3/Core/Inc/usbd_ctlreq.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_ctlreq.h rename to framework/libs/st_usb_f3/Core/Inc/usbd_ctlreq.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_def.h b/framework/libs/st_usb_f3/Core/Inc/usbd_def.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_def.h rename to framework/libs/st_usb_f3/Core/Inc/usbd_def.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_ioreq.h b/framework/libs/st_usb_f3/Core/Inc/usbd_ioreq.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Inc/usbd_ioreq.h rename to framework/libs/st_usb_f3/Core/Inc/usbd_ioreq.h diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_core.c b/framework/libs/st_usb_f3/Core/Src/usbd_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_core.c rename to framework/libs/st_usb_f3/Core/Src/usbd_core.c diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_ctlreq.c b/framework/libs/st_usb_f3/Core/Src/usbd_ctlreq.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_ctlreq.c rename to framework/libs/st_usb_f3/Core/Src/usbd_ctlreq.c diff --git a/framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_ioreq.c b/framework/libs/st_usb_f3/Core/Src/usbd_ioreq.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-2.4.2/Core/Src/usbd_ioreq.c rename to framework/libs/st_usb_f3/Core/Src/usbd_ioreq.c diff --git a/framework/libs/st_usb_f3/lib.mak b/framework/libs/st_usb_f3/lib.mak new file mode 100644 index 00000000..4a6b6067 --- /dev/null +++ b/framework/libs/st_usb_f3/lib.mak @@ -0,0 +1,9 @@ +ifneq (,$(findstring STM32F3, $(CPU))) + ifneq (,$(findstring ST_USB, $(LIBS))) + # lib path + LIBPATH = $(FRAMEWORK_DIR)/libs/st_usb_f3 + $(info using LIB: $(LIBPATH)) + + # peripheral include + endif +endif diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/inc/usbd_audio_core.h b/framework/libs/st_usb_f4/Class/audio/inc/usbd_audio_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/inc/usbd_audio_core.h rename to framework/libs/st_usb_f4/Class/audio/inc/usbd_audio_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/inc/usbd_audio_out_if.h b/framework/libs/st_usb_f4/Class/audio/inc/usbd_audio_out_if.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/inc/usbd_audio_out_if.h rename to framework/libs/st_usb_f4/Class/audio/inc/usbd_audio_out_if.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/src/usbd_audio_core.c b/framework/libs/st_usb_f4/Class/audio/src/usbd_audio_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/src/usbd_audio_core.c rename to framework/libs/st_usb_f4/Class/audio/src/usbd_audio_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/src/usbd_audio_out_if.c b/framework/libs/st_usb_f4/Class/audio/src/usbd_audio_out_if.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/audio/src/usbd_audio_out_if.c rename to framework/libs/st_usb_f4/Class/audio/src/usbd_audio_out_if.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_core.h b/framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_core.h rename to framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_core_loopback.h b/framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_core_loopback.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_core_loopback.h rename to framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_core_loopback.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_if_template.h b/framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_if_template.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/inc/usbd_cdc_if_template.h rename to framework/libs/st_usb_f4/Class/cdc/inc/usbd_cdc_if_template.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_core.c b/framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_core.c rename to framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_core_loopback.c b/framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_core_loopback.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_core_loopback.c rename to framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_core_loopback.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_if_template.c b/framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_if_template.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/cdc/src/usbd_cdc_if_template.c rename to framework/libs/st_usb_f4/Class/cdc/src/usbd_cdc_if_template.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/customhid/inc/usbd_customhid_core.h b/framework/libs/st_usb_f4/Class/customhid/inc/usbd_customhid_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/customhid/inc/usbd_customhid_core.h rename to framework/libs/st_usb_f4/Class/customhid/inc/usbd_customhid_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/customhid/src/usbd_customhid_core.c b/framework/libs/st_usb_f4/Class/customhid/src/usbd_customhid_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/customhid/src/usbd_customhid_core.c rename to framework/libs/st_usb_f4/Class/customhid/src/usbd_customhid_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_dfu_core.h b/framework/libs/st_usb_f4/Class/dfu/inc/usbd_dfu_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_dfu_core.h rename to framework/libs/st_usb_f4/Class/dfu/inc/usbd_dfu_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_dfu_mal.h b/framework/libs/st_usb_f4/Class/dfu/inc/usbd_dfu_mal.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_dfu_mal.h rename to framework/libs/st_usb_f4/Class/dfu/inc/usbd_dfu_mal.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_flash_if.h b/framework/libs/st_usb_f4/Class/dfu/inc/usbd_flash_if.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_flash_if.h rename to framework/libs/st_usb_f4/Class/dfu/inc/usbd_flash_if.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_mem_if_template.h b/framework/libs/st_usb_f4/Class/dfu/inc/usbd_mem_if_template.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_mem_if_template.h rename to framework/libs/st_usb_f4/Class/dfu/inc/usbd_mem_if_template.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_otp_if.h b/framework/libs/st_usb_f4/Class/dfu/inc/usbd_otp_if.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/inc/usbd_otp_if.h rename to framework/libs/st_usb_f4/Class/dfu/inc/usbd_otp_if.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_dfu_core.c b/framework/libs/st_usb_f4/Class/dfu/src/usbd_dfu_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_dfu_core.c rename to framework/libs/st_usb_f4/Class/dfu/src/usbd_dfu_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_dfu_mal.c b/framework/libs/st_usb_f4/Class/dfu/src/usbd_dfu_mal.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_dfu_mal.c rename to framework/libs/st_usb_f4/Class/dfu/src/usbd_dfu_mal.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_flash_if.c b/framework/libs/st_usb_f4/Class/dfu/src/usbd_flash_if.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_flash_if.c rename to framework/libs/st_usb_f4/Class/dfu/src/usbd_flash_if.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_mem_if_template.c b/framework/libs/st_usb_f4/Class/dfu/src/usbd_mem_if_template.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_mem_if_template.c rename to framework/libs/st_usb_f4/Class/dfu/src/usbd_mem_if_template.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_otp_if.c b/framework/libs/st_usb_f4/Class/dfu/src/usbd_otp_if.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/dfu/src/usbd_otp_if.c rename to framework/libs/st_usb_f4/Class/dfu/src/usbd_otp_if.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid/inc/usbd_hid_core.h b/framework/libs/st_usb_f4/Class/hid/inc/usbd_hid_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid/inc/usbd_hid_core.h rename to framework/libs/st_usb_f4/Class/hid/inc/usbd_hid_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid/src/usbd_hid_core.c b/framework/libs/st_usb_f4/Class/hid/src/usbd_hid_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid/src/usbd_hid_core.c rename to framework/libs/st_usb_f4/Class/hid/src/usbd_hid_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_cdc_wrapper/inc/usbd_hid_cdc_wrapper.h b/framework/libs/st_usb_f4/Class/hid_cdc_wrapper/inc/usbd_hid_cdc_wrapper.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_cdc_wrapper/inc/usbd_hid_cdc_wrapper.h rename to framework/libs/st_usb_f4/Class/hid_cdc_wrapper/inc/usbd_hid_cdc_wrapper.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_cdc_wrapper/src/usbd_hid_cdc_wrapper.c b/framework/libs/st_usb_f4/Class/hid_cdc_wrapper/src/usbd_hid_cdc_wrapper.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_cdc_wrapper/src/usbd_hid_cdc_wrapper.c rename to framework/libs/st_usb_f4/Class/hid_cdc_wrapper/src/usbd_hid_cdc_wrapper.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_msc_wrapper/inc/usbd_msc_hid_core.h b/framework/libs/st_usb_f4/Class/hid_msc_wrapper/inc/usbd_msc_hid_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_msc_wrapper/inc/usbd_msc_hid_core.h rename to framework/libs/st_usb_f4/Class/hid_msc_wrapper/inc/usbd_msc_hid_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_msc_wrapper/src/usbd_msc_hid_core.c b/framework/libs/st_usb_f4/Class/hid_msc_wrapper/src/usbd_msc_hid_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/hid_msc_wrapper/src/usbd_msc_hid_core.c rename to framework/libs/st_usb_f4/Class/hid_msc_wrapper/src/usbd_msc_hid_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_bot.h b/framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_bot.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_bot.h rename to framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_bot.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_core.h b/framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_core.h rename to framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_data.h b/framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_data.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_data.h rename to framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_data.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_mem.h b/framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_mem.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_mem.h rename to framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_mem.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_scsi.h b/framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_scsi.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/inc/usbd_msc_scsi.h rename to framework/libs/st_usb_f4/Class/msc/inc/usbd_msc_scsi.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_bot.c b/framework/libs/st_usb_f4/Class/msc/src/usbd_msc_bot.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_bot.c rename to framework/libs/st_usb_f4/Class/msc/src/usbd_msc_bot.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_core.c b/framework/libs/st_usb_f4/Class/msc/src/usbd_msc_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_core.c rename to framework/libs/st_usb_f4/Class/msc/src/usbd_msc_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_data.c b/framework/libs/st_usb_f4/Class/msc/src/usbd_msc_data.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_data.c rename to framework/libs/st_usb_f4/Class/msc/src/usbd_msc_data.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_scsi.c b/framework/libs/st_usb_f4/Class/msc/src/usbd_msc_scsi.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_msc_scsi.c rename to framework/libs/st_usb_f4/Class/msc/src/usbd_msc_scsi.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_storage_template.c b/framework/libs/st_usb_f4/Class/msc/src/usbd_storage_template.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Class/msc/src/usbd_storage_template.c rename to framework/libs/st_usb_f4/Class/msc/src/usbd_storage_template.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_conf_template.h b/framework/libs/st_usb_f4/Core/inc/usbd_conf_template.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_conf_template.h rename to framework/libs/st_usb_f4/Core/inc/usbd_conf_template.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_core.h b/framework/libs/st_usb_f4/Core/inc/usbd_core.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_core.h rename to framework/libs/st_usb_f4/Core/inc/usbd_core.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_def.h b/framework/libs/st_usb_f4/Core/inc/usbd_def.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_def.h rename to framework/libs/st_usb_f4/Core/inc/usbd_def.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_ioreq.h b/framework/libs/st_usb_f4/Core/inc/usbd_ioreq.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_ioreq.h rename to framework/libs/st_usb_f4/Core/inc/usbd_ioreq.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_req.h b/framework/libs/st_usb_f4/Core/inc/usbd_req.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_req.h rename to framework/libs/st_usb_f4/Core/inc/usbd_req.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_usr.h b/framework/libs/st_usb_f4/Core/inc/usbd_usr.h similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/inc/usbd_usr.h rename to framework/libs/st_usb_f4/Core/inc/usbd_usr.h diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_core.c b/framework/libs/st_usb_f4/Core/src/usbd_core.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_core.c rename to framework/libs/st_usb_f4/Core/src/usbd_core.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_ioreq.c b/framework/libs/st_usb_f4/Core/src/usbd_ioreq.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_ioreq.c rename to framework/libs/st_usb_f4/Core/src/usbd_ioreq.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_req.c b/framework/libs/st_usb_f4/Core/src/usbd_req.c similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Core/src/usbd_req.c rename to framework/libs/st_usb_f4/Core/src/usbd_req.c diff --git a/framework/libs/STM32_USB_Device_Library-1.2.0/Release_Notes.html b/framework/libs/st_usb_f4/Release_Notes.html similarity index 100% rename from framework/libs/STM32_USB_Device_Library-1.2.0/Release_Notes.html rename to framework/libs/st_usb_f4/Release_Notes.html diff --git a/framework/libs/st_usb_f4/lib.mak b/framework/libs/st_usb_f4/lib.mak new file mode 100644 index 00000000..4c19096e --- /dev/null +++ b/framework/libs/st_usb_f4/lib.mak @@ -0,0 +1,15 @@ +ifneq (,$(findstring STM32F4, $(CPU))) + ifneq (,$(findstring ST_USB, $(LIBS))) + # lib path + LIBPATH = $(FRAMEWORK_DIR)/libs/st_usb_f4 + $(info using LIB: $(LIBPATH)) + + # peripheral include + INCDIRS := $(INCDIRS) $(LIBPATH)/Class/cdc/inc + INCDIRS := $(INCDIRS) $(LIBPATH)/Core/inc + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Class/cdc/src/usbd_cdc_core.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Core/src/usbd_core.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Core/src/usbd_ioreq.c + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/Core/src/usbd_req.c + endif +endif diff --git a/framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usb_conf.h b/framework/libs/st_vcp/inc/usb_conf.h similarity index 100% rename from framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usb_conf.h rename to framework/libs/st_vcp/inc/usb_conf.h diff --git a/framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usbd_conf.h b/framework/libs/st_vcp/inc/usbd_conf.h similarity index 100% rename from framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usbd_conf.h rename to framework/libs/st_vcp/inc/usbd_conf.h diff --git a/framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usbd_desc.h b/framework/libs/st_vcp/inc/usbd_desc.h similarity index 100% rename from framework/libs/STM32_USB_Device_VCP-1.2.0/inc/usbd_desc.h rename to framework/libs/st_vcp/inc/usbd_desc.h diff --git a/framework/libs/st_vcp/lib.mak b/framework/libs/st_vcp/lib.mak new file mode 100644 index 00000000..627b135c --- /dev/null +++ b/framework/libs/st_vcp/lib.mak @@ -0,0 +1,9 @@ +ifneq (,$(findstring ST_VCP, $(LIBS))) + # lib path + LIBPATH = $(FRAMEWORK_DIR)/libs/st_vcp + $(info using LIB: $(LIBPATH)) + + # peripheral include + INCDIRS := $(INCDIRS) $(LIBPATH)/inc + LIBSOURCES := $(LIBSOURCES) $(LIBPATH)/src/usbd_desc.c +endif \ No newline at end of file diff --git a/framework/libs/STM32_USB_Device_VCP-1.2.0/src/usbd_desc.c b/framework/libs/st_vcp/src/usbd_desc.c similarity index 100% rename from framework/libs/STM32_USB_Device_VCP-1.2.0/src/usbd_desc.c rename to framework/libs/st_vcp/src/usbd_desc.c diff --git a/framework/libs/STM32_USB_Device_VCP-1.2.0/src/usbd_usr.c b/framework/libs/st_vcp/src/usbd_usr.c similarity index 100% rename from framework/libs/STM32_USB_Device_VCP-1.2.0/src/usbd_usr.c rename to framework/libs/st_vcp/src/usbd_usr.c diff --git a/framework/tools/create_cmd.py b/framework/tools/create_cmd.py index b1aa4c1d..917ad126 100755 --- a/framework/tools/create_cmd.py +++ b/framework/tools/create_cmd.py @@ -5,7 +5,7 @@ import sys cmd = [] for infile in sys.argv[2:]: - with open(infile) as f: + with open(infile, errors='ignore') as f: for line_number, line in enumerate(f): match = re.search('COMMAND\("(\w*)", *(\w*), *"([^"]*)"\);', line) if match: diff --git a/stmbl/f4/Makefile b/stmbl/f4/Makefile index 553506b2..edd7c267 100644 --- a/stmbl/f4/Makefile +++ b/stmbl/f4/Makefile @@ -11,10 +11,13 @@ HWVERSION = v4 LIBS = ST_SPL LIBS += CMSIS LIBS += ST_USB +LIBS += ST_VCP +LIBS += ST_OTG LIBS += HAL LIBS += STMBLTALK LIBS += CONF LIBS += CMD +LIBS += MISC PERIPH += TIM PERIPH += UART @@ -30,7 +33,18 @@ PERIPH += DMA SOURCES += $(wildcard src/*.c) -SHARED_COMPS += $(wildcard ../../framework/comps/*.c) +INCDIRS += ../shared/inc/ +SHAREDSOURCES += $(wildcard ../shared/src/*.c) + +LIB_COMPS += $(wildcard ../../framework/comps/*.c) + +SRC_COMPS += $(wildcard src/comps/*.c) + +LIB_COMPS += $(wildcard ../../framework/comps/motor_ctr/*.c) +LIB_COMPS += $(wildcard ../../framework/comps/motor_model/*.c) +LIB_COMPS += $(wildcard ../../framework/comps/fb/*.c) +LIB_COMPS += $(wildcard ../../framework/comps/misc/*.c) + ifeq ($(HWVERSION),v3) SRC_COMPS += src/comps/hw/io3.c @@ -55,25 +69,19 @@ else CFLAGS += -DV4 endif -SRC_COMPS += $(wildcard src/comps/*.c) - -SHARED_COMPS += $(wildcard ../../framework/comps/motor_ctr/*.c) -SHARED_COMPS += $(wildcard ../../framework/comps/motor_model/*.c) -SHARED_COMPS += $(wildcard ../../framework/comps/fb/*.c) -SHARED_COMPS += $(wildcard ../../framework/comps/misc/*.c) CONFIG_TEMPLATES += $(wildcard conf/template/*.txt) -OBJECTS += ../f3/build/fw.o +# OBJECTS += ../f3/build/fw.o -../f3/build/fw.o: force_look - $(MAKE) -C ../f3/ - $(OBJCOPY) --rename-section .data=.hv_firmware -I binary ../f3/build/fw.bin -B arm -O elf32-littlearm ../f3/build/fw.o +# ../f3/build/fw.o: force_look +# $(MAKE) -C ../f3/ +# $(OBJCOPY) --rename-section .data=.hv_firmware -I binary ../f3/build/fw.bin -B arm -O elf32-littlearm ../f3/build/fw.o -build/fw_all.bin: f4_boot/build/fw.bin conf/festo.txt build/fw.bin - cat f4_boot/build/fw.bin /dev/zero | head -c 32768 > build/fw_all.bin - cat conf/festo.txt /dev/zero | head -c 32768 >> build/fw_all.bin - cat build/fw.bin >> build/fw_all.bin +# build/fw_all.bin: f4_boot/build/fw.bin conf/festo.txt build/fw.bin +# cat f4_boot/build/fw.bin /dev/zero | head -c 32768 > build/fw_all.bin +# cat conf/festo.txt /dev/zero | head -c 32768 >> build/fw_all.bin +# cat build/fw.bin >> build/fw_all.bin # Include the base rules #