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 errorslinking...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:10Load "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 boardFlash Load finished at 11:21:09...... this USB port did connect to ST-Link on the target boardLoad "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.
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.
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 - 08000DA3HErase 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.