Wednesday , 27 January 2021
iten

USB middleware project


Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3389
    pedro
    Participant

    Ciao Carmine and All,

    I need to write a file in a USB Flash drive, so my board is going to be the host.

    This topic is not yet included in your book, but it seems to be implemented in the HAL libraries as middleware.

    Following your book I’ve been able to implement the ADC on my own, but now I can’t figure out how to manually import a project in Eclipse using middleware libraries. I guess Liviu’s plugin doesn’t include this stuff.

    I’d rather import the project from the STM32Cube_FW_F4 than generating and importing it with the CubeMX tool. The board for this project is a stm32f4Discovery.

    Could you tell me what folders I need to import and where should they been placed in the Eclipse project tree?

    Thank you very much.

    Regards,
    Pedro.

    #3391
    Carmine Noviello
    Keymaster

    Hi Pedro,
    I’ve plans to modify the CubeMXImporter tool so that it can import USB middleware library too, but I don’t know exactly when.

    If memory serves, you have to drag the Middleware folder as-is inside the root of the Eclipse project. Then you have to add to include paths (in project settings) all folders containing .h files

    “../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc”
    “../Middlewares/ST/STM32_USB_Device_Library/Core/Inc”

    This should be sufficient.

    #3410
    pedro
    Participant

    Thanks, Carmine.

    I’ll give it a try.

    #4725
    ramonpwr
    Participant

    Hi, sorry to bring this topic back up here.
    I’m trying to create an USB audio project, if I copy all the middleware .h and .c files to the root source and inc folders it compiles and works, but if I try to have the middlewares in a separate folder under the root I get a lot of undefined references.
    I’ve dragged and dropped the middlewares folder to my project’s root and then added the folders containing .h files into the C/C++ build settings under the GNU assembler, C complier and C++ compiler to no avail.

    I am sure I am missing something stupid but I seem to be unable to know what it is…

    thank you!

    #4729
    Carmine Noviello
    Keymaster

    Two things to check:

    • Location of .h files is correctly added to include paths
    • Folders containing .c files are not excluded from compilation (starts from the main folder)
    #4732
    ramonpwr
    Participant

    that was it, folders were indeed excluded.

    thank you so much Carmine


Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.