CubeMXImporter icon indicating copy to clipboard operation
CubeMXImporter copied to clipboard

New CMSIS Directory Structure

Open tiazahmd opened this issue 4 years ago • 4 comments

According to the book (and the script), there are changes to the directory structure that is not compatible anymore. The book and the script used the following directory structure:

Project Root
    |_ Inc
    |_ Src
    |_ Drivers
        |_ CMSIS
            |_ Include
            |_ Device
        |_ STM32XX_HAL_Driver

The new directory structure for CubeMX is as follows:

Project Root
    |_ startup
    |_ Core
        |_ Inc
        |_ Src
    |_ Drivers
        |_ CMSIS
            |_ Device
                |_ ST
                    |_ STM32xxF4xx
                        |_ Source
                            |_ Templates
                        |_ Include
            |_ Include
        |_ STM32xx_HAL_Driver
            |_ Src
            |_ Inc
                |_ Legacy

I've seen this structure with Nucleo F411RE. I'm not sure if it's a universal directory structure change, or is only applicable for this board. If it's a universal change, I modified the script to make sure it runs properly.

If the directory structure has changed universally, is it okay for me to submit a pull request for this?

tiazahmd avatar Aug 09 '20 02:08 tiazahmd

I am using stmCubeMX v5.0.1 --

The new structure you are talking about is generated when you select advance application structure while generating the code. Indicated below - Annotation 2020-09-03 234735

When you generate the code with basic application structure selected then you will get directory structure indicated in script or book.

Rahulelectobuddy avatar Sep 03 '20 18:09 Rahulelectobuddy

@Rahulelectobuddy , that makes sense. I've used both CubeMx 5 and STM32CubeIDE and in both of them, the Application Structure is greyed out (like you have on the screenshot) and I'm not sure how to turn it on. Can you help? Thanks.

tiazahmd avatar Sep 23 '20 18:09 tiazahmd

@tiazahmd, you can change application structure to advance or basic without changing any setting (default). Try creating a new project and then changing structure.

Rahulelectobuddy avatar Oct 03 '20 03:10 Rahulelectobuddy

For an already existing project, if the option to change application structure is greyed out simply "Save As..." under the same project name/directory (effectively overwriting the project with itself). The option to change application structure will then become available again.

git-dc avatar Feb 10 '21 17:02 git-dc