[TT] STM32 CubeIDE freertos + printf 문제 해결

아래와 같은 CubeIDE 버젼 사용중입니다.

STM32CubeIDE
Version: 1.2.1

CubeIDE Ver

 

간단하게 STM32G4 테스트 하기 위해 NUCLEO-G474RE보드를 사용 했습니다.

freertos옵션없이 생성된 코드에서는 uart printf가 정상 동작 하지만

freertos옵션을 enable하여 생성된 코드에서 printf가 정상 동작 하지 않고 hardfault로 빠져 버립니다.

 

검색 중에 다음과 같은 내용이 있어서 "Memory Management scheme" 항목에서 heap_5에서 heap_3로 변경하니 문제가 해결 되었습니다.

 

AWS 관련 문서

 

CubeIDE 설정 화면

 

관련 내용 링크 입니다.

https://docs.aws.amazon.com/ko_kr/freertos-kernel/latest/dg/troubleshooting.html

 

https://docs.aws.amazon.com/ko_kr/freertos-kernel/latest/dg/troubleshooting.html

 

docs.aws.amazon.com

freertos 메모리 관리 방법

https://docs.aws.amazon.com/ko_kr/freertos-kernel/latest/dg/heap-management.html#memory-allocation-schemes

 

https://docs.aws.amazon.com/ko_kr/freertos-kernel/latest/dg/heap-management.html#memory-allocation-schemes

 

docs.aws.amazon.com