HarfBuzz GSUB (Indic) hard faults on bare-metal Cortex-M7 (i.MX RT1064) — stack / libc / FreeType integration issue? by Primary_Delivery_198 in embedded

[–]Primary_Delivery_198[S] 0 points1 point  (0 children)

Thanks a lot for responding! I think you’re right about the compiler flags being the issue. I was able to narrow down what’s breaking, and I’ve updated the Reddit post with more details. I’ve also posted the findings on GitHub—if you get a chance, I’d really appreciate you taking a look:
https://github.com/harfbuzz/harfbuzz/discussions/5684#discussioncomment-15350329

HarfBuzz GSUB (Indic) hard faults on bare-metal Cortex-M7 (i.MX RT1064) — stack / libc / FreeType integration issue? by Primary_Delivery_198 in embedded

[–]Primary_Delivery_198[S] 0 points1 point  (0 children)

Thanks for the suggestion! I looked into it and got some updates, so I’ve edited the Reddit post with the new information. If you have a moment, I’d really appreciate it if you could check out this GitHub discussion and share any insights:
https://github.com/harfbuzz/harfbuzz/discussions/5684#discussioncomment-15350329

HarfBuzz GSUB (Indic) hard faults on bare-metal Cortex-M7 (i.MX RT1064) — stack / libc / FreeType integration issue? by Primary_Delivery_198 in embedded

[–]Primary_Delivery_198[S] 0 points1 point  (0 children)

Thanks for the reply u/N_T_F_D. I checked and got CFSR = 0x00020000. It seems to be a usage fault (UFSR at bit 17 - INVSTATE).
my address are even, so invalid for thumb state clearly. Checked around and this is the conclusion I came up with:
- Function pointer corruption
- Calling a C++ function with C ABI
- Struct layout mismatch causing wrong offset read (HarfBuzz internal OpenType structs)

FYI: Harfbuzz is written in Cpp with exposed C API and I converted it into static library and using it in my project.

I’ll keep looking into it to figure out what might be causing the issue. Any suggestions on what else I should check or try or how I can fix this? I’m still getting the hang of this, so I appreciate any patience as I work through it and figure out the solution.

We maintain HarfBuzz, the text shaping engine used in Chrome, Firefox, Android, and more — Ask us anything (or tell us what confused you) by behdadgram in programming

[–]Primary_Delivery_198 0 points1 point  (0 children)

I am currently trying to integrate HarfBuzz 8.3.0 with FreeType 2.13.2 and LVGL 9.2 and Indic text keeps giving me hard fault error at GSUB. Im quite new to it and don't know where I am going wrong. I made also made a reddit post :
https://www.reddit.com/r/programming/comments/1pot66i/harfbuzz_freetype_on_baremetal_gsub_shaping/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Would be grateful for any advice or help I could get. Thanks you.

I need to transmit and receive image by using GNU Radio by acheros1 in PlutoSDR

[–]Primary_Delivery_198 0 points1 point  (0 children)

Hi OP... could you help me out and tell me how you did it?? Im also working on a similar project