Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware support #78

Open
ussserrr opened this issue Aug 8, 2021 · 4 comments
Open

Middleware support #78

ussserrr opened this issue Aug 8, 2021 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@ussserrr
Copy link
Owner

ussserrr commented Aug 8, 2021

FreeRTOS, etc.

@ussserrr ussserrr added enhancement New feature or request question Further information is requested labels Aug 8, 2021
@cooked
Copy link

cooked commented Sep 16, 2021

Hi @ussserrr I'm currently working on a project that uses USB CDC middleware. I stumbled on the related posts on platformio forum and then on this issue.
At the moment I'm testing the workaround described there to let CubeMX generate the middleware USB code, then copy the Middleware folders as well as the Application file over to the platformio project
stm32pio middleware support will streamline and make the whole process way neater
any estimate of when this will be implemented ?

@ussserrr
Copy link
Owner Author

ussserrr commented Sep 16, 2021

Hello. I think middlewares are too broad to cover all of them. If you can describe needed workflow as detailed as possible, provide an example, then I will try to implement this feature. For example:

  • What options should CubeMX .ioc project have?
  • Where generated code should be placed?
  • How platformio.ini config should be tweaked to be able to compile?

Maybe you can list some PlatformIO cases where it is used to build such a code generated by the CubeMX. Specify a target MCU/family, kind of middleware, etc. Currently, I don't have much free time, though, so I can't tell you exactly how long this will take.

@cooked
Copy link

cooked commented Dec 5, 2021

sorry for the late late response. I found quite often in need of the USB functionality so I would start with just that one. I think this is quite general use case on fro stm32f1 and stm32f4 family of mcus and dev boarads.
Trying to fish out the info from a project I have now:

  • .ioc options (not sure if this is all of them though)
    USB_DEVICE.CLASS_NAME_FS=CDC
    USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS
    USB_DEVICE.VirtualMode=Cdc
    USB_DEVICE.VirtualModeFS=Cdc_FS
    USB_OTG_FS.IPParameters=VirtualMode
    USB_OTG_FS.VirtualMode=Device_Only
    VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS
    VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS

  • generated code I currently put it in a structure like one below, but possibly that can be put in lib where it gets picked up by platformio automatically
    image

  • platformio.ini shall have the following added (in case of the location above)
    lib_extra_dirs =
    Middlewares/ST/STM32_USB_Device_Library

@ussserrr
Copy link
Owner Author

ussserrr commented Jan 9, 2022

@cooked OK, I'll take a look at it. Though, it seems like the only thing stm32pio should do here is to add the lib_extra_dirs option to the platformio.ini, not necessarily a complex task...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants