cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with CubeMX version 5.0.1

VIO47
Associate II

Hi, I have updated CubeMX to version 5.0.1 and after this I noted an issue in Micro Vision 5 which I have no idea how to resolve. I am new in STM32 world, just have a couple of months since started to learn.

I use to put user labels on GPIOs, it is much easier for me to handle things like this. Until this CubeMX update everything was working fine. Now I get an error for the labeled GPIOs: "use of undeclared identifier "<GPIO label/port>".

I need some help with this issue. Thank you in advance.

I would add a screen shot but I didn't figure out how to do it.

9 REPLIES 9
VIO47
Associate II

Hi, I have managed to add a screen shot, maybe it will explain my issue better than I can do.

So this suggests that the defines for these names don't exist, so check the include files, or wherever else they had previously existed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
VIO47
Associate II

Hi, first have opened an older project created with previous version on Cube and I noticed this issue. I thought that it may be because of the migration of the project to a new version of Cube so I have created again all project on the new version of Cube. I did everything exactly like I did before. I have checked many include files, in the both versions, to find where are the definitions of the pins and ports but I couldn't find them. I don't really know what include file to add, I have already checked several I thought that should work but unsuccessful.

I have just noted that there is no issue if I use the pin labels in the main file, all of them are recognized.

Maybe you could use grep or a file manager and just search for the strings?

These don't look to be CubeMX source files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal

I think you miss the BSP board definitions file. Do a find in files using these labels to know where the board named pins are actually to be #include "..." . Do this with old and new project,

Find the #define for these application pins. They might come from an example.

VIO47
Associate II

Hi, thank you for your answers. I am using a no-name board with this F303, in fact it was an F103 on that board initially and I changed it with this F303. Maybe one day I will try again Cube 5, maybe some settings in version 5 are different or it is too advanced for my level of knowledges, in the old version I am using default settings and it just works. Until now I never defined the pins or ports by myself in software, I didn't have to, always I have defined the labels in Cube.

I have already spent almost all weekend checking about this issue, I got a bit tired already so I have installed old Cube version I was using before (4.26.0) and set again exactly the same project in exactly the same way I always did (this is the only way I know), same GPIOs labels in Cube, copy-pasted the files in Micro Vision from the previous project and everything is fine now. There is no need to look for other include files, it works perfect as Cube created it (picture attached). Sorry if I maybe cannot explain very well, as I told before I am not experienced with all these, learning since few months. I have few years of experience with AVR micro controllers. I will stay with old Cube, anyway I like more the graphic interface of the old version, it is much easier to work with it. The interface of the new version is too crowded. I would show you also the Cube screen shot with the pin labels but as I see I can add only one picture. Thank you all again for answers.

VIO47
Associate II

Hi, sorry, few more clarifications. The file you are seeing in my screen shots is the LCD driver, I didn't claim this file is created by Cube but the pin labels are defined by myself only in Cube, never in other place. I know that I could have defined myself the pins/ports in my code and keep using Cube 5 but it was so easy with the old Cube to define them in one place only.

Raymond Buck
Senior

In CubeMX, if you select the Pinout & Configuration Tab you can set the pin labels. Right click a pin that you want to label. A menu will open with three selections. The top selection says "Enter User Label". Left click on that and enter the label you want into the text box. That is all you need to do and you will then be able to refer to the pins by the label name that you entered.

VIO47
Associate II

Hi Raymond,

This is exactly what I am doing and at least for me this is very helpful. This is not my first project using CubeMX, but the first one after I have upgraded CubeMX to version 5.0.1. I have already created more than 10 projects with the previous version of CubeMX, just to learn about STM32 and there was no issue. The issue I have described above occurs only if I use CubeMX version 5.0.1. Now I am back to version 4.26.0 and everything works again. Maybe CubeMX 5 needs some more settings to be able to work exactly as older version but I do not know what I can do. The older version just works for me with default settings.