Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. tombalabomba

    Mutiple definitions uGFX + Eclipse + STM32L1

    Hi! Many thanks for clarification! By the way. Are the source files used in the tutorial available somewhere? Since, there are no board files available for the ILI9225 driver I wonder if you could share the one you used in the example. Hence, it would make things easier for understanding how to properly implement by the hardware abstraction by adapting the sources to my particular board.
  3. Yesterday
  4. Joel Bodenmann

    Cannot access the documentation

    Thank you for bringing this to our attention. We'll fix it ASAP.
  5. Endalvik

    Tabset select: slow clearing

    Nevermind -- answered my own question (again): I did find where tabs get cleared before being rendered: gwin_tabset.c ==> gwinTabsetDraw_Std(), which eventually does indeed call gdisp_lld_fill_area(). So the root cause is that my accelerator slows down on unaligned accesses -- which of course will happen with pixels that are half-word! Back to the drawing (or rather filling) board...
  6. Last week
  7. cpu20

    Mutiple definitions uGFX + Eclipse + STM32L1

    This is indeed an IDE feature. It's called the Indexer in Eclipse. The indexer will search through all files you tell it to search through in the settings and tries to warn you when something is missing/might be wrong. You can completely configure the error and warning levels of the indexer. But if the indexer gives an error/warning this does not mean that the project won't build. The compiler and indexer can be configured independently of eachother. You should read this to understand how the compiler and the linker work. In short, the compiler produces object files for each source file you provide (.c, .s, .cpp,...) and the linker puts them all togheter to get the final program. Due to the fact that the compiler compiles every file independently it will not complain if two files contain a function with the same name. However when the linker is putting everything togheter and it finds two different function implementations with the same name, it does not know what to do. If you call the _init() function in this case it does not know which implementation you want to call. The _init() function used here is already implemented in newlib I think (I could be wrong though, it has been a long time since I dug into this) so you should not implement it again in your own code.
  8. tombalabomba

    Mutiple definitions uGFX + Eclipse + STM32L1

    Hi! As I mentioned in my previous post, I get a bunch of additionally HAL error as soon as I modify stm32f439i_raw32_ugfx.c . The HAL errors vanish as soon as I close and reopen the project. As I figured out now these HAL errors were not really the problem since they don't show up in the build output. Hence, it looks like this is a feature from the IDE telling the user that there is something missing for building the particular source file. Unfortunately, for me it was rather a burden than a feature since it distracted me from the central problem. You are right, remove _init(void) from stm32l1152RE_raw32_ugfx.c does fix the error in first place. Apparently, this function is not used in gfxInit() so guess it's no big deal to remove it. But I'm really interested in the root cause of this error in oder to understand how I can prevent such issues in future.
  9. Hello, I cannot access the documentation because the security certificate is out of date. Is it going to be renew any time soon ? Thanks in advance, Guillaume.
  10. Endalvik

    Tabset select: slow clearing

    I am currently using uGFX with NIOS II (on MAX 10), using a generic framebuffer with 16-bits/pixel (RGB565). As part of the linear framebuffer driver, I have added accelerators for gdisp_lld_fill_area(), etc. I have confirmed that I am getting must faster fill than the default fallback "// Worst is pixel drawing" code. In my main application, I have a tabset (with 3 tabs) that fills the entire display. Anytime I select a new tab, I notice an unexpectedly slow tab window clear, right before the newly selected tab is rendered. Subsequently, I am seeing expected performance while drawing filled shapes, so I am confident that my accelerated gdisp_lld_fill_area() is still being called. I have started to look through gdisp.c, but have yet to identify exactly where this tab change window clear is being executed. Could someone point me in the right direction? I would like to make sure that tab window clear is using my accelerated functions. Thanks in advance.
  11. cpu20

    Mutiple definitions uGFX + Eclipse + STM32L1

    Just commenting out the _init() function does the trick for me:
  12. Joel Bodenmann

    Bug in List widget

    Are you able to supply a patch (diff)?
  13. Joel Bodenmann

    Bug in example

    Thank you for bringing this to our attention! As you mentioned yourself there is the need to clean the widget initialization structure prior to using it. We have updated the example code in the wiki.
  14. Pratham

    uGFX BLIT API for RA8875

    Hi, I am using uGFX on Raspberry Pi for displaying graphics on RA8875 based display. Raspberry Pi communicates with display using 4-wire SPI. I am porting the gdisp_lld_blit_area() driver API using BTE (block transfer engine) available in RA8875. I am using write-BTE operation mode with ROP (raster operation) as destination = source. Here is my sample code with this post. screenshots of expected and actual output is also attached. any suggestions/recommendations would be helpful. #if 1//GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__) // macros #define RA8875_MRWC 0x02 #define RA8875_BECR0 0x50 #define RA8875_BECR1 0x51 #define RA8875_HDBE0 0x58 #define RA8875_HDBE1 0x59 #define RA8875_VDBE0 0x5A #define RA8875_VDBE1 0x5B #define RA8875_BEWR0 0x5C #define RA8875_BEWR1 0x5D #define RA8875_BEHR0 0x5E #define RA8875_BEHR1 0x5F #define RA8875_BGCR0 0x60 // = red, next 2 are green and blue #define RA8875_FGCR0 0x63 // = red, next 2 are green and blue #define RA8875_MWCR0 0x40 #define RA8875_MWCR0_GFXMODE 0x00 #define RA8875_MWCR0_TXTMODE 0x80 #define RA8875_MWCR1 0x41 #define RA8875_CURH0 0x46 #define RA8875_CURH1 0x47 #define RA8875_CURV0 0x48 #define RA8875_CURV1 0x49 /** * @brief Function to draw bitmap * @pre GDISP_HARDWARE_BITFILLS is GFXON * * @param[in] g The driver structure * @param[in] destX,destY The area position * @param[in] width,height The area size i.e. width and height * @param[in] fgColor The foreground color * @param[in] bgColor The background color * @param[in] bits The pointer to the bitmap * * @note The parameter variables must not be altered by the driver. */ static GFXINLINE void drawBitmap(GDisplay *g, gI16 destX, gI16 destY, gI16 width, gI16 height, gU16 fgColor, gU16 bgColor, gU8* bits) { // locals gI32 h = 0, w = 0; gU8 temp = 0, tempbkp = 0; static gU32 cnt = 0; /*printf("\ndraw bitmap: x=%d y=%d w=%d h=%d " "x1=%d y1=%d x2=%d y2=%d " "fg=%x bg=%x cnt=%d", destX, destY, width, height, g->p.x1, g->p.y1, g->p.x2, g->p.y2, fgColor, bgColor, ++cnt); */ // always enter graphics mode for BTE operations write_index(g, RA8875_MWCR0); temp = (gU8)read_data(g); tempbkp = temp; temp &= ~RA8875_MWCR0_TXTMODE; write_data(g, temp); // set destination, width and height write_reg16(g, RA8875_HDBE0, destX); write_reg16(g, RA8875_VDBE0, destY); write_reg16(g, RA8875_BEWR0, width); // image width write_reg16(g, RA8875_BEHR0, height); // image height // set colors writeColorReg(g, RA8875_BGCR0, bgColor); writeColorReg(g, RA8875_FGCR0, fgColor); // set cursor position write_reg16(g, RA8875_CURH0, destX); write_reg16(g, RA8875_CURV0, destY); // BTE operation mode // Bits [3:0] 1000b is color expansion 0000b is write-BTE // Bits [7:4] 0111b is start bit position for color expansion // Bits [7:4] 1100b is S=D for write-BTE //write_reg8(g, RA8875_BECR1, (0x07 << 4) | 0x08); // start bit = 7, operation = Color Expansion write_reg8(g, RA8875_BECR1, 0xC0); // write-BTE with ROP as S=D // draw in block mode 0x80, in linear mode 0xE0 write_reg8(g, RA8875_BECR0, 0x80); // begin operation // write command write_index(g, RA8875_MRWC); // write data for (h = 0; h < height; h++) { //printf("\nh=%d -- ", h); for (w = 0; w < width; w += 1) { //printf("%u ", *bits); //usleep(1000); write_data(g, *bits++); } } // set text mode NOTE: this may not be needed to write_index(g, RA8875_MWCR0); //tempbkp = (gU8)read_data(g); //tempbkp |= RA8875_MWCR0_TXTMODE; // Set bit 7 write_data(g, tempbkp); //return from function return; } /** * @brief Fill an area using a bitmap * @pre GDISP_HARDWARE_BITFILLS is GFXON * * @param[in] g The driver structure * @param[in] g->p.x,g->p.y The area position * @param[in] g->p.cx,g->p.cy The area size * @param[in] g->p.x1,g->p.y1 The starting position in the bitmap * @param[in] g->p.x2 The width of a bitmap line * @param[in] g->p.ptr The pointer to the bitmap * * @note The parameter variables must not be altered by the driver. */ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { if((void *)0 == g) { //invalid pointer, return from function return; } // draw the bitmap // 0xFFFF is white // 0x0000 is black drawBitmap(g, g->p.x, g->p.y, g->p.cx*2, g->p.cy, g->p.color, 0x0000, g->p.ptr); //return from function return; } #endif /* use BLIT */ expected-output.bmp blit.c
  15. tombalabomba

    Mutiple definitions uGFX + Eclipse + STM32L1

    Hi! The specific error of a multiple defined _init() function still persists. What changes that I get now the HAL erros additonally. After project clean I get the following compiler output: Right below you can find the error output. The interesting part is that I get now the HAL errors additionally. These errors appeared when I modified stm32f439i_raw32_ugfx.c the first time. So, it looks like the compile tries to compile this file which should be prohibited by setting the filter in the source location tab. Unfortunately, project clean and index rebuild does not change anything. You can find my project in the attachment. Many many thanks for supporting. demo.zip
  16. I found if I try to assign only "down" button: gwinAttachToggle(ghList1, BUTTON_ENTER, 0) Without assign "up" button. Click actually does not works. (Inside code I found that GLIST_FLG_SELECTED assign from element 0 to element1 but at the same time event "up" emitted too and it moves select flag from element 1 to element 0). It works correctly only if I assign both button: gwinAttachToggle(ghList1, BUTTON_ENTER, 0) gwinAttachToggle(ghList1, BUTTON_ESC, 1)
  17. Kirill

    Bug in example

    I think example should be like this: static void createWidgets(void) { GWidgetInit wi; gwinWidgetClearInit(&wi); // Apply the list parameters wi.g.width = 200; wi.g.height = 100; wi.g.y = 10; wi.g.x = 10; wi.text = "List Name"; // Create the actual list ghList1 = gwinListCreate(NULL, &wi, FALSE); }
  18. Earlier
  19. cpu20

    Mutiple definitions uGFX + Eclipse + STM32L1

    Does the error change after you comment the _init() function in stm32f439i_raw32_ugfx.c? Anyway you should do a clean build to make sure there are no old binary files that get linked in. Can you give the compiler output? I doubt that the IDE is buggy. It's based on Eclipse which is a well known and widely used IDE. It can just be tricky to initially set up the project. If you post your project I can take a look to see if something is wrongly configured.
  20. tombalabomba

    Mutiple definitions uGFX + Eclipse + STM32L1

    Hi! This was already one of my thoughts. As I mentioned in my previous post commenting or deliting _init() in stm32f439i_raw32_ugfx.c doesn't fix the problem of getting the error of a multiple defined _init(). That seems odd to me since I'm pretty sure that there is no additional _init() defined in the sources. Additionally, I get now a lot of errors originating from non defined ST32F4 Hal symbols. This should not be the case since stm32f439i_raw32_ugfx.c is excluded from build. The fact that modification of stm32f439i_raw32_ugfx.c brings in this bunch of additional errors is an indication for me that the IDE is buggy. Apparently, source code exclusion doesn' t work out.
  21. Kirill

    Bug in example

    Hi, I figured out some strange behaviour I tried to do example from here https://wiki.ugfx.io/index.php/List In example: static void createWidgets(void) { GWidgetInit wi; // Apply some default values for GWIN wi.customDraw = 0; wi.customParam = 0; wi.customStyle = 0; wi.g.show = FALSE; // Apply the list parameters wi.g.width = 200; wi.g.height = 100; wi.g.y = 10; wi.g.x = 10; wi.text = "List Name"; // Create the actual list ghList1 = gwinListCreate(NULL, &wi, FALSE); } There are no wi.g.parent set. So during initialisation we add widget to windowManager using this function: bool_t _gwinWMAdd(GHandle gh, const GWindowInit *pInit) { #if GWIN_NEED_CONTAINERS // Save the parent gh->parent = pInit->parent; // Ensure the display is consistent with any parents if (gh->parent && (!(gh->parent->flags & GWIN_FLG_CONTAINER) || gh->display != gh->parent->display)) return FALSE; #endif // Add to the window manager if (!_GWINwm->vmt->Add(gh, pInit)) return FALSE; #if GWIN_NEED_CONTAINERS // Notify the parent it has been added if (gh->parent && ((gcontainerVMT *)gh->parent->vmt)->NotifyAdd) ((gcontainerVMT *)gh->parent->vmt)->NotifyAdd(gh->parent, gh); #endif return TRUE; } Look at this condition: if (gh->parent && (!(gh->parent->flags & GWIN_FLG_CONTAINER) || gh->display != gh->parent->display)) return FALSE If parent not NULL it started to check display and display not equal (actually it is just a trash) To fix that behaviour need to clean parent (wi.g.parent = NULL;) I think we should have function to clean Widget structure before initialise.
  22. cpu20

    Mutiple definitions uGFX + Eclipse + STM32L1

    I should have looked closer.The compiler says exactly where it found the second defenition of the init function. The gnu arm libraries already contain an _init function. Just delete the _init() function from the stm32f439i_raw32_ugfx.c file.
  23. tombalabomba

    Mutiple definitions uGFX + Eclipse + STM32L1

    Hi! As mentioned, I modified the example code so that it fits to my CPU. Basically, the only difference to the example code in demo/ugfx/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c is that the clock configuration is different to the Cortex M4 HAL. //stm32l1152RE_raw32_ugfx.c #include "gfx.h" #if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS #undef Red #undef Green #undef Blue #endif #include "stm32l1xx_hal.h" #if GFX_USE_OS_RAW32 void _init(void) { } gTicks gfxSystemTicks(void) { return HAL_GetTick(); } gTicks gfxMillisecondsToTicks(gDelay ms) { return ms; } #endif static void SystemClock_Config(void); void Raw32OSInit(void) { HAL_Init(); SystemClock_Config(); } /** * @brief System Clock Configuration * The system Clock is configured as follow : * System Clock source = PLL (HSE) * SYSCLK(Hz) = 32000000 * HCLK(Hz) = 32000000 * AHB Prescaler = 1 * APB1 Prescaler = 1 * APB2 Prescaler = 1 * HSE Frequency(Hz) = 8000000 * PLLMUL = 12 * PLLDIV = 3 * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 1 * @param None * @retval None */ static void SystemClock_Config(void) { RCC_ClkInitTypeDef RCC_ClkInitStruct; RCC_OscInitTypeDef RCC_OscInitStruct; /* Enable Power Control clock */ __HAL_RCC_PWR_CLK_ENABLE(); /* The voltage scaling allows optimizing the power consumption when the device is clocked below the maximum system frequency, to update the voltage scaling value regarding system frequency refer to product datasheet. */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); /* Enable HSE Oscillator and activate PLL with HSE as source */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = 12; RCC_OscInitStruct.PLL.PLLDIV = 3; HAL_RCC_OscConfig(&RCC_OscInitStruct); //HAL_PWREx_EnableOverDrive(); /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */ RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1); } As I mentioned above I did a grep on my working directory searching the pattern "_init(void)". Besides stm32l1152RE_raw32_ugfx.c the only matching location is /ugfx/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c. So I commented void _init(void) in stm32f439i_raw32_ugfx.c but the error still persists. Additionally I get a bunch of new compile errors since a lot of HAL symbols used in stm32f439i_raw32_ugfx.c can not be resolved. I really wonder how can this be since this file is exclude from build. Unfortunately, right clicking ->Resource Configuration->Exclude from Build doesn't change anything.
  24. cpu20

    UGFX + ChibiOS -RT KERNEL >= 5

    The type name gU32 is defined in "gfx_types.h". You should include this in your build.
  25. cpu20

    Mutiple definitions uGFX + Eclipse + STM32L1

    Everything you did look OK to me. Could it be that something is wrong in the file stm32l1152RE_raw32_ugfx.c? Can you attach it here?
  26. Hi! First of all I have to apologize, the question I have exposes me to be quite a newbie. I'm using openSTM system workbench (Neon.3 Release (4.6.3)) and desperately try to get a bare-metal application using a STM32L1 nucleo board (CubeMX HAL) and ILI9225 TFT running. Since this IDE is essentially based on Eclipse I followed the guide https://wiki.ugfx.io/index.php/Using_Eclipse to set up the project. So I did the following steps. Library Import : demo -> Import ugfx Configure Include Paths : demo -> properties -> C/C++ General -> Paths and Symbols -> Includes : adding /demo/ugfx to all languages and configurations Specify Sources : demo -> properties -> C/C++ General -> Paths and Symbols -> Source Location : adding /demo/ugfx, filter everything except /demo/ugfx/src/gfx_mk.c Copying /demo/ugfx/ gfxconf.example.h to /demo/inc/gfxconf.h, enabling raw32 by #define GFX_USE_OS_RAW32 GFXON Copying and modifing /demo/ugfx/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c to /demo/src/stm32l1152RE_raw32_ugfx.c Including "gfx.h" in and calling gfxInit() in main.c In stm32l1152RE_raw32_ugfx.c there is no code specified in _init(), but it should compile without errors. Unfortunately, it doesn't since I get the following error message. So it looks there is a problem with multiple definitions of void _init(void). I did a grep on my working directory and the only two matches was /demo/ugfx/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c and /demo/src/stm32l1152RE_raw32_ugfx.c. Since the first is excluded from build I doubt that there is really a problem with multiple definitions here. Has anyone faced a similar problem yet? Any help is kindly appreciated.
  27. Kisle

    UGFX + ChibiOS -RT KERNEL >= 5

    Hi There, I know that there are quite a handful of other topics out there that talk about the same Problem. But somehow, I could not find a solution for me yet. For a few days I have been trying to get ugfx together with chibios and the STM32F429i to work. But so far nothing worked out for me. I found some older projects that actually worked with older ChibiOS Versions, but for the newer Version i never got it to actually display something. I use, ChibiOS-version 18.2.1 and I would like to use the up to date ugfx Version that i pulled from there: https://git.ugfx.io/uGFX/uGFX Then I basically tried to modify this example https://community.ugfx.io/files/file/22-stm32f429i-discovery-with-chibios-using-chibistudio/ to get it to work with the newer ugfx version. It would be nice if someone could share a running minimalistic setup... Otherwise, this is the compiler errors I get when compiling: In file included from ../ugfx/boards/base/STM32F429i-Discovery/chibios/stm32f429i_discovery_sdram.c:4:0: ../ugfx/boards/base/STM32F429i-Discovery/chibios/stm32f429i_discovery_sdram.h:89:25: error: unknown type name 'gU32' void SDRAM_WriteBuffer(gU32* pBuffer, gU32 uwWriteAddress, gU32 uwBufferSize); and before that I also receive some warnings: In file included from ../ugfx/src/gtrans/../../src/gfx.h:148:0, from ../ugfx/src/gtrans/../../gfx.h:7, from ../ugfx/src/gtrans/gtrans.c:9: ../ugfx/src/gtrans/../../src/gdisp/gdisp_rules.h:69:7: warning: "GDISP_HARDWARE_PIXELREAD" is not defined, evaluates to 0 [-Wundef] #if GDISP_HARDWARE_PIXELREAD Thanks for your help Greetings Kisle
  28. inmarket

    Online Font Converter

    Note you can also use the command line binaries for windows or Linux that are found in the repository under the tools directory. The binaries have none of the restrictions of the web version.
  29. chrisjn52

    Online Font Converter

    The font converter is now working much better but the Custom Filter option doesn't allow the From field to be entered. Since this is coded as a Not Allowed field I am assuming this is due to a known issue with the McuFont converter? Currently it would seem that in order to include a character such as the Omega symbol I have to use the No Filtering option but after several minutes I get the following response from the browser: fonts.ugfx.io didn’t send any data. ERR_EMPTY_RESPONSE Many thanks for your support.
  1. Load more activity
×