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
  • Thanks to both of you for your suggestions. I have been able to turn an LED on and off using a small program built from CubeMX. But when I strip down an example program from STM I get the following:

    Load "STM32F7508-DISCOVERY\\Exe\\Project.axf"
    No Algorithm found for: 08000000H - 08000DA3H
    Erase skipped!
    Error: Flash Download failed  -  "Cortex-M7"
    Flash Load finished at 22:39:09

    I should mention that in Project/Options, I have set IROM1=0x8000000 start and 0x10000 size, with the startup radio button selected.

    I don't know why the flash bytes being erased is DA4H long, but just in case it is relevant, the linker reports:

    Program Size: Code=2736 RO-data=528 RW-data=16 ZI-data=1024 

    BTW, I was not previously connecting to ST-Link because the USB port on my laptop is damaged (I think) and the Program/Options had set ULink at some point.... so it was a good suggestion to use the CubeMXProgrammer as a debug tool.

    Thanks in advance for any help that you can give.

Reply
  • Thanks to both of you for your suggestions. I have been able to turn an LED on and off using a small program built from CubeMX. But when I strip down an example program from STM I get the following:

    Load "STM32F7508-DISCOVERY\\Exe\\Project.axf"
    No Algorithm found for: 08000000H - 08000DA3H
    Erase skipped!
    Error: Flash Download failed  -  "Cortex-M7"
    Flash Load finished at 22:39:09

    I should mention that in Project/Options, I have set IROM1=0x8000000 start and 0x10000 size, with the startup radio button selected.

    I don't know why the flash bytes being erased is DA4H long, but just in case it is relevant, the linker reports:

    Program Size: Code=2736 RO-data=528 RW-data=16 ZI-data=1024 

    BTW, I was not previously connecting to ST-Link because the USB port on my laptop is damaged (I think) and the Program/Options had set ULink at some point.... so it was a good suggestion to use the CubeMXProgrammer as a debug tool.

    Thanks in advance for any help that you can give.

Children
No data