cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX, IAR code regeneration ''project generation have a problem'' it says

childresss
Associate II
Posted on April 22, 2015 at 23:27

A recurring big problem with CubeMX (all versions. using v4.7/latest now)....

After making pin mapping and peripheral config changes, I run GENERATE CODE, as often I do. Too often I get this from CubeMX:

''The Code is successfully generated under (mypathname), but EWARM 6.70 project generation have (sic) a problem.''

The EWARM 6.70 part is irrelevant - I use a much later version of EWARM.

It's telling me that all the sources were regenerated but it got some unsaid error when regenerating the IAR EWARM project files.

I don't know what I do that causes these errors to begin after many prior error-free sessions. No big changes in file/folder tree arrangement.

If I continue to ignore the error, I can get IAR to build and run with ST-Link OK.  I dearly wish the error message would give some semblance of a clue as to the error that occurred.

17 REPLIES 17
Jim Frederick
Associate II
Posted on December 07, 2015 at 22:55

I see the ''have a problem'' problem frequently. Today,  I was working on a CubeMX .ioc file that generated code for OpenStm rather than IWARM. I tried simplifying the path name (by copying the project to the equivalent of D:\, removing spaces or other 'odd' characters), deleting the .mxproject file and deleting the directories created by CubeMX (Drivers and, in my case, SW4STM32) and re-generating code. That didn't work - there was no change in behavior.

This worked: I renamed the .ioc file and edited the .ioc file with a text editor to replace all instances of the old name with the new name (3 instances inside the file) and then code generation worked.

A note to ST: Could you point us to an error log or some means of getting more specific error information? I tried using Process Monitor from Windows Sysinternals but didn't see any obvious errors. The Event Viewer didn't reveal obvious errors either.

Edit: I saw the ''have a problem'' problem again using CubeMX to generate an OpenStm32 project. Adding a file to the OpenStm32 project (a very common scenario, right?) causes the ''have a problem'' problem to appear. Maybe the problem that CubeMX is having is editing/modifying the .project file used by Eclipse in an OpenStm32 project. It's almost as if the vague fractured-English error message really does mean that the .project file could not be regenerated and it's not clear what other files could not be regenerated.

The only work-around I've found so far is to let CubeMX generate and regenerate files in one directory and then merge changes (using something like Meld) over to a 'real' directory used for compiling. I tend to do something like this meld/merge anyway for main.cpp because I use a main.cpp but CubeMX generates a main.c file. I tend to regenerate projects with CubeMX frequently during development when tweaking parameters such as clock frequencies, timer clocks, GPIO configuration etc.

Note to ST: consider indicating what files could or could not be generated. If there's a conflict, consider modeling behavior the way source-control packages handle merge conflicts. One example: go ahead and generate a new clean file but keep the old one with a modified name and alert the user about the conflict.

spflanze
Associate II
Posted on February 23, 2016 at 21:34

I too had this problem. The operating system I ran STM32CubeMX under was Windows 7. The ''project generation have a problem'' message went away for me after I ran STM32CubeMX as an administrator.

stm32cube-t
Senior III
Posted on March 01, 2016 at 12:32

Dear user,

Next time you encounter the issue, please share the .ioc file as well the log files that can be found in your user directory under the .stm32cubemx folder.

Thank you

alyoshin
Associate II
Posted on July 22, 2016 at 07:35

I can't attach file because of the constant error:

''The file or folder name contains characters that are not permitted.  Please use a different name.

''

File name is ''CubemxGenFailed.zip'', and I have tried other names too.
alyoshin
Associate II
Posted on July 22, 2016 at 07:37

test2.ioc file:

#MicroXplorer Configuration settings - do not modify

File.Version=6

KeepUserPlacement=false

Mcu.Family=STM32F3

Mcu.IP0=NVIC

Mcu.IP1=RCC

Mcu.IP2=SYS

Mcu.IPNb=3

Mcu.Name=STM32F373C(8-B-C)Tx

Mcu.Package=LQFP48

Mcu.Pin0=PB4

Mcu.Pin1=PB5

Mcu.Pin2=PB6

Mcu.Pin3=VP_SYS_VS_Systick

Mcu.PinsNb=4

Mcu.UserConstants=

Mcu.UserName=STM32F373C8Tx

MxCube.Version=4.16.0

MxDb.Version=DB.4.0.160

NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true

NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true

NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true

NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true

NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true

NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true

NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4

NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true

NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true

NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true

PB4.GPIOParameters=GPIO_Label

PB4.GPIO_Label=LED_G

PB4.Locked=true

PB4.Signal=GPIO_Output

PB5.GPIOParameters=GPIO_Label

PB5.GPIO_Label=LED_R

PB5.Locked=true

PB5.Signal=GPIO_Output

PB6.GPIOParameters=GPIO_Label

PB6.GPIO_Label=LED_Y

PB6.Locked=true

PB6.Signal=GPIO_Output

PCC.Checker=false

PCC.Line=STM32F373

PCC.MCU=STM32F373C(8-B-C)Tx

PCC.MXVersion=4.16.0

PCC.PartNumber=STM32F373C8Tx

PCC.Seq0=0

PCC.Series=STM32F3

PCC.Temperature=25

PCC.Vdd=3.6

ProjectManager.AskForMigrate=true

ProjectManager.BackupPrevious=false

ProjectManager.CompilerOptimize=2

ProjectManager.ComputerToolchain=false

ProjectManager.CoupleFile=false

ProjectManager.DeletePrevious=true

ProjectManager.DeviceId=STM32F373C8Tx

ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.6.0

ProjectManager.FreePins=false

ProjectManager.HalAssertFull=false

ProjectManager.HeapSize=0x200

ProjectManager.KeepUserCode=false

ProjectManager.LastFirmware=true

ProjectManager.LibraryCopy=1

ProjectManager.PreviousToolchain=TrueSTUDIO

ProjectManager.ProjectBuild=false

ProjectManager.ProjectFileName=test2.ioc

ProjectManager.ProjectName=test2

ProjectManager.StackSize=0x400

ProjectManager.TargetToolchain=TrueSTUDIO

ProjectManager.ToolChainLocation=C\:\\test2\\test2

ProjectManager.UnderRoot=true

ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false

RCC.ADCoutputFreq_Value=4000000

RCC.AHBFreq_Value=8000000

RCC.APB2Freq_Value=8000000

RCC.CECFreq_Value=32786.88524590164

RCC.FamilyName=M

RCC.HSEPLLFreq_Value=8000000

RCC.HSE_VALUE=8000000

RCC.HSICECFreq_Value=32786.88524590164

RCC.HSIPLLFreq_Value=4000000

RCC.HSI_VALUE=8000000

RCC.I2C1Freq_Value=8000000

RCC.I2CFreq_Value=8000000

RCC.IPParameters=ADCoutputFreq_Value,AHBFreq_Value,APB2Freq_Value,CECFreq_Value,FamilyName,HSEPLLFreq_Value,HSE_VALUE,HSICECFreq_Value,HSIPLLFreq_Value,HSI_VALUE,I2C1Freq_Value,I2CFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLMCOFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,TIM2Freq_Value,TimSysFreq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,VCOOutput2Freq_Value

RCC.LSE_VALUE=32768

RCC.LSI_VALUE=40000

RCC.PLLCLKFreq_Value=8000000

RCC.PLLMCOFreq_Value=4000000

RCC.RTCFreq_Value=40000

RCC.RTCHSEDivFreq_Value=250000

RCC.SYSCLKFreq_VALUE=8000000

RCC.TIM2Freq_Value=8000000

RCC.TimSysFreq_Value=8000000

RCC.USART1Freq_Value=8000000

RCC.USART2Freq_Value=8000000

RCC.USART3Freq_Value=8000000

RCC.VCOOutput2Freq_Value=4000000

VP_SYS_VS_Systick.Mode=SysTick

VP_SYS_VS_Systick.Signal=SYS_VS_Systick

board=test2

alyoshin
Associate II
Posted on July 22, 2016 at 07:38

OS is WinXP 32-bit, project directory is C:/test2/

alyoshin
Associate II
Posted on July 22, 2016 at 07:40

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6qI&d=%2Fa%2F0X0000000bwb%2FcWp81SXZ07JwFh3YbJVlPzzIUQKEjaw5ntbA16ahgLI&asPdf=false
Amel NASRI
ST Employee
Posted on July 26, 2016 at 15:19

Hi asv,

I suggest you create a new discussion in which you describe the problem you are facing.

You should be able to attach a .ioc file to your discussion.

The current thread was started on April 2015. I don't think you are facing the same issue as various versions of CubeMX were published since this time.

-Mayla-

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.