Jump to content

tombalabomba

Members
  • Content Count

    10
  • Joined

  • Last visited

Everything posted by tombalabomba

  1. 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.
  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. 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.
  4. 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
  5. 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.
  6. 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.
  7. tombalabomba

    STM32F4 + SystemWorkbench + ST7735

    It lookls like this is a quite good starting point. Many Thanks!
  8. tombalabomba

    STM32F4 + SystemWorkbench + ST7735

    Hi folks! I'd like to run uGFX on an STM32F429I-DISCO board using an external 1.8" TFT (ST7735). Unfortunately since I'm quite a newbe, I face already problems setting up my IDE. Since I'm using System Workbench for STM32 (version 2.3) I followed the instructions shown here https://wiki.ugfx.io/index.php/Using_Eclipse . I created a new C-project including already the right firmware for the STM32F429 MCU. Then I imported the uGFX lib and configured the includes and source locaton according: . Finally, I copied gfxconf.example.h to inc directory renamed it to gfxconf.h and configured GFX_USE_OS_RAW32 to TRUE. So far so good, but a soon as I include gfx.h I get compiling errors: 09:55:32 **** Incremental Build of configuration Debug for project ST32F4_ST7735 **** make all Building file: ../src/main.c Invoking: MCU GCC Compiler /home/tombalabomba/embedded/Demo/ST32F4_ST7735/Debug arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32 -DSTM32F4 -DSTM32F429ZITx -DDEBUG -DSTM32F429xx -DUSE_HAL_DRIVER -I"/home/tombalabomba/embedded/Demo/ST32F4_ST7735/HAL_Driver/Inc/Legacy" -I"/home/tombalabomba/embedded/Demo/ST32F4_ST7735/inc" -I"/home/tombalabomba/embedded/Demo/ST32F4_ST7735/CMSIS/device" -I"/home/tombalabomba/embedded/Demo/ST32F4_ST7735/CMSIS/core" -I"/home/tombalabomba/embedded/Demo/ST32F4_ST7735/HAL_Driver/Inc" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c" ../src/main.c:13:17: fatal error: gfx.h: No such file or directory #include "gfx.h" ^ src/subdir.mk:27: recipe for target 'src/main.o' failed compilation terminated. make: *** [src/main.o] Error 1 09:55:32 Build Finished (took 469ms) That's quite odd since gfx.h has been added to the include path. Has anyone faced already a similar problem? Apart from my IDE issue I wonder if there exists a board template file for the ST7735 controller. Suprisingly, just for this controller there is no such a file located in the according drivers/gdisp directory. Any help is highly appreciated. BR Thomas
  9. tombalabomba

    STM32F4 + SystemWorkbench + ST7735

    Hi CPU20, can I interchange also the rest of the files of the ST7565 folder? The reason I'm asking this question is that I found several bugs in ST7735/gdisp_lld_ST7735.c: line 77: #include "drivers/gdisp/ST7735/st7735.h" line 85: #define write_data_repeat(g, data, count) { int i; for (i = 0; i < count; ++i) write_data (g, data) ;} line 205: static void execute_cmds (GDisplay *g, const uint8_t *addr) { line 210: write_data_byte (g,*addr++) is implicit declared. I guess it should be write_data(.) but in that case the argument list doesn't fit If the ST7565 driver is similar to the ST7735 and only a few modifications are required I guess it would be easier to do it that way. Hence, I kindly ask you to advice which modifications apart from changing "ST7567" to "ST7735" are required. Many Thanks
  10. tombalabomba

    STM32F4 + SystemWorkbench + ST7735

    Hi CPU20, it's kinda embarrassing but it seems I forgot to add it to the other languages as well. Many thanks for this hint. This brings me directly to my second question. Since I couldn't find a board template file for the ST7735 controller, I struggle a bit to set up the board file. Do have a template available or is it similar to another controller? In case of the second I kindly ask you to give me a hint which one it is. BR
×