Question
STM32CubeMX generated project for STM32L152C-DISCO board without any modification, however it shows "can't access target. Shutting down debug session" during debugging pass MX_GPIO_Init();
- open stm32cubemx (version 6.2.1)
- new project -> access to board selector
- select the board "STM32L152C-DISCO"
- Initialize all peripherals with their default Mode? Yes
- Give project name "test"
- Toolchain/IDE changed to MDK-ARM (min version v5.27)
- Open project in uVision
- compile it, and then start debugging
- step over HAL_Init();
- step over SystemClock_Config();
- step over MX_GPIO_Init();();
- step over MX_ADC_Init();
- at this point, the debug show Debugger - Cortex-M error:"Cannot access target. Shutting down debug session" (as shown in the attached screenshot) and get out of debugger mode after you click on "OK".
