Skip to main content
ISeed
Associate III
May 23, 2019
Question

STM32CUBEMX keeps generating __HAL_AFIO_REMAP_SWJ_DISABLE();

  • May 23, 2019
  • 1 reply
  • 1486 views

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!

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
May 23, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
ISeed
ISeedAuthor
Associate III
May 23, 2019

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)