cancel
Showing results for 
Search instead for 
Did you mean: 

Place assert In external Flash.When load the "TextFlashSection",which place fonts in exteral flash,an hardFault occured.

cyneer
Associate II

Hi,all!

I'm Using STM32f767 developing touchGFX applications .Using MDK5.

By the following the guidence in "https://touchgfx.zendesk.com/hc/en-us/articles/205886201-Placing-Assets-in-Flash-Memory" placing the fronts in extern Flash.

sct file config as the following codes:

; *************************************************************

; *** Scatter-Loading Description File generated by uVision ***

; *************************************************************

LR_IROM1 0x08000000 0x00100000 {  ; load region size_region

 ER_IROM1 0x08000000 0x00100000 { ; load address = execution address

  *.o (RESET, +First)

  *(InRoot$$Sections)

  .ANY (+RO)

  .ANY (+XO)

 }

 RW_IRAM1 0x20000000 0x00080000 { ; RW data

  .ANY (+RW +ZI)

 }

}

LR_EROM1 0x90000000 0x01000000 { ; load region size_region

 extflash.bin 0x90000000 0x01000000 { ; load address = execution address

  *.o (ExtFlashSection)

  *.o (FontFlashSection)

  *.o (TextFlashSection)

 }

}

With the mapped address begin in 0x9000 0000,the Font pointer should get an adress at 0x9000 000 uper.However, the font point get the location 0x6DB 9888, not in the extera flash.

then I get a HardFault.

0690X000006DfoMQAS.png

the same Application no using Inner Flash get the address at 0x080861C8,the it can run the GUI Demo without any question.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @cyneer​,

How did you create your project? Something looks like QSPI hasn't been properly initialized at the time the language array is read.

Best regards,

Martin

View solution in original post

4 REPLIES 4
Martin KJELDSEN
Chief III

Hi @cyneer​,

How did you create your project? Something looks like QSPI hasn't been properly initialized at the time the language array is read.

Best regards,

Martin

Thanks, Martin

I use CubeMX 5.0 to creat my MDK project.

I use WINBOND's w25q128 for external Flash.

I think the QSPI peripheral did working cause I enable the QSPI memory Map model,when I don't use the part access area for fonts, the application can run normally.

While I usd Debug model, data in memroy mapped address at 0x9000 0000 is the same as the result when I use normal SPI operation to read.

0690X000006Dg0mQAC.png

Incidentally,I write the MDK "Flash Programming" to place asserts by myself ,but some thing wrong happend .This lead to download and flash failure.

0690X000006Dg4PQAS.png

when I don't use the "verify" option,the the codes down load successfully.

 0690X000006Dg4AQAS.png

I check the QSPI driver and finally found what cause the problem is address mapped error when opprate the external flash!

Awesome, you rock! :)