Skip to main content
matt-crc
Senior III
February 27, 2025
Question

Is it possible for the IDE to highlight user code

Hello,

Is it possible to highlight USER CODE from CubeMX code generation?  For example, highlight everything between these types of comments:

/* USER CODE BEGIN PM */
/* USER CODE END PM */

In a similar way that #ifdef / #endif blocks are highlighted?

If not currently available, can it be added the the CubeMX CubeIDE wishlist?

thanks

Matthew

This topic has been closed for replies.

3 replies

Pavel A.
February 28, 2025

This can be done as Eclipse editor add-on. Eclipse is opensource project, a lot of add-ons are available in its "marketplace" (Help-> Eclipse marketplace). Anyone can make add-ons or sponsor development of whatever they need or want.

Same with VS Code - a lot of add-ons exist for it.

 

Andrew Neil
Super User
February 28, 2025

Indeed.

But this would be a useful add-on for ST to provide - as these sections are their thing, and key to properly using their auto-generated code.

It is the cause of quite a few problems seen here ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
April 4, 2025
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.