2021-03-27 10:47 AM
Hi,
I am running into some problems with generating new code for my MCU (STM32G474RBT6).
I have installed STM32CubeIDE v1.6.0 and FW pack v1.4.0.
I have created my entire pinout with a correct setup (my friend checked it and he is working with these MCUs on profesional level)
Problem is that code does not contain parts for USB CDC.
Everything is generated correctly but there are no:
usb_device.c
usbd_cdc_if.c
etc.
Looking forward for any help.
With regard,
Martin V.
Solved! Go to Solution.
2021-04-05 06:10 AM
Finally I can say that everything is working fine now. At first it was probably caused by something during code generation ans now it is everything working fine, at last point it was caused by my oscilator.
2021-03-27 12:12 PM
Maybe you dont select midleware usb device checkbox...
2021-03-27 12:24 PM
I am not sure what exactly do you mean. I think I got everything here.
2021-03-27 11:05 PM
BTW, on that image you can see my another problem which is happening to me almost everytime or everytime I regenerate the code. My main.c file stays with the name main.c_save. I always have to delete entire project and create new one based on my .ioc file or rename it manually. Thankfully I havent started writing most of the code yet.
2021-03-30 02:26 AM
Hello @Martin Vrlík
Thanks for your feedback,
Could you please share or send me your project to check it?
Khouloud
2021-03-30 06:26 AM
2021-04-01 11:10 AM
2021-04-01 11:44 PM
Well, today I have tried it again and regenerated entire code based on .ioc file and now I have even middleware folder there.
2021-04-02 09:40 AM
Honestly I am starting to be lost. Newly generated code which finaly contains every important part is not working. A have added into it just stupid LED blinking but after powering board up nothing happens. I have tried connecting a debugger into it with this result:
STMicroelectronics ST-LINK GDB server. Version 5.8.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0-RC1
-------------------------------------------------------------------
ST-LINK SN : 50FF66067287555140562167
ST-LINK FW : V2J37S0
Board : --
Voltage : 2.97V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x469
Revision ID : Rev Z
Device name : STM32G47x/G48x
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M4
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a02548.srec
File : ST-LINK_GDB_server_a02548.srec
Size : 38532 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 18]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.132
Verifying ...
Download verified successfully
Debugger connection lost.
Shutting down...
I am putting here new hopefully completely generated code which should at least blink but it is doing nothing at all.
Thanks for any kind of suggestions.
It is like my IDE is generating every week something new to my project...
2021-04-04 05:00 AM
I have added here some new points. My friend is telling me that it could be caused by the fact that it is the new model of MCU and there might be some bugs in generating code in IDE. I honestly do not know. But last code which should at least act as an COM port is doing nothing at all.