Menu

#68 Create a STM32CubeMX compatible project

Next Release
open-accepted
None
5
2015-08-05
2014-09-24
No

Hi, I've found this module very interesting but during a New Project creation, in "Folder Settings" I can't introduce multiple path and I can't use "/" or "\" simbol.
My intent is to recreate a STM32CubeMX (TRUEStudio 4.3.1) directory structure compatible project.

Discussion

1 2 > >> (Page 1 of 2)
  • Liviu Ionescu (ilg)

    I'll investigate.

     
  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Mauro Soligo

    Mauro Soligo - 2014-09-24

    Ok, attached can you find most complex structure that can be generated with STM32CubeMX.

    This is the worst case but, if can be made a template with this structure, usage of STM32CubeMX with eclipse & GCC can be very simple.

     
  • Liviu Ionescu (ilg)

    btw, why would you need the STM32CubeMX folder structure? it took me quite some time to experiment and reach the current structure, which simplifies configuration.

     
  • Mauro Soligo

    Mauro Soligo - 2014-09-24

    I've found easy a "complex" project creation with Cube.
    USB ( endpoint, VID, etc... ) and other device configuration can be done in some minute and if I can Keep this project structure I can update project ( change configuration for example ) in some seconds.

     
  • Liviu Ionescu (ilg)

    I'm not able to follow you. could you provide more details on the desired use case? (exact steps you want to perform).

     
  • Myzhar

    Myzhar - 2014-09-24

    Hi Liviu, I found this post really interesting.
    Stm32CubeMX is a tool to semplify the configuration of a system based on STm32Fxxx MCU.
    It allows to configurate every peripheral using a graphic interface and generates "starting" C code letting you to spend time only on your code.
    The problem with STm32CubeMX is that it creates project only for IAR, TrueStudio and Keil environments, while it should be very useful to have a project for Eclipse and free GCC compiler (e.g. Linaro) that does not have "license limitation".
    Your Eclipse plugin seems to be a good starting point for this kind of task.

     

    Last edit: Myzhar 2014-09-24
  • Mauro Soligo

    Mauro Soligo - 2014-09-24

    Ho, good, Myzhar have explained my idea very well ( my English is terrible :( ).

    If I can create a project with same STM32CubeMX structure I can import easly project from Cube.

     
  • Liviu Ionescu (ilg)

    I can import easly project from Cube.

    Since Stm32CubeMX does not generate GCC projects, I still do not see the point, how would you like to import their projects?

    My plug-in generates simpler projects, currently with fixed content, and I plan to migrate it to use CMSIS Packs content, but I have no plans to replicate the full Stm32CubeMX functionality.

     
  • Myzhar

    Myzhar - 2014-09-24

    I think that you do not need to replicate the full functionality of Stm32CubeMX. The code generated by Stm32CubeMX is compatible with every toolchain.
    The problem is only the makefile and the linker script...

     
    • Liviu Ionescu (ilg)

      The problem is ... the linker script...

      things are slightly more complicated, the linker script must match the startup and the memory allocator.

      what you can do is to generate the project with the template, copy/paste the structure generated by any other tool, including the Stm32CubeMX, remove duplicate files and update the include paths.

       
  • Mauro Soligo

    Mauro Soligo - 2014-09-24

    In any case, if I can use "/" or "\" char and I can insert multiple path in folder location problem may be solved.

     
    • Liviu Ionescu (ilg)

      I guess the problem is only in the validation strings, that accepts only alpha-numerical characters.

      I'll probably relax the restriction to accept '/' too.

       
  • Mauro Soligo

    Mauro Soligo - 2014-09-25

    and ";" to concatenate more path :)

     
    • Liviu Ionescu (ilg)

      nope, in Folder Settings the path should be unique.

       
  • Mauro Soligo

    Mauro Soligo - 2014-09-25

    Ok, but, I'm curious, why not? a project with multiple path for include or source file is common.
    For example I divide source in function-specific folder ( Src\Comunication\ Src\Memory\ )

     
  • Liviu Ionescu (ilg)

    because the path definitions in Folder Settings are used as file copy destinations during project creation.

     

    Last edit: Liviu Ionescu (ilg) 2014-09-25
  • Mauro Soligo

    Mauro Soligo - 2014-09-29

    ok, I understand... but in this mode I can't create standard folder structure, for example "STM32F37x_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F37x_StdPeriph_Driver/inc"... as also writed in your README_STDPERIPH_37x.txt file.

     
  • Liviu Ionescu (ilg)

    any concrete suggestion? can we close this ticket now?

     
  • Mauro Soligo

    Mauro Soligo - 2014-10-13

    Can you add "/" and "\" support?
    this is a firs improve.

    After that, standard CMSIS and Library ST directory structures are preferred for me but if is impossible ok.

     
  • Liviu Ionescu (ilg)

    Can you add "/" and "\" support?

    I jut added '/'. In the civilised world '\' has a different meaning (escape), so it cannot be added easily in this context.

    please check the beta version available from updates-test and let me know the result.

    standard CMSIS and Library ST directory structures

    there is no such thing as 'standard CMSIS directory'. CMSIS specifies the file names and content, not location.

     
    • Mauro Soligo

      Mauro Soligo - 2014-10-13

      ST provide .zip file with a precise folder structure used as standard in a lot of project... this is a standard de facto.

       
  • Liviu Ionescu (ilg)

    ok, in the next version of the templates engine I'll consider an even more flexible way of defining folder locations, but for now I'm afraid there is not much more that can be done.

     
  • Richard Tomkins

    Richard Tomkins - 2015-04-08

    There are two distinct advantages that I see to making use of STM32CubeMX.

    1. STM does all the updates on the building blocks for generating ARM code, thus freeing Mr. Ionescu up to only working on the glue (GNU ARM Eclipse Plug-ins) that connects the stuff that generates the code.
    2. Adopting the standard structures that STM uses now and will continue to do so in the future with new microcontrollers, and enabling people to easily build FreeRTOS, FAT and TCP/IP.
      Given that the folks at STM already build and maintain GNU GCC Toolchain, that would seem to indicate that they have some interest in the continued success of GCC and related projects.
     
    • Liviu Ionescu (ilg)

      you are right, there are advantages of using the CubeMX, but the conclusion is that what is missing is a method to import the Cube projects.

       
1 2 > >> (Page 1 of 2)