2024-01-09 05:55 PM - last edited on 2024-04-02 01:40 AM by Amel NASRI
I am trying to setup a generalized development environment using VSCode, Docker and J-Link. Ideally code development would not use the stm32cubeide or other IDEs. The current issue I am running into is that while trying to debug the Nucleo-H743ZI2 dev kit using any 3rd party software (open source st-link, jlink, pitaya) the program fails to initialize its clock and falls into a error handler. This occurs within the code snippet below as the application is initializing. (Code used is the default peripheral setup with a blinking led in the main while loop)
void SystemClock_Config(void)
{
...
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
...
}
This behavior is consistent when using, Ozone, VSCode with the cortex debug extension, and STM32CubeIDE.
This is while the ST-Link is held in reset using the jumper JP1
Attempting to start a ST-Link session outside of the CubeIDE using PyOCD and ST-Link had the same effect as jlink with the addition that it places the ST-Link onboard chip into an unknown state. Requiring the ST-Link chip to be reprogrammed.
Using ST-Link within the CubeIDE, debugging works as expected.
Using 3rd party devices to only program the application onto the dev kit works.
Attempting to debug using jlink without the JP1 jumper, the code executes a bit farther but stops execution when initializing the default GPIO init. Using Jlink inside of the cube ide I am able to fully debug using JLink occasionally. Occasionally the MCU refuses to connect and the only fix to get it working again is to reprogram it using the stlink.
Any help would be appreciated, thank you!