How to change UART or USART for stm32f4?

Since you’re still seeing that 0xcab9374f address, try these GDB commands to find the source:

  1. watch usart: Run this before the crash. GDB will stop the moment that pointer gets overwritten with the garbage value.
  2. info symbol 0xcab9374f: This will tell us if that ‘address’ is actually a piece of code or a specific variable that is being misinterpreted as a pointer.

Also, double-check your config.ini. If you have both USART_2 and USART_3 enabled at the same time, ensure only one is designated as the console. If the index is wrong, it will pull a random value from memory.