antoncoetzee Posted April 8, 2015 Report Share Posted April 8, 2015 So I've been setting up uGFX with ChibiOS on a STM32L152 Nucleo board. Everything works great, and as expected, except for font rendering, which seems to hang the board completely -- all threads. This happens whether or not the uGFX code is in the main thread or child threads.I don't have onboard debugging working properly at this point, but near as I can tell it's happening within mf_bwfont.c, at line 89:callback(x0 + x - runlen, y0 + y, runlen, 255, state);Which seems to be related to gdisp.c around line 3158, calling drawcharline and fillcharline.Any ideas on what could be happening? I'm tearing my hair out here.... |-( Link to comment Share on other sites More sharing options...
inmarket Posted April 8, 2015 Report Share Posted April 8, 2015 This is obviously fairly well tested code so things I would suggest trying...1/ if you are using a custom font, try replacing it with the ui2 font. If that doesn't crash then it is likely to be your custom font has some corruption.2/ Increase the size of the stack. Many linker scripts provide any initial stack that is just too small. Link to comment Share on other sites More sharing options...
antoncoetzee Posted April 9, 2015 Author Report Share Posted April 9, 2015 Thanks. Tried all of that, but no luck. Turns out I had GCC -O2 optimisation enabled in my Makefile. Removed that and it works perfectly...Go figure. Link to comment Share on other sites More sharing options...
inmarket Posted April 9, 2015 Report Share Posted April 9, 2015 Wonderful! Another compiler optimizer bug.We have seen a few of those. Mostly we fix these as we find them (by code rearrangement) however different versions of compilers, let alone different compilers can have different optimisation bugs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now