Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32CubeMX IDE issue. Throws warning when using macros #5

Open
rxa1031 opened this issue Sep 24, 2020 · 0 comments
Open

STM32CubeMX IDE issue. Throws warning when using macros #5

rxa1031 opened this issue Sep 24, 2020 · 0 comments

Comments

@rxa1031
Copy link

rxa1031 commented Sep 24, 2020

Hello,

Microcontroller used STM32H753BI

Issue: STM32CubeMX 6.0.0 Macro concerns

Case Number informed by ST (internal community): 00112804

I have still not heard back on this from ST Team and hence raising the concern here.

Issue Description START

Dear Luca, Pasu,

Please check the attached files.

The STM32CubeMX 6.0.0 now allows adding alphanumeric values constant values, after I had requested for this. This feature was not available with STM32CubeMX 5.6.1

Initial behavior when macros are declared and used:

Some examples of macros that will get added to main.c as a result of adding the macros under USER CONSTANTS are:

#define MaxStdFIFOs u8CAN1MaxStandardFIFO
#define RS485RCUBaudRate (47600UL)

in the above example u8CAN1MaxStandardFIFO is an unsigned char variable, which is defined only in my code and is also appropriately externed.

Once I add the macro and its alphanumeric value, I am able to use the macro as value for USART3 baudrate, Defining some other values etc.

The code also generates without any concern until the project is not closed.

Observation & Concerns:
Whenever the IOC file is opened again and I try to regenerate the code, the STM32CubeMX 6.0.0 for no reason start THROWING WARNING about the Drivers which use the macros similar to the ones shared above. Please refer to snippet STM32CubeMX-6.0.0-Code-generation-concern.png for details.

Also refer to STM32CubeMX-6.0.0-macro-declaration.png to refer to some macros that have been declared. Please check the items encircled with red line.

Also please refer to Initially-allowed-using-macro-but-on-repoening-IOC-shows-a-red-cross.png file. Please observe the red cross marks.

Requesting Fixes:

The C code and the associated allows putting values assigned to macros in brackets. It also allows adding UL at the end of a number so as to inform that the number must be treated as unsigned long. Similarly a macro / name as an alias for a variable.

The STM32CubeMX should not through errors for above implementations when requested / added with help of STM32CubeMX.

Please help.

Thanks,
Rajeev

Case status information and update option is available via my.st.com Customer Support portal.
https://community.st.com/s/case/5003W000003RSnv

ISSUE DESCRIPTION END

Regards,
@rxa1031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant