Skip to main content
Associate
August 21, 2023
Solved

What is the .mxproject used for?

  • August 21, 2023
  • 5 replies
  • 12086 views

Hi

The .mxproject is generated by STM32CubeMX in the code generation step.  What is this file used for? 

Thank you.

Pieter.

Best answer by Mahmoud Ben Romdhane

Hello @peks

First let me thank you for posting and welcome to ST Community.

The main purpose of the .mxproject file is to save parameters, configurations and pin mappings. This file is considered as the heart of the STM32 project. It contains information about the microcontroller selected like peripherals settings and middleware parameters. 

Thx.

Mahmoud.

 

5 replies

Technical Moderator
August 22, 2023

Hello @peks

First let me thank you for posting and welcome to ST Community.

The main purpose of the .mxproject file is to save parameters, configurations and pin mappings. This file is considered as the heart of the STM32 project. It contains information about the microcontroller selected like peripherals settings and middleware parameters. 

Thx.

Mahmoud.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Pavel A.
Super User
August 22, 2023

@Mahmoud Ben Romdhane is there a more detailed or recent explanation on this file? 

I use CubeMX for few years already, and .mxproject once was known to make trouble when re-generating projects, especially after move to a different path or rename. So I've learned to consider it harmful, delete it ASAP, and have never seen anything negative.  Of course, not checking it into version control.

 

peksAuthor
Associate
August 24, 2023

Thanks guys. 

Visitor II
February 23, 2024

It is really a headache. When checkout to another git branch, file .mxproject frequently leads to compile failure. 

Associate III
August 12, 2024

Should .mxproject file be checked into source control?  Or is it generated from .ioc file?

Pavel A.
Super User
August 12, 2024

Cube creates this file when it edits or upgrades .ioc.

Don't check it in. I never check it, never seen any problem.