HardFault_Handler on GUI_TTF_CreateFontAA call on stm32f429i_disco

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • HardFault_Handler on GUI_TTF_CreateFontAA call on stm32f429i_disco

      Hello,
      i added the truetype folder to my stm32f429i_disco project.
      But when i call GUI_TTF_CreateFontAA i jump directly to the HardFault_Handler.

      The code runs well in simulator.



      In the main i have :

      ===============
      GUI_Init();
      GUI_Initialized = 1;

      /* Initialize RTC and Backup */
      RTC_Init();

      /* Activate the use of memory device feature */
      WM_SetCreateFlags(WM_CF_MEMDEV);

      /* Do the calibration if needed */
      CALIBRATION_Check();



      Then i enter the mainTask
      =====================
      void MainTask(void) {

      #ifdef USE_BRUSCHI
      _CreateFonts();

      #endif

      _CreateFonts(); function is the following :
      ======================================


      unsigned _aHeight[] = { 16, 20, 32, 48 };
      GUI_TTF_CS _aCS;
      GUI_FONT _MainTask_Font;

      static int _CreateFonts () {

      GUI_TTF_DATA TTF_Data;
      TTF_Data.pData = &_acBRUSHSCI; // Set pointer to file data
      TTF_Data.NumBytes = sizeof(_acBRUSHSCI); // Set size of file

      {

      _aCS.PixelHeight = _aHeight[2];
      _aCS.pTTF = &TTF_Data;

      if (GUI_TTF_CreateFontAA(&_MainTask_Font, &_aCS)) {
      return 1;
      }
      }
      return 0;
      }

      _acBRUSHSCI has been generated from emWin tool truetype c converter
      ========================================================

      const unsigned char _acBRUSHSCI[53456UL + 1] = {
      0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x80, 0x00, 0x03, 0x00, 0x70, 0x44, 0x53, 0x49, 0x47, 0x12, 0x9C, 0xF7, 0x9D, 0x00, 0x00, 0xBB, 0xD4, 0x00, 0x00, 0x14, 0xFC, 0x4F, 0x53, 0x2F,



      Have you any idea of the problem ?
      thanks for any support
      Best regards