[STM32]TouchGFX: section `ExtFlashSection' will not fit in region `FLASH', region `FLASH' overflowed by 290224 bytes 오류 해결

2021년 09월 23일 by 진아사랑해

    [STM32]TouchGFX: section `ExtFlashSection' will not fit in region `FLASH', region `FLASH' overflowed by 290224 bytes 오류 해결 목차
반응형

touchGFX로 GUI를 만들고 있는 중에 제목과 같은 에러가 발생하였다

나는 STM32F429를 사용하고 있고 NOR FLASH 16M를 가지고 있다

 

Nor Flash를 Image 영역으로 사용하여야 했는데....어떻게 해야 하는지를 알 수 없었다

 

구글을 검색하던 중에 

https://community.st.com/s/question/0D50X0000BI1CvjSQF/external-vs-internal-flash-memory-for-touchgfx-assets

위 글을 참조하였다

 

실제로 TouchGFX에서 생성한 "MyApplication\STM32CubeIDE\STM32F429NIHX_FLASH.ld" 파일을 열어보면 

 

  /* Remove information from the compiler libraries */
  /DISCARD/ :
  {
    libc.a ( * )
    libm.a ( * )
    libgcc.a ( * )
  }
/* 
  ExtFlashSection :
  {
    *(ExtFlashSection ExtFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
  } >NOR_FLASH
*/
/*
  FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
*(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >NOR_FLASH

  TextFlashSection :
{
*(TextFlashSection TextFlashSection.*)
*(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >NOR_FLASH 
*/
  .ARM.attributes 0 : { *(.ARM.attributes) }
}

 

ExtFlashSection, FontFlashSection, TextFlashSection 3 부분이 주석처리가 되어 있다

 

위 주셕을 제거한다

ExtFlashSection :
  {
    *(ExtFlashSection ExtFlashSection.*)
    *(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
  } >NOR_FLASH

  FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
*(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >NOR_FLASH

  TextFlashSection :
{
*(TextFlashSection TextFlashSection.*)
*(.gnu.linkonce.r.*)
    . = ALIGN(0x4);
} >NOR_FLASH 

그리고 Build를 하니

즐거운 시간되세요

 

반응형