cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CUBEMX keeps generating __HAL_AFIO_REMAP_SWJ_DISABLE();

ISeed
Senior

Hello,

Whenever I generate a project using STM32CUBEMX, ir keeps generating (and updating upon re-genration) __HAL_AFIO_REMAP_SWJ_DISABLE(); into the HAL_MspInit function.

This line does not allow debugging and forces to perform a series of actions to allow debugging again.

Right now, I keep commenting the line out upon each regeneration. Is there a way to simply prevent it from generating?

Thanks!

2 REPLIES 2

I believe it is a check box configuration item, dig in the forum, it's been mentioned several times.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Indeed.

My question is a duplicate of:

https://community.st.com/s/question/0D50X00009XkZBsSAN/stm32cubemx-disables-swd-by-default-for-f1

in STM32MXCubeMX:

Pinout & Configuration -> System Core -> SYS -> Debug: drop-down menu. Choose what you use (Serial Wire in my case)