This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Newbie

I'm just trying out Keil, so please forgive stupid questions.

I bought an STM32F7508-DK board. To determine if the free MDK5 Keil IDE and board are working, I modified an STM example project, reducing it to turning on an LED on the board. Here is the main program:

//static void LCD_Config(void);
static void SystemClock_Config(void);
static void Error_Handler(void);.............................. this has been reduced to just a return, i.e. it does nothing.

int main(void)
{
  HAL_Init();
  SystemClock_Config();        // Configure the system clock to 200 MHz .... this is part of the STM example
  BSP_LED_Init(LED1);            // Configure LED1
    while (1)
    {
        BSP_LED_On(LED1);
    }
}

Console output is:

compiling main.c...
../Src/main.c(37): warning:  #177-D: function "LCD_Config"  was declared but never referenced....I commented out the call to this function
  static void LCD_Config(void)
../Src/main.c: 1 warning, 0 errors
linking...
Program Size: Code=2740 RO-data=528 RW-data=16 ZI-data=1024  
FromELF: creating hex file...
"STM32F7508-DISCOVERY\Exe\Project.axf" - 0 Error(s), 1 Warning(s).
Build Time Elapsed:  00:00:10
Load "STM32F7508-DISCOVERY\\Exe\\Project.axf"
Error: Flash Download failed  -  Target DLL has been cancelled..... for some reason, some of the USB ports on my laptop don't connect to ST-Link on the target board
Flash Load finished at 11:21:09...... this USB port did connect to ST-Link on the target board
Load "STM32F7508-DISCOVERY\\Exe\\Project.axf"
Erase Done.
Programming Done.
Verify OK.
Flash Load finished at 11:21:21

An LED on the target board near the ST-Link USB connector flashes red and green, but LED1 never turns on when I press the Start/Stop Debug Session icon on the IDE.

Question: Maybe I am not using the IDE correctly (since this is my first try), or maybe the target board is broken. Is there any way of finding out?

Thanks.

Parents
  • Outside of Keil, with it closed. Try to connect to the ST-LINK via the ST-LINK Utilities or STM32 Cube Programmer. Check you can communicate with the underlying board and target STM32 part.

    Avoid using hubs or docking stations to connect to the ST-LINK.

    Check or try different cables, and ports on the machine.

    If the drivers don't load/function, nothing else you are attempting to do will be successful.

    Make sure to use current drivers, and firmware on the ST-LINK.

    DELL's can have secondary issues due to Remote Assistant / PC Doctor type tools interfering with the USB devices like the ST-LINK.

    Have your code alternately toggle the LED and delay, so you can single step the code, and also inspect the Peripheral registers via the debuggers view of those. Check the clocks enabled in the RCC, and the GPIO pin configurations associated with the LED.

Reply
  • Outside of Keil, with it closed. Try to connect to the ST-LINK via the ST-LINK Utilities or STM32 Cube Programmer. Check you can communicate with the underlying board and target STM32 part.

    Avoid using hubs or docking stations to connect to the ST-LINK.

    Check or try different cables, and ports on the machine.

    If the drivers don't load/function, nothing else you are attempting to do will be successful.

    Make sure to use current drivers, and firmware on the ST-LINK.

    DELL's can have secondary issues due to Remote Assistant / PC Doctor type tools interfering with the USB devices like the ST-LINK.

    Have your code alternately toggle the LED and delay, so you can single step the code, and also inspect the Peripheral registers via the debuggers view of those. Check the clocks enabled in the RCC, and the GPIO pin configurations associated with the LED.

Children