Skip to content

Commit

Permalink
fixed compilation error in SPKR, RNDIS & ECM for F1 device.
Browse files Browse the repository at this point in the history
  • Loading branch information
alambe94 committed Dec 16, 2021
1 parent 8047404 commit c70d3fa
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<license>I-CUBE-USBD-Composite/LICENSE.txt</license>
<supportContact>[email protected]</supportContact>
<releases>
<release date="2021-09-24" tag="BETA" version="1.0.1">6.1.1</release>
<release date="2021-12-16" version="1.0.2">V6 cubeMX</release>
<release date="2021-12-16" tag="BETA" version="1.0.1">6.1.1</release>
<release date="2020-01-29" version="1.0.0">6.1.1</release>
</releases>
<keywords>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" DBVersion="V4.0" Name="I-CUBE-USBD-COMPOSITE" RootFolder="Packs/AL94/I-CUBE-USBD-COMPOSITE/1.0.1/" Version="1.0.1" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/thirdPartyDb.xsd">
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" DBVersion="V4.0" Name="I-CUBE-USBD-COMPOSITE" RootFolder="Packs/AL94/I-CUBE-USBD-COMPOSITE/1.0.2/" Version="1.0.2" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/thirdPartyDb.xsd">
<RefConfig Name="USBJjComposite">
<Component Name="CompositeCcUSB:COMPOSITE:Core:$CompositeCcUSBJjCOMPOSITEJjCore"/>
<Component Name="CompositeCcUSB:COMPOSITE:CDCIiACM:$CompositeCcUSBJjCOMPOSITEJjCDCIiACM"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" DBVersion="V4.0" IPType="Thirdparty" IpGroup="Additional Software" Name="AL94.I-CUBE-USBD-COMPOSITE" Version="1.0.1" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd">
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" DBVersion="V4.0" IPType="Thirdparty" IpGroup="Additional Software" Name="AL94.I-CUBE-USBD-COMPOSITE" Version="1.0.2" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd">
<!--Generated by CubeMX-->
<RefMode Abstract="true" Name="USBJjComposite">
<ConfigForMode>USBJjComposite</ConfigForMode>
Expand Down Expand Up @@ -38,13 +38,13 @@
<ModeLogicOperator Name="OR">
<Mode Name="USBJjComposite">
<SignalLogicalOp Name="AND">
<Signal Name="VS_USBJjComposite_1.0.0_1.0.1"/>
<Signal Name="VS_USBJjComposite_1.0.0_1.0.2"/>
</SignalLogicalOp>
</Mode>
</ModeLogicOperator>
</Mode>
</ModeLogicOperator>
<RefSignal Name="VS_USBJjComposite_1.0.0_1.0.1" Virtual="true"/>
<RefSignal Name="VS_USBJjComposite_1.0.0_1.0.2" Virtual="true"/>
<RefParameter Comment="Core" DefaultValue="false" Group="Software component selection" Name="CompositeCcUSBJjCOMPOSITEJjCore" TabName="USBJjComposite" Type="boolean" Visible="false">
<PossibleValue Comment="ENABLE" Semaphore="SEMCompositeCcUSBJjCOMPOSITEJjCore" Value="true"/>
<PossibleValue Comment="DISABLE" Value="false"/>
Expand Down Expand Up @@ -156,7 +156,8 @@
<PossibleValue Comment="false" Value="false"/>
</RefParameter>
<RefParameter Added="true" Comment="STM32F1_DEVICE" DefaultValue="false" Group="Basic Parameters" Name="_STM32F1_DEVICE" TabName="Parameter Settings" Type="boolean">
<Description>If device is STM32F1 or similar HAL_PCDEx_PMAConfig() is used by driver.
<Description>If device is STM32F1 or similar.
HAL_PCDEx_PMAConfig() is used by driver.
For H7 HAL_PCDEx_SetTxFiFo() is use.</Description>
<PossibleValue Comment="true" Value="true"/>
<PossibleValue Comment="false" Value="false"/>
Expand Down
3 changes: 2 additions & 1 deletion I-CUBE-USBD-COMPOSITE/.project/projectFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<license>C:/Users/lambe/STM32CubeIDE/workspace_1.3.0/I-CUBE-USBD-Composite/LICENSE.txt::I-CUBE-USBD-Composite/LICENSE.txt</license>
<supportContact>[email protected]</supportContact>
<releases>
<release date="2021-09-24" tag="BETA" version="1.0.1">6.1.1</release>
<release date="2021-12-16" version="1.0.2">V6 cubeMX</release>
<release date="2021-12-16" tag="BETA" version="1.0.1">6.1.1</release>
<release date="2020-01-29" version="1.0.0">6.1.1</release>
</releases>
<keywords>
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions USBD_Test/.mxproject
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ SourceFiles=;

