Jump to content

inmarket

Moderators
  • Posts

    1,311
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by inmarket

  1. I presume you are using an M3 with the internal ltdc video controller. If that is not the case the below discussion may help even if it not directly applicable to your circumstances.

    The problem is likely to be related to your external sdram and it's bandwidth. The proof of this is the slow performance (noticeable redraw speed) of the gdispClear loop.The image drawing tests are therefore meaningless until that problem is solved.

    The first thing to try is putting the framebuffer into internal ram as a test. If that operates quickly the problem is your bus interface to the external sdram.

    Note that if your framebuffer is in external ram do not put any other objects, heaps, stacks, code or anything else in that external sdram. Framebuffers are extremely bandwidth intensive just with video refreshing.

    Other things to check are your CPU clock is running at full speed, wait states and speed and width of the sdram bus and also look for any other high speed requirement that may affect available bandwidth or speed.

  2. It looks like the column order on your display might be a bit different to the standard arrangement.

    Check the initialisation sequence particularly around the column order settings.

    The other place to look is around the spi data format eg if you are outputting 9 bit spi bit the controller expects 8 bit spi (or visa versa) you will get similar symptoms.

  3. Unfortunately there are only two mechanisms, off-screen drawing (pixmaps) and double buffering. Double buffering is a big nasty topic in its own right - search the forum for some of the discussions on that subject. It is probably also not viable for you given your controller and bus interface.

    As far as pixmaps are concerned v3.0 will fix the incompatibility with single file make. The filled string drawing algorithm will be updated at some time in the future too but that is not a simple task as their are lots of complexities with fonts.

  4. I have seen the post and have left it open to sort out when I get time but haven't had that time yet due to various project deadlines.

    Thank you for finding it and I will report back when I have had time to properly investigate and correct the master sources.

  5. Note that reparenting a widget is a real hack and is officially not supported by uGFX. The reason is that there are dependencies that may stop things working eg...

    1. A child object must always be completely enclosed within its parent container

    2. A child object must always have a higher z order than its parent container.

    3. There are visibility dependencies.

    I am sure there are others too but those three alone are enough to make this a complex operation requiring deep understanding of the internal workings of uGFX to get right. That complexity is why it is not a standard part of the uGFX API.

    It is much better that you arrange your containers and widgets as non-overlapping, or duplicate such controls across the pages. As an example see the console object on the widgets demo.

  6. Unlikely the compile will affect anything.

    Try just outputting directly a string with Unicode characters in it without using snprintf.

    If that doesn't work there can only be one of a few problems...

    1. Utf8 support is not turned on

    2. Your editor is not putting the Utf8 characters into the string correctly

    3. Your compiler is stripping them out of the string or not encoding them correctly.

    4. The font you are using doesn't map the particular characters used.

    In your case I think 1 or 2 would be the problem as you are seeing 'extra' characters.

  7. You are mixing up compiling and linking.

    uGFX must be compiled with gcc as it is written in C. It will quite happily link with C++ and the header file ugfx.h is fully C++ compatible.

    If you are using make this is really simple...

    .c files get compiled with gcc

    .c++ files get compiled with g++

    Link with g++

     

    While C and C++ are similar languages they are not totally the same.

  8. Ahh.

    GDISP_NEED_STREAMING is completely different to GDISP_HARDWARE_STREAM_WRITE.

    The first is whether the streaming API is enabled in GDISP, the second tells GDISP whether a specific display hardware requires a streamed write methodology. The two are completely different things and are completely independent of each other.

    My guess is that you have been playing with the GDISP_HARDWARE_xxx definitions. Please restore these to the defaults and then try a make clean before compiling again.

  9. With pixmap you don't need to include it in your driver list (or even add the driver list config) as pixmap is handled differently to all other drivers.

    You should also not include the following in your gfxconf.h:

    The GDISP_SCREEN_xxx or GDISP_INITIAL_xxx variables. These should be in your RA8875 board file as they are display specific.

    The GDISP_HARDWARE_xxx variables as they are already appropriately defined in the respective display config file and are modified and played with by the multi-display handling code.

  10. 1. Widget drawing requires a gtimer event to fire. As RAW32 is non-preemptive it requires a gfxYield() to trigger that context switch. When you comment out geventWait, unless you put a gfxYield or gfxSleepMilliseconds call in you will not get drawing. Any geventWait should be sufficient even with only a 1ms delay (even a TIME_IMMEDIATE I think).

    2. Users are commonly interrupt driven and therefore Async so there should be no need for a non-blocking geventWait. The strategy is to create a gtimer task to read the uart buffer data. You can add a gtimerJabI call in your interrupt handler when your uart buffer has enough data which will then wake up the gtimer task. If you really want to make geventWait return immediately use TIME_IMMEDIATE or 1 (1ms) as the parameter.

    3. Without a look at all the code it is impossible for us to say. 

     

  11. I can't answer the SDL questions but I have answers for the other aspects.

    1. You can use the Linux event driver to get mouse/touch input when using framebuffer. Similarly I believe there is also a Linux tty keyboard driver.

    2. You can use the X driver to provide display, mouse & keyboard. Although it is slower than framebuffer or SDL, for something being used for prototyping before moving to real hardware, it is ideal and much easier to get working than SDL.

×
×
  • Create New...