How to download firmware/bootloader to custom boards with STM32F479NIH6 and debug?
TL:DR; New to firmware development. Inherited codebase for new revision of product. Sole firmware developer. Cannot step through code. Seeking advice.
---------------------
So I am fairly new to firmware development in a new company where I inherited this codebase that is to be used for a new product. Previously, TrueStudio 9.x.y was used for the previous generation product last year.
I am the sole firmware developer in a small company. I had 2 weeks with the previous firmware engineer before they left. They did their best to transfer as much knowledge as possible, but not everything could be covered in that time-frame. My background is Cypress FX3 firmware development and kernel device drivers.
The codebase seems to have bootloader and application code mixed together. First, is this a common practice, as I see these as separate functions. The bootloader, per my understanding, is to configure the STM32 to load and run the application.
I build the application and bootloader, and when I attempt to download/debug the bootloader with a breakpoint set immediately in main,
TrueStudio 9.3.0 with an ST-Link v2 is used to connect to the custom board. I am building a debug/non-optimized code, which I download via the ST-LinkV2. The Console window output I receive starts with the below, with the crash (?) shown afterwards.
So the question I have is, of which settings do I need to be most careful? Is there something obvious I am missing due to my lack of expertise? Given that the environment is for a shipped product that did work, should I still stick with TrueStudio, or make the change to STM32CubeIDE (I did play around to it, but saw that the conversion of the project to that new IDE is nontrivial).
And is there a way to pay for support from ST, now that TrueStudio Pro is no longer available?
Thank you for reading.
Kosta
And now the initial output:
STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, 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
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v1.3.0
-------------------------------------------------------------------
Log output file: C:\Users\Kosta\AppData\Local\Temp\STM32CubeProgrammer_a04312.log
ST-LINK SN : 48FF6E064967535721350887
ST-LINK FW : V2J35S7
Voltage : 3.19V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x434
Device name : STM32F469xx/F467xx
Device type : MCU
Device CPU : Cortex-M4
Memory Programming ...
Opening and parsing file: C:\Users\Kosta\AppData\Local\Temp\ST-LINK_GDB_server_a04312.srec
File : C:\Users\Kosta\AppData\Local\Temp\ST-LINK_GDB_server_a04312.srec
Size : 162084 Bytes
Address : 0x08040000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [6 7]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:03.894
Verifying ...
Download verified successfully
Then after a moment I get the following output in the Console window:
Program received signal
SIGINT, Interrupt.
0x08007506 in ?? ()
Stopping the session, I see the following appended to the Console window in the first section:
Debugger connection lost.
Shutting down...