[ThirdPartyIp]
ThirdPartyIpNumber=1
ThirdPartyIpName#0=AL94.I-CUBE-USBD-COMPOSITE.1.0.1
ThirdPartyIpName#0=AL94.I-CUBE-USBD-COMPOSITE.1.0.2

[ThirdPartyIp#AL94.I-CUBE-USBD-COMPOSITE.1.0.1]
[ThirdPartyIp#AL94.I-CUBE-USBD-COMPOSITE.1.0.2]
header=Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Inc/usbd_msc.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Inc/usbd_msc_bot.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Inc/usbd_msc_data.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Inc/usbd_msc_scsi.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_msc_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_KEYBOARD/Inc/usbd_hid_keyboard.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_CUSTOM/Inc/usbd_hid_custom.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_hid_custom_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Inc/usbd_core.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Inc/usbd_ctlreq.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Inc/usbd_def.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Inc/usbd_ioreq.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usb_device.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_desc.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Target/usbd_conf.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/DFU/Inc/usbd_dfu.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_dfu_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/PRINTER/Inc/usbd_printer.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_printer_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_MOUSE/Inc/usbd_hid_mouse.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_MIC/Inc/usbd_audio_mic.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_audio_mic_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_COMMON/usbd_audio.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/COMPOSITE/Inc/usbd_composite.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_SPKR/Inc/usbd_audio_spkr.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_audio_spkr_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_COMMON/usbd_audio.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_ACM/Inc/usbd_cdc_acm.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_acm_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/VIDEO/Inc/usbd_video.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_video_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_RNDIS/Inc/usbd_cdc_rndis.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_rndis_if.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_ECM/Inc/usbd_cdc_ecm.h;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_ecm_if.h;
source=Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Src/usbd_msc.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Src/usbd_msc_bot.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Src/usbd_msc_data.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/MSC/Src/usbd_msc_scsi.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_msc_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_KEYBOARD/Src/usbd_hid_kayboard.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_CUSTOM/Src/usbd_hid_custom.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_hid_custom_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Src/usbd_core.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Src/usbd_ctlreq.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Core/Src/usbd_ioreq.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usb_device.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_desc.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Target/usbd_conf.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/DFU/Src/usbd_dfu.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_dfu_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/PRINTER/Src/usbd_printer.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_printer_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_MOUSE/Src/usbd_hid_mouse.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_MIC/Src/usbd_audio_mic.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_audio_mic_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/COMPOSITE/Src/usbd_composite.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/AUDIO_SPKR/Src/usbd_audio_spkr.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_audio_spkr_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_ACM/Src/usbd_cdc_acm.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_acm_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/VIDEO/Src/usbd_video.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_video_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_RNDIS/Src/usbd_cdc_rndis.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_rndis_if.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/CDC_ECM/Src/usbd_cdc_ecm.c;Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/App/usbd_cdc_ecm_if.c;

4 changes: 2 additions & 2 deletions USBD_Test/.settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1329806429583112657" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1127203537233001155" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

Expand All @@ -37,7 +37,7 @@

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1329806429583112657" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1127203537233001155" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ typedef struct USBD_COMPOSITE_CFG_DESC_t
#if (USBD_USE_CDC_RNDIS == 1)
uint8_t USBD_CDC_RNDIS_DESC[CDC_RNDIS_CONFIG_DESC_SIZE - 0x09];
#endif
#if (USBD_USE_CDC_ACM == 1)
uint8_t USBD_CDC_ACM_DESC[USB_CDC_CONFIG_DESC_SIZ - 0x09];
#endif
#if (USBD_USE_CDC_ECM == 1)
uint8_t USBD_CDC_ECM_DESC[CDC_ECM_CONFIG_DESC_SIZE - 0x09];
#endif
Expand Down Expand Up @@ -157,6 +154,9 @@ typedef struct USBD_COMPOSITE_CFG_DESC_t
#if (USBD_USE_PRNTR == 1)
uint8_t USBD_PRNTR_DESC[USB_PRNT_CONFIG_DESC_SIZE - 0x09];
#endif
#if (USBD_USE_CDC_ACM == 1)
uint8_t USBD_CDC_ACM_DESC[USB_CDC_CONFIG_DESC_SIZ - 0x09];
#endif

} __PACKED USBD_COMPOSITE_CFG_DESC_t;

Expand Down Expand Up @@ -926,33 +926,6 @@ void USBD_COMPOSITE_Mount_Class(void)
USBD_Track_String_Index += 1;
#endif

#if (USBD_USE_CDC_ACM == 1)
ptr = USBD_CDC_ACM.GetFSConfigDescriptor(&len);
USBD_Update_CDC_ACM_DESC(ptr,
interface_no_track,
interface_no_track + 1,
in_ep_track,
in_ep_track + 1,
out_ep_track,
USBD_Track_String_Index);
memcpy(USBD_COMPOSITE_FSCfgDesc.USBD_CDC_ACM_DESC, ptr + 0x09, len - 0x09);

ptr = USBD_CDC_ACM.GetHSConfigDescriptor(&len);
USBD_Update_CDC_ACM_DESC(ptr,
interface_no_track,
interface_no_track + 1,
in_ep_track,
in_ep_track + 1,
out_ep_track,
USBD_Track_String_Index);
memcpy(USBD_COMPOSITE_HSCfgDesc.USBD_CDC_ACM_DESC, ptr + 0x09, len - 0x09);

in_ep_track += 2 * USBD_CDC_ACM_COUNT;
out_ep_track += 1 * USBD_CDC_ACM_COUNT;
interface_no_track += 2 * USBD_CDC_ACM_COUNT;
USBD_Track_String_Index += USBD_CDC_ACM_COUNT;
#endif

#if (USBD_USE_CDC_ECM == 1)
ptr = USBD_CDC_ECM.GetFSConfigDescriptor(&len);
USBD_Update_CDC_ECM_DESC(ptr,
Expand Down Expand Up @@ -1116,6 +1089,33 @@ void USBD_COMPOSITE_Mount_Class(void)
USBD_Track_String_Index += 1;
#endif

#if (USBD_USE_CDC_ACM == 1)
ptr = USBD_CDC_ACM.GetFSConfigDescriptor(&len);
USBD_Update_CDC_ACM_DESC(ptr,
interface_no_track,
interface_no_track + 1,
in_ep_track,
in_ep_track + 1,
out_ep_track,
USBD_Track_String_Index);
memcpy(USBD_COMPOSITE_FSCfgDesc.USBD_CDC_ACM_DESC, ptr + 0x09, len - 0x09);

ptr = USBD_CDC_ACM.GetHSConfigDescriptor(&len);
USBD_Update_CDC_ACM_DESC(ptr,
interface_no_track,
interface_no_track + 1,
in_ep_track,
in_ep_track + 1,
out_ep_track,
USBD_Track_String_Index);
memcpy(USBD_COMPOSITE_HSCfgDesc.USBD_CDC_ACM_DESC, ptr + 0x09, len - 0x09);

in_ep_track += 2 * USBD_CDC_ACM_COUNT;
out_ep_track += 1 * USBD_CDC_ACM_COUNT;
interface_no_track += 2 * USBD_CDC_ACM_COUNT;
USBD_Track_String_Index += USBD_CDC_ACM_COUNT;
#endif

uint16_t CFG_SIZE = sizeof(USBD_COMPOSITE_CFG_DESC_t);
ptr = USBD_COMPOSITE_HSCfgDesc.CONFIG_DESC;
/* Configuration Descriptor */
Expand Down
Loading

0 comments on commit c70d3fa

Please sign in to comment.