cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 6.11.1 Generation Code problem

CristhianGuedes
Associate II

Hello everyone.
First, sorry for my english. I'm still learning, and i'm trying to write this text without using google translator.

I found one problem in the Cube MX (already solved), in the generation code in a specific case, and I don't know where is the correct place to post it, I think that is here, but if not, please tell me where it is.

I always generate code in the Project Manager to use MKD-ARM V5.32 using "Copy Only the necessary library folder" option in the "Project Manager/Code Generator" tab, but this creates a lot of unecessary duplicated files.

Today I try the option "Add necessary library files as reference in the toolchain project configuration file", and the code does not compile, for "No such file or directory" error.

My user in this computer is "Cristhian Guedes", with a space between the words, and the CubeMX is generating links to Include folders using "CristhianGuedes" directories. 

For exemple, the include path is generated:
"C:/Users/CristhianGuedes/STM32Cube/Repository/STM32Cube_FW_L0_V1.12.2/Drivers/CMSIS/Include"

but it must be with a space.

"C:/Users/Cristhian Guedes/STM32Cube/Repository/STM32Cube_FW_L0_V1.12.2/Drivers/CMSIS/Include"

All the rest is OK. After i manually changed the path to include this space, the generated code works ok (I take a "little" time to find that this is the problem, because I never have this kind of problem in CubeMX).

I put one image in the attachments.

Everytime I regenerate the code, it was regenerated without the space, forcing the user to change every path to its correct location manually.

Is there any workaround for this?

(if you want to correct my sentences in english, I apreciate, is good to learn more).
Thanks in advance.

CubeMXproblem.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

My user in this computer is "Cristhian Guedes", with a space between the words, and the CubeMX is generating links to Include folders using "CristhianGuedes" directories. 

Space and _funny characters_ in project paths are a proven recipe for troubles. This is fortunately easy to fix. 

Open administrator command window and go to c:\users. Then make a symbolic link named CristhianGuedes that points to "c:\users\Cristhian Guedes"

mklink /d CristhianGuedes "c:\users\Cristhian Guedes"

 

View solution in original post

8 REPLIES 8
AScha.3
Chief II

Hi,

just : can you leave away all non "character" symbols in any path , related to ...what you want ?

(space, + , € ...)

I dont know why, but there is a basic problem with this in the Eclipse/Java universe....

It will not work.

So setup / install everything, also your project name, without "spaces" etc. , then try again.

(No other solution , now .)

If you feel a post has answered your question, please click "Accept as Solution".
BarryWhit
Senior III

[removed because Pavel]

 

As for your english - not bad at all. I've seen much much worse here on the forum.

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.
Pavel A.
Evangelist III

My user in this computer is "Cristhian Guedes", with a space between the words, and the CubeMX is generating links to Include folders using "CristhianGuedes" directories. 

Space and _funny characters_ in project paths are a proven recipe for troubles. This is fortunately easy to fix. 

Open administrator command window and go to c:\users. Then make a symbolic link named CristhianGuedes that points to "c:\users\Cristhian Guedes"

mklink /d CristhianGuedes "c:\users\Cristhian Guedes"

 

BarryWhit
Senior III

Brilliant. Windows has symlinks ?!?

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.

Thank you, it works as expected.

But I still think that if CubeMX allow the installation of repositories in this directorie "C:/Users/Cristhian Guedes/STM32Cube/Repository", so it must at least warn the user about it, and not install in one place, and link to another.

The workaround of @Pavel A. works to me.
But I need to question: if it not wil work using repositories in a path with SPACE, why CubeMX uses this path with space to put downloaded files in repositorie?

Why CubeMX does not automatic warns the user that the original localtion "C:/Users/Cristhian Guedes/STM32Cube/Repository" is invalid, and install in the correct path "C:/Users/CristhianGuedes/STM32Cube/Repository"?

Or allow the user to choose anoter location for it?
Anyway, I'll format my entire computer in some days, and i'll create an user without the space, I already have problem in the past with Android because of this.

Thanks for your reply.

Yes, his sugestion worked fine for me.
At least in my windows 10, it works good.

BarryWhit
Senior III

Anyway, I'll format my entire computer in some days, and i'll create an user without the space, I already have

> problem in the past with Android because of this.

 

Then I should not have removed my earlier post. If you're going to start from scratch anyway, there's no harm in trying something risky, which might save you the trouble.

 

See this SE

 

 

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.