Jump to content

All Activity

This stream auto-updates     

  1. Last week
  2. Earlier
  3. Uup115

    Arduino Compile errors

    Hello, Version 2.9 is generating compilation errors for "ugfx_test.ino". Atfer following "ugfx_2.9\boards\base\ArduinoTinyScreen\readme.txt" instructions (see attached file), I'm getting the following errors. I noticed the instructions are missing step 2. Arduino: 1.8.6 (Windows 7), Board: "Arduino Mini, ATmega328P" Build options changed, rebuilding all In file included from C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:5:0: C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.h:28:24: error: variable or field 'SSD1331_write_cmd' declared void void SSD1331_write_cmd(gU8 cmd); ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.h:28:24: error: 'gU8' was not declared in this scope C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.h:29:25: error: variable or field 'SSD1331_write_data' declared void void SSD1331_write_data(gU8 data); ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.h:29:25: error: 'gU8' was not declared in this scope C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:29:23: error: variable or field 'writeGPIO' declared void static void writeGPIO(gU8 regAddr, gU8 regData) ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:29:23: error: 'gU8' was not declared in this scope C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:29:36: error: 'gU8' was not declared in this scope static void writeGPIO(gU8 regAddr, gU8 regData) ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp: In function 'void SSD1331_init_board()': C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:45:34: error: 'writeGPIO' was not declared in this scope writeGPIO(GPIO_RegData,~GPIO_RES);//reset low, CS/other pins high ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp: In function 'void SSD1331_releasebus()': C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:68:42: error: 'writeGPIO' was not declared in this scope writeGPIO(GPIO_RegData,GPIO_TRANSFER_END); ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp: At global scope: C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:72:24: error: variable or field 'SSD1331_write_cmd' declared void void SSD1331_write_cmd(gU8 cmd) { ^ C:\Users\ghost\Documents\Arduino\libraries\gfx\board_SSD1331.cpp:72:24: error: 'gU8' was not declared in this scope Multiple libraries were found for "gfx.h" Used: C:\Users\ghost\Documents\Arduino\libraries\gfx Not used: C:\Users\ghost\Documents\Arduino\libraries\ugfx_2.9 exit status 1 Error compiling for board Arduino Mini. readme.txt
  4. MattiaBerton

    uGFX-Studio v0.20 - Beta

    Hello, I sent a PM to Joel, but perhaps there are some problems... can I join the beta testing group? Thanks, Mattia
  5. MPU int Mpu_Init(void) { ///// SDIO MPU_Region_InitTypeDef MPU_InitStructSDIO; /// Disable the MPU HAL_MPU_Disable(); /// Enable the MPU HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); MPU_Region_InitTypeDef MPU_InitStruct; HAL_MPU_Disable(); MPU_InitStruct.Enable=MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x60000000; MPU_InitStruct.Size = MPU_REGION_SIZE_1MB; MPU_InitStruct.AccessPermission=MPU_REGION_FULL_ACCESS; MPU_InitStruct.TypeExtField=MPU_TEX_LEVEL0; MPU_InitStruct.IsCacheable=MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsBufferable=MPU_ACCESS_BUFFERABLE; MPU_InitStruct.IsShareable=MPU_ACCESS_SHAREABLE; MPU_InitStruct.Number=MPU_REGION_NUMBER0; MPU_InitStruct.SubRegionDisable=0x00; MPU_InitStruct.DisableExec=MPU_INSTRUCTION_ACCESS_ENABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); } /// board_H.. #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H #define LCD_PIN_PWM GPIO_PIN_13 #define LCD_PORT_PWM GPIOD #define LCD_PIN_RESET GPIO_PIN_11 #define LCD_PORT_RESET GPIOD #define SSD1963_DELAY(ms) gfxSleepMilliseconds(ms) #define SSD1963_RESET_PIN_SET HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11,GPIO_PIN_SET); #define SSD1963_RESET_PIN_RESET HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11,GPIO_PIN_RESET); #define SSD1963_REG (*((volatile unsigned short *) 0x60000000)) #define SSD1963_RAM (*((volatile unsigned short *) 0x60040000)) #define SSD1963_WRITE_CMD(cmd) SSD1963_REG=((unsigned short)cmd) #define SSD1963_WRITE_DATA(data) SSD1963_RAM=((unsigned short)data) #define SSD1963_READ_DATA() SSD1963_RAM /* static const LCD_Parameters DisplayTimings[] = { // You need one of these array elements per display { 800, 480, // Panel width and height 0, 0, 48, // Horizontal Timings (back porch, front porch, pulse) CALC_PERIOD(800,0,0,48), // Total Horizontal Period (calculated from above line) 2, 2, 10, // Vertical Timings (back porch, front porch, pulse) CALC_PERIOD(480,2,2,10), // Total Vertical Period (calculated from above line) CALC_FPR(800,480,2,2,48,2,2,10,60ULL), // FPR - the 60ULL is the frames per second. Note the ULL! gFalse, // Flip horizontally gFalse // Flip vertically }, };*/ #define PANEL_WIDTH 800 #define PANEL_HEIGHT 480 #define HORIZONTAL_BACK_PORCH 46 #define HORIZONTAL_FRONT_PORCH 210 #define HORIZONTAL_PULSE_WIDTH 1 #define HORIZONTAL_TOTAL 1056 #define VERTICAL_BACK_PORCH 23 #define VERTICAL_FRONT_PORCH 22 #define VERTICAL_PULSE_WIDTH 1 #define VERTICAL_TOTAL 525 static const LCD_Parameters DisplayTimings[] = { // You need one of these array elements per display { PANEL_WIDTH, PANEL_HEIGHT, HORIZONTAL_BACK_PORCH, HORIZONTAL_FRONT_PORCH, HORIZONTAL_PULSE_WIDTH, CALC_PERIOD(PANEL_WIDTH,HORIZONTAL_BACK_PORCH, HORIZONTAL_FRONT_PORCH,HORIZONTAL_BACK_PORCH), /// HORIZONTAL_TOTAL VERTICAL_BACK_PORCH, VERTICAL_FRONT_PORCH, VERTICAL_PULSE_WIDTH, CALC_PERIOD(PANEL_HEIGHT, VERTICAL_BACK_PORCH, VERTICAL_FRONT_PORCH,HORIZONTAL_BACK_PORCH), //CALC_FPR(PANEL_WIDTH,480,2,2,48,2,2,10,60ULL) HORIZONTAL_TOTAL * VERTICAL_TOTAL * 60ULL * 1048576 / 100000000, gFalse, // Flip horizontally gTrue // Flip vertically }, }; static GFXINLINE void init_board(GDisplay *g) { (void) g; GPIO_InitTypeDef gpio = {0}; SRAM_HandleTypeDef hsram1 = {0}; FMC_NORSRAM_TimingTypeDef Timing = {0}; FMC_NORSRAM_TimingTypeDef ExtTiming = {0}; /// Pwm gpio.Pin = LCD_PIN_PWM; gpio.Mode = GPIO_MODE_OUTPUT_PP; gpio.Pull = GPIO_NOPULL; gpio.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LCD_PORT_PWM, &gpio); /// Reset gpio.Pin = LCD_PIN_RESET; gpio.Mode = GPIO_MODE_OUTPUT_PP; gpio.Pull = GPIO_NOPULL; gpio.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LCD_PORT_RESET, &gpio); __HAL_RCC_FMC_CLK_ENABLE(); /// FMC GPIO Configuration /// PE7 ------> FMC_D4 /// PE8 ------> FMC_D5 /// PE9 ------> FMC_D6 /// PE10 ------> FMC_D7 /// PE11 ------> FMC_D8 /// PE12 ------> FMC_D9 /// PE13 ------> FMC_D10 /// PE14 ------> FMC_D11 /// PE15 ------> FMC_D12 /// PD8 ------> FMC_D13 /// PD9 ------> FMC_D14 /// PD10 ------> FMC_D15 /// PD12 ------> FMC_A17 /// PD14 ------> FMC_D0 /// PD15 ------> FMC_D1 /// PD0 ------> FMC_D2 /// PD1 ------> FMC_D3 /// PD4 ------> FMC_NOE /// PD5 ------> FMC_NWE /// PD7 ------> FMC_NE1 gpio.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10 |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14 |GPIO_PIN_15; gpio.Mode = GPIO_MODE_AF_PP; gpio.Pull = GPIO_NOPULL; gpio.Speed = GPIO_SPEED_FREQ_VERY_HIGH; gpio.Alternate = GPIO_AF12_FMC; HAL_GPIO_Init(GPIOE, &gpio); gpio.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_12 |GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1 |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_7; gpio.Mode = GPIO_MODE_AF_PP; gpio.Pull = GPIO_NOPULL; gpio.Speed = GPIO_SPEED_FREQ_VERY_HIGH; gpio.Alternate = GPIO_AF12_FMC; HAL_GPIO_Init(GPIOD, &gpio); /// USER CODE BEGIN FMC_MspInit 1 HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11,GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOD, GPIO_PIN_4, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOD, GPIO_PIN_5, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOD, GPIO_PIN_7, GPIO_PIN_SET); /// Perform the SRAM1 memory initialization sequence hsram1.Instance = FMC_NORSRAM_DEVICE; hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE; /// hsram1.Init hsram1.Init.NSBank = FMC_NORSRAM_BANK1; hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE; hsram1.Init.MemoryType = FMC_MEMORY_TYPE_SRAM; hsram1.Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_16; hsram1.Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE; hsram1.Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW; hsram1.Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS; hsram1.Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE; hsram1.Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE; hsram1.Init.ExtendedMode = FMC_EXTENDED_MODE_ENABLE; hsram1.Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE; hsram1.Init.WriteBurst = FMC_WRITE_BURST_DISABLE; hsram1.Init.ContinuousClock = FMC_CONTINUOUS_CLOCK_SYNC_ONLY; hsram1.Init.WriteFifo = FMC_WRITE_FIFO_ENABLE; hsram1.Init.PageSize = FMC_PAGE_SIZE_NONE; /// Timing Timing.AddressSetupTime = 3; Timing.AddressHoldTime = 15; Timing.DataSetupTime = 14; Timing.BusTurnAroundDuration = 0; Timing.CLKDivision = 16; Timing.DataLatency = 17; Timing.AccessMode = FMC_ACCESS_MODE_A; /// ExtTiming ExtTiming.AddressSetupTime = 1; ExtTiming.AddressHoldTime = 15; ExtTiming.DataSetupTime = 2; ExtTiming.BusTurnAroundDuration = 0; ExtTiming.CLKDivision = 16; ExtTiming.DataLatency = 17; ExtTiming.AccessMode = FMC_ACCESS_MODE_A; if (HAL_SRAM_Init(&hsram1, &Timing, &ExtTiming) != HAL_OK) { Error_Handler( ); } } static GFXINLINE void post_init_board(GDisplay *g) { (void) g; } static GFXINLINE void setpin_reset(GDisplay *g, gBool state) { (void) g; (void) state; if(state==gFalse) { printf("SSD1963_RESET_PIN_SET\n\r"); SSD1963_RESET_PIN_SET; } else { printf("SSD1963_RESET_PIN_RESET\n\r"); SSD1963_RESET_PIN_RESET; } } static GFXINLINE void acquire_bus(GDisplay *g) { (void) g; } static GFXINLINE void release_bus(GDisplay *g) { (void) g; } static GFXINLINE void write_index(GDisplay *g, gU16 index) { (void) g; (void) index; SSD1963_WRITE_CMD(index); } static GFXINLINE void write_data(GDisplay *g, gU16 data) { (void) g; (void) data; SSD1963_WRITE_DATA(data); } #endif /* _GDISP_LLD_BOARD_H */ /// gdisp_lld_ssd1963 LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { unsigned short color_bus; acquire_bus(g); set_viewport(g); write_index(g, SSD1963_READ_MEMORY_START); color_bus = SSD1963_READ_DATA(); release_bus(g); return (color_t)color_bus ; } LLDSPEC gBool gdisp_lld_init(GDisplay *g) { LCD_Parameters * lcdp; /// Some displays (e.g. Displaytech) have an on-board setup process which just requires that we don't touch anything for a time after power up. /// For this type of display define GDISP_SSD1963_NO_INIT as TRUE, and implement an appropriate delay in the board file. /// With such displays we can skip most of the initialisation. We also skip pulsing the reset pin, since it /// will introduce an extra second or so of display to the startup time. // The private area for this controller is the LCD timings lcdp = (void *)&DisplayTimings[g->controllerdisplay]; g->priv = lcdp; // Initialise the board interface init_board(g); /// Some displays (e.g. Displaytech) have an on-board setup process which just requires that we don't touch anything for a time after power up. /// For this type of display define GDISP_SSD1963_NO_INIT as GFXON, and implement an appropriate delay in the board file. /// With such displays we can skip most of the initialisation. We also skip pulsing the reset pin, since it /// will introduce an extra second or so of display to the startup time. // The private area for this controller is the LCD timings lcdp = (void *)&DisplayTimings[g->controllerdisplay]; g->priv = lcdp; // Initialise the board interface //init_board(g); #if !GDISP_SSD1963_NO_INIT // Hardware reset setpin_reset(g, gTrue); gfxSleepMilliseconds(5); setpin_reset(g, gFalse); gfxSleepMilliseconds(5); #endif // Get the bus for the following initialisation commands acquire_bus(g); #if !GDISP_SSD1963_NO_INIT write_index(g, SSD1963_SOFT_RESET); // Software reset - clears almost everything (apart from PLL) write_index(g, SSD1963_SOFT_RESET); // Software reset - clears almost everything (apart from PLL) write_index(g, SSD1963_SOFT_RESET); // Software reset - clears almost everything (apart from PLL) gfxSleepMilliseconds(5); /// Driver PLL config write_index(g, SSD1963_SET_PLL_MN); write_data(g, 35); // PLLclk = REFclk (10Mhz) * 36 (360Mhz) write_data(g, 2); // SYSclk = PLLclk / 3 (120MHz) write_data(g, 54); // Apply calculation bit, else it is ignored write_reg(g, SSD1963_SET_PLL, 0x01); // Enable PLL gfxSleepMilliseconds(5); /*write_reg(g, SSD1963_SET_PLL, 0x03); // Use PLL */ write_index(g, SSD1963_SET_PLL); gfxSleepMilliseconds(1); /// !!!! write_data(g, 0x03); gfxSleepMilliseconds(1); /// !!!! //SSD1963_WRITE_CMD(0x00E6); /// PLL setting for PCLK, depends on resolution //SSD1963_WRITE_DATA(0x0003); //SSD1963_WRITE_DATA(0x00FF); //SSD1963_WRITE_DATA(0x00FF); /// LCD panel parameters write_index(g, SSD1963_SET_LCD_MODE); write_data(g, lcdp->mode & 0xFF); write_data(g, (lcdp->mode >> 8) & 0xFF); /// write_data(g, 0x18); //Enabled dithering /// write_data(g, 0x00); write_data16(g, lcdp->width-1); write_data16(g, lcdp->height-1); write_data(g, 0x00); // RGB - line sequences for serial TFT #endif /// Display flipping if (lcdp->flipHorz) { write_reg(g, SSD1963_SET_ADDRESS_MODE, SSD1963_ADDR_MODE_FLIP_HORZ); } else if (lcdp->flipVert) { write_reg(g, SSD1963_SET_ADDRESS_MODE, SSD1963_ADDR_MODE_FLIP_VERT); } else if (lcdp->flipHorz && lcdp->flipVert) { write_reg(g, SSD1963_SET_ADDRESS_MODE, SSD1963_ADDR_MODE_FLIP_VERT | SSD1963_ADDR_MODE_FLIP_HORZ); } else { write_reg(g, SSD1963_SET_ADDRESS_MODE, 0x00); } write_reg(g, SSD1963_SET_PIXEL_DATA_INTERFACE, SSD1963_PDI_16BIT565); write_reg(g, SSD1963_SET_PIXEL_FORMAT, 0x50); #if !GDISP_SSD1963_NO_INIT /// LCD Clock specs write_index(g, SSD1963_SET_LSHIFT_FREQ); write_data(g, (lcdp->fpr >> 16) & 0xFF); write_data(g, (lcdp->fpr >> 8) & 0xFF); write_data(g, lcdp->fpr & 0xFF); write_index(g, SSD1963_SET_HORI_PERIOD); write_data16(g, lcdp->hperiod); write_data16(g, lcdp->hpulse + lcdp->hbporch); write_data(g, lcdp->hpulse - 1); write_data(g, 0x00); write_data(g, 0x00); write_data(g, 0x00); write_index(g, SSD1963_SET_VERT_PERIOD); write_data16(g, lcdp->vperiod); write_data16(g, lcdp->vpulse + lcdp->vbporch); write_data(g, lcdp->vpulse - 1); write_data(g, 0x00); write_data(g, 0x00); #if 0 /// Enable DBC to control Backlight write_index(g, SSD1963_SET_DBC_CONF); write_data(g, 0x2F); #endif #endif /* #if 0 /// Tear effect indicator ON. This is used to tell the host MCU when the driver is not refreshing the panel (during front/back porch) write_reg(g, SSD1963_SET_TEAR_ON, 0x00); #endif */ /// Turn on write_index(g, SSD1963_SET_DISPLAY_ON); /// Turn on the back-light set_backlight(g, GDISP_INITIAL_BACKLIGHT); // Finish Init post_init_board(g); // Release the bus release_bus(g); /// Initialise the GDISP structure g->g.Width = lcdp->width; g->g.Height = lcdp->height; g->g.Orientation = gOrientation0; g->g.Powermode = gPowerOn; g->g.Backlight = GDISP_INITIAL_BACKLIGHT; g->g.Contrast = GDISP_INITIAL_CONTRAST; HAL_GPIO_WritePin(LCD_PORT_PWM, LCD_PIN_PWM, GPIO_PIN_SET); return gTrue; }
  6. 0961548396

    uGFX-Studio v0.20 - Beta

    Hello, Joel  I'm a student. please allow me to join the µGF X-Stud io beta testing group? thank you!!
  7. Joel Bodenmann

    ST7920 and NOKIA LCD 5110 Monochome and Stm32F103CB (128kb, 20kb RAM)

    There's currently no driver for the ST7920 display controller that comes with the µGFX library but µGFX is very agnostic: It will work with virtually anything. There are plenty of existing GDISP drivers (also for monochrome displays) that you can use as examples to implement your ST7920 driver.
  8. Nick Nifontov

    ST7920 and NOKIA LCD 5110 Monochome and Stm32F103CB (128kb, 20kb RAM)

    First of all , Stm32f103 is cheap and very powerful chip. I plan 8-10kB RAM for uGFX. ST7920 - have you faced with this driver?
  9. Yosmany

    µGFX Library

    Thanks to all the community for provide this for free. Starting to migrate from v2.8. Thanks a lot. Best regards.
  10. Joel Bodenmann

    ST7920 and NOKIA LCD 5110 Monochome and Stm32F103CB (128kb, 20kb RAM)

    The STM32F103 is quite an outdated microcontroller. Any particular reason why you'd be using this model? µGFX will definitely work in all of those configurations. How much RAM you want to have to work with is of course another discussion (and your personal decision). µGFX can work with very little resources. Having more resources available just enables you to do fancier stuff.
  11. Joel Bodenmann

    STM32L1 nucleo + ILI9225

    Happy to hear that you got it working! The issue with the chip select sounds like the GDISP driver is not properly calling those functions.
  12. inmarket

    ChibiOS 18 or ChibiOS 19 support

    Editing chibios.c/h is the way to go. We have already added support in our uGFX v3 code but that is significantly different to the current V2 code base. Due to the significant changes for v3, V2 is currently in lock-down (emergency bug fixes only). V3 is not yet available for the public as changes are still in progress.
  13. inmarket

    Minesweeper Error fails compile

    There appear to be 2 things it is complaining about... 1. It is missing the math library. Add -lm to the link line. 2. It appears you have turned on mouse support but have not included a mouse driver. The raspberry pi uses the standard Linux event device if running in framebuffer mode, or the X input driver if running in X mode.
  14. KevinA

    Minesweeper Error fails compile

    Just tried the PI setup, Hello World worked with a couple of warnings but when I attempped to compile minesweeper I got: Compiling ../resources/ugfx/src/ginput/ginput_mouse.c ../resources/ugfx/src/ginput/ginput_mouse.c: In function '_gmouseInitDriver': ../resources/ugfx/src/ginput/ginput_mouse.c:693:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!gmvmt(m)->init((GMouse *)g, driverinstance)) ^~ ../resources/ugfx/src/ginput/ginput_mouse.c:697:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if (!gtimerIsActive(&MouseTimer)) ^~ ../resources/ugfx/src/ginput/ginput_mouse.c: In function 'ginputCalibrateMouse': ../resources/ugfx/src/ginput/ginput_mouse.c:814:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!(gmvmt(m)->d.flags & GMOUSE_VFLG_CALIBRATE)) ^~ ../resources/ugfx/src/ginput/ginput_mouse.c:817:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' return CalibrateMouse(m); ^~~~~~ Compiling ../resources/ugfx/src/ginput/ginput_keyboard.c Compiling ../resources/ugfx/src/ginput/ginput_keyboard_microcode.c Compiling ../resources/ugfx/src/ginput/ginput_toggle.c Compiling ../resources/ugfx/src/ginput/ginput_dial.c Compiling ../resources/ugfx/src/gadc/gadc.c Compiling ../resources/ugfx/src/gaudio/gaudio.c Compiling ../resources/ugfx/src/gmisc/gmisc.c Compiling ../resources/ugfx/src/gmisc/gmisc_arrayops.c Compiling ../resources/ugfx/src/gmisc/gmisc_matrix2d.c Compiling ../resources/ugfx/src/gmisc/gmisc_trig.c Compiling ../resources/ugfx/src/gmisc/gmisc_hittest.c Compiling ../resources/ugfx/src/gfile/gfile.c Compiling ../resources/ugfx/src/gfile/gfile_fs_native.c Compiling ../resources/ugfx/src/gfile/gfile_fs_ram.c Compiling ../resources/ugfx/src/gfile/gfile_fs_rom.c Compiling ../resources/ugfx/src/gfile/gfile_fs_fatfs.c Compiling ../resources/ugfx/src/gfile/gfile_fs_petitfs.c Compiling ../resources/ugfx/src/gfile/gfile_fs_mem.c Compiling ../resources/ugfx/src/gfile/gfile_fs_chibios.c Compiling ../resources/ugfx/src/gfile/gfile_fs_strings.c Compiling ../resources/ugfx/src/gfile/gfile_printg.c Compiling ../resources/ugfx/src/gfile/gfile_scang.c Compiling ../resources/ugfx/src/gfile/gfile_stdio.c Compiling ../resources/ugfx/src/gfile/gfile_fatfs_wrapper.c Compiling ../resources/ugfx/src/gfile/gfile_fatfs_diskio_chibios.c Compiling ../resources/ugfx/src/gfile/gfile_petitfs_wrapper.c Compiling ../resources/ugfx/src/gfile/gfile_petitfs_diskio_chibios.c Compiling ../resources/ugfx/src/gtrans/gtrans.c Compiling ../resources/ugfx/drivers/gdisp/framebuffer/gdisp_lld_framebuffer.c Compiling ../resources/ugfx/demos/games/minesweeper/main.c Compiling ../resources/ugfx/demos/games/minesweeper/mines.c Linking .build/minesweeper /tmp/ccG3KGFl.ltrans2.ltrans.o: In function `_gmouseInit': <artificial>:(.text+0x17c0): undefined reference to `GMOUSEVMT_OnlyOne' /tmp/ccG3KGFl.ltrans9.ltrans.o: In function `gdispGFillArc': <artificial>:(.text+0x70): undefined reference to `cos' <artificial>:(.text+0xbc): undefined reference to `sin' <artificial>:(.text+0xd4): undefined reference to `floor' <artificial>:(.text+0x114): undefined reference to `cos' <artificial>:(.text+0x160): undefined reference to `sin' <artificial>:(.text+0x178): undefined reference to `floor' /tmp/ccG3KGFl.ltrans10.ltrans.o: In function `gdispGDrawThickArc': <artificial>:(.text+0x1f0): undefined reference to `tan' <artificial>:(.text+0x29c): undefined reference to `tan' <artificial>:(.text+0x37c): undefined reference to `tan' <artificial>:(.text+0x428): undefined reference to `tan' /tmp/ccG3KGFl.ltrans11.ltrans.o: In function `gdispGDrawArc': <artificial>:(.text+0xd84): undefined reference to `sin' <artificial>:(.text+0xdb0): undefined reference to `cos' <artificial>:(.text+0xdc8): undefined reference to `floor' <artificial>:(.text+0xe18): undefined reference to `sin' <artificial>:(.text+0xe64): undefined reference to `cos' <artificial>:(.text+0xe7c): undefined reference to `floor' collect2: error: ld returned 1 exit status ../resources/ugfx/tools/gmake_scripts/compiler_gcc.mk:298: recipe for target '.build/minesweeper' failed make: *** [.build/minesweeper] Error 1 NOTE: I do not have the 7" display with a touch screen, the PI Zero W is running on an HDMI monitor with a Logitech K400+ keyboard. Is there a means to set input to the keyboard tablet?
  15. catkiller

    ChibiOS 18 or ChibiOS 19 support

    Hi, I'm trying to use uGFX with these versions of ChibiOS, unfortunately i'm getting unsupported version of ChibiOS. Is there a way to do this ? maybe edit gos_chibios.c/h ? Thanks, Adrian.
  16. tombalabomba

    STM32L1 nucleo + ILI9225

    Meanwhile, I ended up with a working configuration. Basically, I had to fix two problems. The first was indeed the wrong SPI configuration. In contrast to many other ILI driver the ILI9225 drivers requires CPOL = 1: hspi2.Init.CLKPolarity = SPI_POLARITY_HIGH; On the other hand there was also a problem with the chip select signal. Controlling CS in acquire_bus(GDisplay* g) and release_bus(GDisplay* g) didn't do the job and I had to control the chip select signal right before and after data transmission.
  17. I plan to use ST7920 128x64 monochrome LCD at Stm32F103CB CPU. Have anybody a positive/negative experience? 20kb RAM and 128kb flash will be enoough for monochrome theme at 128x64 resolution with minimum object at scene? Also plan use a Lite version a Nokia LCD 5110 (84x84, PCD8544 driver). Nokia LCD 5110 - [https://www.aliexpress.com/item/Free-shipping-1pcs-New-Module-Blue-backlight-84-48-84x84-LCD-adapter-PCB-for-Nokia/32526061324.html?spm=2114.search0604.3.2.6e95623cUMX51d&s=p&ws_ab_test=searchweb0_0,searchweb201602_6_10065_10068_319_10059_10884_317_10887_10696_321_322_10084_453_10083_454_10103_10618_10307_537_536_10902,searchweb201603_59,ppcSwitch_0&algo_expid=e7f4aac2-486a-4b88-befc-921857f9a2f5-0&algo_pvid=e7f4aac2-486a-4b88-befc-921857f9a2f5] ST7920 - [https://www.aliexpress.com/item/Free-shipping-LCD-Board-12864-LCD12864-5V-display-With-Chinese-word-stock-with-backlight-12864-5V/32524858507.html?spm=a2g0v.10010108.1000001.7.633679c7USm51o&ws_ab_test=searchweb0_0,searchweb201602_6_10065_10068_319_10059_10884_317_10887_10696_321_322_10084_453_10083_454_10103_10618_10307_537_536_10902,searchweb201603_59,ppcSwitch_0&algo_expid=dad4230d-85a9-4e18-a175-eac9eb01639d-0&algo_pvid=dad4230d-85a9-4e18-a175-eac9eb01639d]
  18. catkiller

    STM32F103C8T6 + ILI9341 compiling fine TFT not working

    Hi, I was wondering if it's possible to share your project ? Regards, Adrian.
  19. GwinPrintg uses the internal printg framework which requires gfile. GwinPrintg effectively creates a pseudo file based on each window. This in practice is a very efficient use of code reuse. For now enable GFILE and the "string" sub-system as that enables sprintf equivalent functionality and the string sub-system is tiny. I will look at how easy it is to change the code so it can either be used without GFILE or at least without any sub-module file-systems turned on.
  20. Hi, is there any specific reason why gwinPrintg function can only be used if the gfile is enabled (and therefore also one of the file backends as the compilation fails with no backed enabled). I find this function quite handy, but as I don't use ugfx filesystem api, I don't want to enable the whole gfile stuff... Thanks you, Jakub
  21. inmarket

    CAN Dashboard Project

    And the development boards for these chips are generally cheap eg a STM32F4-Discovery board which includes the LCD is somewhere around US$25 from memory.
  22. Joel Bodenmann

    Donations

    Hi, We appreciate your motivation to donate. Once we started selling commercial licenses we decided to take down the donation option. Money is clearly the main hold-back issue here as we can't afford more man-power but donations usually don't result in an amount and steady supply of money that would allow to improve this. We're close to release µGFX v2.9. It's already ready - we just need to do the actual release. µGFX v3.0 is also making progress
  23. Joel Bodenmann

    CAN Dashboard Project

    Hello & Welcome to the µGFX community! There are many factors to consider such as the resolution and color space you want. The more pixels you have to control the more resources you'll need (memory, CPU, bandwidth, ...). For something of this size the newer STM32F4 families or the STM32F7/STM32H7 microcontrollers are extremely popular. If you're not very experienced I'd stay away from the STM32H7 for the moment as support for it seems to be quite scarce on all levels (including debugger support). The STM32F7 is by now pretty well established but tends to be a lot harder to work with compared to an "old school" STM32F4 due to newly introduced technologies such as the memory cache which can lead to many sleepless nights: http://www.chibios.org/dokuwiki/doku.php?id=chibios:articles:cortexm7_dma_guide The STM32F429/STM32F439/STM32F469 are extremely well supported and will most likely provide enough resources for what you're after. Also, you can get various development boards for those with displays so you can get yourself familiar with all the software components before you have to mess with custom hardware.
  24. motorsportmaker

    CAN Dashboard Project

    Hi, I currently use a 4DSytems 5" display with a Teensy 3.2 board and Waveshare can transceiver. It seems to work quite well, but I feel restricted with what I can do due to the amount of time it takes to send data to the screen via a serial connection. I'm not precious about what microcontroller I use, the only reason I opted for the Teensy was it's form factor and the fact it had CAN. What would you guys suggest I do to move away from a serial HMI type display, and the expense of a 4DSystems display? Happy to consider anything. Many Thanks Tim
  25. Joel Bodenmann

    STM32L1 nucleo + ILI9225

    The ILIxxxx display controllers are known to suffer from differences across series and revisions. Also, some (chinese) sources love to sell you an ILI9225 as an ILI9220 and so on. Therefore, once you confirmed that the SPI is working correctly, try to grab the initialization code (sequence) from your supplied and plug it into the init() function of the corresponding µGFX driver. Another thing you might want to do is trying to read out the display controllers version register / chip ID. This will tell you exactly what display controller you have and will also confirm that the communication is working well.
  26. tombalabomba

    STM32L1 nucleo + ILI9225

    I struggle to get my ILI9225 driven display on a STM32L1 nucleo board running. Essentially. Below you can find my application code and the board file I use. main.c : #include "stm32l1xx.h" #include "stm32l1xx_nucleo.h" #include "gfx.h" #include "stm32l1xx_hal.h" #include "board_ILI9225.h" void SystemClock_Config(void); void Error_Handler(void); int main(void) { coord_t width, height; coord_t i, j; HAL_Init(); SystemClock_Config(); gfxInit(); width = gdispGetWidth(); height = gdispGetHeight(); gdispDrawBox(10, 10, width/2, height/2, Yellow); gdispFillArea(width/2, height/2, width/2-10, height/2-10, Blue); gdispDrawLine(5, 30, width-50, height-40, Red); while (TRUE) { for (i = 5, j = 0; i < width && j < height; i += 7, j += i/20) { gdispDrawPixel(i, j, White); } gfxSleepMilliseconds(500); HAL_GPIO_TogglePin(LD2_PORT, LD2_Pin); } } void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /**Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); /**Initializes the CPU, AHB and APB busses clocks */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12; RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); } /**Initializes the CPU, AHB and APB busses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |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; if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) { Error_Handler(); } } void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ /* USER CODE END Error_Handler_Debug */ } board_ILI9225.h: #ifndef _GDISP_LLD_BOARD_H #define _GDISP_LLD_BOARD_H #include "stm32l1xx_hal.h" #include "stm32l1xx_hal_spi.h" #include "gfx.h" #define LCD_PORT GPIOB #define LCD_DC_Pin GPIO_PIN_2 #define LCD_RST_Pin GPIO_PIN_11 #define LCD_SPI_SS_Pin GPIO_PIN_12 #define LCD_SPI_SCK_Pin GPIO_PIN_13 #define LCD_SPI_MOSI_Pin GPIO_PIN_15 #define LD2_PORT GPIOA #define LD2_Pin GPIO_PIN_5 SPI_HandleTypeDef hspi2; //------------------------------------------------------------------------- static GFXINLINE void init_board(GDisplay *g) { GPIO_InitTypeDef GPIO_InitStruct; (void)g; // SPI configuration __SPI2_CLK_ENABLE(); /* CLKPolarity CLKPhase MOSI changes on SCK value when inactive SPI_POLARITY_HIGH SPI_PHASE_2EDGE Falling Edge High SPI_POLARITY_LOW SPI_PHASE_2EDGE Rising Edge Low SPI_POLARITY_LOW SPI_PHASE_1EDGE Falling Edge Low SPI_POLARITY_HIGH SPI_PHASE_1EDGE Rising Edge High */ hspi2.Instance = SPI2; hspi2.Init.Mode = SPI_MODE_MASTER; hspi2.Init.Direction = SPI_DIRECTION_1LINE; hspi2.Init.DataSize = SPI_DATASIZE_8BIT; hspi2.Init.CLKPolarity = SPI_POLARITY_LOW; hspi2.Init.CLKPhase = SPI_PHASE_2EDGE; hspi2.Init.NSS = SPI_NSS_SOFT; hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi2.Init.TIMode = SPI_TIMODE_DISABLE; hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi2.Init.CRCPolynomial = 10; HAL_SPI_Init(&hspi2); __HAL_SPI_ENABLE(&hspi2); // GPIO configuration // Peripheral clocks __HAL_RCC_GPIOA_CLK_ENABLE(); // Green LED (PA5) GPIO_InitStruct.Pin = LD2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LD2_PORT, &GPIO_InitStruct); __HAL_RCC_GPIOB_CLK_ENABLE(); //SPI GPIO_InitStruct.Pin = LCD_SPI_SCK_Pin | LCD_SPI_MOSI_Pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(LCD_PORT, &GPIO_InitStruct); // LCD Chip Select (PB12) GPIO_InitStruct.Pin = LCD_SPI_SS_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(LCD_PORT, &GPIO_InitStruct); // LCD DC (PB10) GPIO_InitStruct.Pin = LCD_DC_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(LCD_PORT, &GPIO_InitStruct); // LCD Reset (PB11) GPIO_InitStruct.Pin = LCD_RST_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(LCD_PORT, &GPIO_InitStruct); HAL_GPIO_WritePin(LCD_PORT, LCD_RST_Pin, GPIO_PIN_SET); HAL_GPIO_WritePin(LCD_PORT, LCD_SPI_SS_Pin, GPIO_PIN_SET); } //------------------------------------------------------------------------- static GFXINLINE void post_init_board(GDisplay* g) { (void) g; } //------------------------------------------------------------------------- static GFXINLINE void setpin_reset(GDisplay* g, bool_t state) { (void) g; if (state) { HAL_GPIO_WritePin(LCD_PORT, LCD_RST_Pin, GPIO_PIN_RESET); } else { HAL_GPIO_WritePin(LCD_PORT, LCD_RST_Pin, GPIO_PIN_SET); } } //------------------------------------------------------------------------- static GFXINLINE void set_backlight(GDisplay* g, uint8_t percent) { (void) g; } //------------------------------------------------------------------------- static GFXINLINE void acquire_bus(GDisplay* g) { HAL_GPIO_WritePin(LCD_PORT, LCD_SPI_SS_Pin, GPIO_PIN_RESET); (void) g; } //------------------------------------------------------------------------- static GFXINLINE void release_bus(GDisplay* g) { HAL_GPIO_WritePin(LCD_PORT, LCD_SPI_SS_Pin, GPIO_PIN_SET); (void) g; } //------------------------------------------------------------------------- static GFXINLINE void write_cmd(GDisplay* g, uint16_t index) { (void) g; uint8_t tx_data[2]; tx_data[0] = index >> 8; tx_data[1] = 0x00FF & index; HAL_GPIO_WritePin(LCD_PORT, LCD_DC_Pin, GPIO_PIN_RESET); HAL_SPI_Transmit(&hspi2, tx_data, 2, HAL_MAX_DELAY); } //------------------------------------------------------------------------- static GFXINLINE void write_data(GDisplay* g, uint16_t data) { (void) g; uint8_t tx_data[2]; tx_data[0] = data >> 8; tx_data[1] = 0x00FF & data; HAL_GPIO_WritePin(LCD_PORT, LCD_DC_Pin, GPIO_PIN_SET); HAL_SPI_Transmit(&hspi2, tx_data, 2, HAL_MAX_DELAY); } //------------------------------------------------------------------------- static GFXINLINE void setreadmode(GDisplay* g) { (void) g; } //------------------------------------------------------------------------- static GFXINLINE void setwritemode(GDisplay* g) { (void) g; } //------------------------------------------------------------------------- static GFXINLINE uint16_t read_data(GDisplay* g) { (void) g; return 0; } #endif /* _GDISP_LLD_BOARD_H */ Unfortunately, expect of backlight illumination the display does nothing. Hence, I checked the SPI communication which looks as follows (D0 = reset, D1 = chip select, D2 = DC, D3 = SCK, D4 = MOSI) scope_1.png show the digital lines triggered on the falling edge of the reset and scope_2.png shows the SPI communication triggered on the falling edge of chip select. Since the display I use looks pretty much the same like the one shown in http://www.lcdwiki.com/2.0inch_Arduino_SPI_Module_ILI9225_SKU:MAR2001 . I already checked if it's really am ILI9225 driven display and if it's functional by flashing the library https://github.com/jorgegarciadev/TFT_22_ILI9225 on an Arduino. Coclusio: The performance is not overwhelming but the display is working. That's basically good news for me since that means I only have a bug in my code. So the question is what do I wrong? Any hints are highly appreciated.
  1. Load more activity
×