cancel
Showing results for 
Search instead for 
Did you mean: 

stm32L476G-DISCO upload not working

Kt.11
Associate

I have a stm32L476G-DISCO.

trying to get this simple blink led program working.

CODE:

  while (1)
  {
	HAL_GPIO_TogglePin( LD_G_GPIO_Port, LD_G_Pin );
	//(LD_R_Pin);
    HAL_Delay(2000);
    /* USER CODE END WHILE */
    MX_USB_HOST_Process();
 
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

BUILD SUCCESS:

14:08:04 **** Incremental Build of configuration Debug for project Lab2-Kava ****
make -j8 all 
arm-none-eabi-size   Lab2-Kava.elf 
   text	   data	    bss	    dec	    hex	filename
  39640	    152	   4064	  43856	   ab50	Lab2-Kava.elf
Finished building: default.size.stdout
 
 
14:08:05 Build Finished. 0 errors, 0 warnings. (took 396ms)

UPLOAD ATTEMPT:

STMicroelectronics ST-LINK GDB server. Version 5.7.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
Debugger connection lost.
Shutting down...

Really baffled why its not uploading. ST made me upload the firmware on the board.

1 REPLY 1
ChahinezC
Lead

Hello @Kt.1​,

Welcome to ST community :smiling_face_with_smiling_eyes:.

This a debugger problem. Please check the cable you are using and make sure that you have correctly configured the Debug Configuration and connected to the ST-Link on the board.

If you are using STM32CubeIDE, I recommend you checking the 3rd section of the STM32CubeIDE User Guide.

Chahinez.