2022-11-20 04:41 PM
Hi all, I'm new to this STM32 community.
I have a small problem: I bought some STM32G0P0.. for my project, also making the PCB and the rest. But after soldering the various components, I try to program one and see that the level 2 protection is active, I try to program another and there is the same thing.
What I see from the STM32 St-LINK program is that only some memory pages have protection, while others don't, but then going to view the memory areas I see that they have all been set to FFFFFFFF.
Below I can see that the memory on the address 0x08001400 is free, but..
..here I see that is protected! How can I program it?
My question now is: what the hell do I do? Do I ask for a return? Is this a normal thing of STM32G0...? Trying to write a bootloader that makes me jump from one address to another when the memory to read is full?
Thank you for your availability and attention
Solved! Go to Solution.
2022-11-22 01:34 PM
It doesn't look to be in RDP Level 2
When you write a .BIN, .HEX or .ELF file into memory are you getting some sort of error or failure message? Please show that.
2022-11-22 04:30 PM
I thought the accented blue color meant protected memory
2022-11-22 04:37 PM
I tried and I can program with a file .bin or .elf, but if I try to program the MCU with STM32CubeIDE it shows me this error below:
So this is a problem if I want to debug or run the program..
2022-11-22 05:19 PM
Was STM32 Cube Programmer able to program the .ELF with some more specific error message?
2022-11-22 05:50 PM
it looks like you are running/debugging it as a C/C++ application...From menu select run/debug configurations, STM32 application and double-click in configurations list to make STM32 run/debug configuration (not C/C++ application, which is for running EXE on your computer).
2022-11-23 07:57 AM
This @Community member is everything that I see:
2022-11-23 08:12 AM
@Georgy Moshkin those are my configurations:
2022-11-23 10:07 AM
This is still from the IDE, and via GDB Server, etc.
Run the "STM32 Cube Programmer" as the stand-alone GUI application, and interact and program the STM32G0 with the .ELF or .HEX directly from that.
This will establish if the device itself is in fact visible, viable and programmable.
You can then check that off the list, and work backward through the maze of connectivity and interactions that are precluding the IDE from doing the exact same task, with the same hardware.
Perhaps the settings for GDB are wrong, perhaps something else already has ownership of the device / ST-LINK, ie a preexisting and live Connection via an STM32 Cube Programmer instance.
2022-11-24 05:17 PM
With STM32Programmer I can program MCU with .elf file, but I can't program it from STM32Cube.
I disconnect and close every time the STM32Programmer and any other program that is connected to the STM32, so it's not this one.
What could I change in the GDB settings, and also wondering where should I go to see these settings.
Thank you for your availability
2022-11-27 07:12 AM
Hi @Community member and everyone else.
I'm still trying to debug and upload the code via STM32CubeIDE, but I always get the same error and I don't understand what settings I need to change. Do I have to make my own bootloader?
These are the errors I see:
STMicroelectronics ST-LINK GDB server. Version 7.0.0
Copyright (c) 2022, 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
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.11.0
-------------------------------------------------------------------
Log output file: C:\Users\offic\AppData\Local\Temp\STM32CubeProgrammer_a08760.log
ST-LINK SN : 56FF6F067878545228250567
ST-LINK FW : V2J40S7
Board : --
Voltage : 3.23V
Error: No STM32 target found!
Encountered Error when opening C:\ST\STM32CubeIDE_1.10.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.301.202207041506\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.
and this one:
I rely on you because I really don't know where to put my hands.
Thank you all for your availability