Victor
-
Posts
13 -
Joined
-
Last visited
Content Type
Forums
Store
Downloads
Blogs
Posts posted by Victor
-
-
I use C++ wrapper for FreeRTOS. uGFX implements some inner functions ( like gfxSleepMilliseconds, gfxSemInit, gfxYield, etc) wrapping pure C FreeRTOS functions in gos_freertos.h/c files.
How I can use my C++ FreeRTOS wrapper with uGFX?
-
Manual How to implement uGFX lib in existing Eclipse project with autotool makefile.
- Copy ugfx lib folder to your Eclipse project tree and exclude it from build( click right button on folder and choose Resource Configurations).
- Copy gfx_mk.c to your src from ugfx/src. Now all necessary sources and headers of ugfx include to build.
- Copy gfxconf.h to your include dir and config it.
- Choose or create necessary drivers and board files (BSP). You can choose them from ugfx/drivers and ugfx/boards. Copy necessary folders to your project tree and check including them to build. For example, f7-discovery(LCD + Touch Screen) requires folowing drivers: ugfx/drivers/gdisp/STM32LTDC and ugfx/drivers/ginput/touch/FT5336. Also you can take something usefull from board files ugfx/boards/base/STM32F746-Discovery
- Specify following include paths:
"../ugfx"
"../dviver1 folder"
"../dviver2 folder"
"../board folder"for f7-discovery them are:
"../ugfx"
"../STM32LTDC""../FT5336"
"../STM32F746-Discovery"
You can use startup files from board folder, but existing projects already has startup, peripheral init, linker script, etc. Unnecessary files(.c) are excluded from build.Important, configure necessary peripherals before use uGFX (UgfxInit()).
-
It seems to me, that jano try to use uGFX build system in eclipse ( using uGFX top-level Makefile ). But He didn't specify driver, board and etc, which build system requires.
Eclipse Autotools makefile has some places where user can define anything. ( -include ../makefile.init, -include ../makefile.defs, -include ../makefile.targets).
For example in theory: Created makefile.init and described there somthing else for proper use uGFX build system. And then add GFXSRC /GFXINC to the sources/includes of Eclipse Autotools makefile.
It is theoretical way to use ugfx build system with eclipse, but it is not work.
Now to implement uGFX to my eclipse neon project I do following steps:
1. Copy ugfx lib to project tree and exclude ugfx folder from build
2. Copy gfx_mk.c to src folder
3. Copy gfxconf.h to inc folder
4. I use f7-discovery and i need folowing drivers: STM32LTDC, FT5336, STM32F746-Discovery. Find them in ugfx folder,copy them to project tree and inculude these folder to build
(click right mouse button on folder and check "Resource Configurations")
5. Add to include paths:
"../ugfx"
"../STM32LTDC"
"../STM32F746-Discovery"
"../FT5336"6. in main.c define #include "gfx.h"
Folder STM32F746-Discovery conteins some files for init hardware. You can use some of them and exclude from build those no need.
For example: I don't use linker script(.ld), startup.s, system init, hal drivers etc from this folder. You have to config everything separatly before uGFXInit().
It is all, if I have nothing forgot.
-
How do you intend to implement these settings in your project?
For example:OPT_OS = raw32 OPT_CPU = stm32m7 GFXBOARD = STM32F746-Discovery GFXDEMO = GFXDRIVERS = STMHAL = ../STM32F7xx_HAL_Driver CMSIS = ../CMSIS ARCH = arm-none-eabi- SRCFLAGS = -ggdb -O1 CXXFLAGS = -fno-rtti .......
-
Hi!
I am implementing ugfx to my project( f7-discovery, baremetal).
I do this steps:
1. add gfx_mk.c with string #include "../ugfx/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c" to source
2. add following include path:
"../ugfx/drivers/gdisp/STM32LTDC"
"../ugfx/src/gdisp"
"../ugfx"
"../ugfx/boards/base/STM32F746-Discovery"
The problem is ../src/../ugfx/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c:37:2: error: unknown type name 'LLDCOLOR_TYPE'
How I can configure necessary parts of ugfx to build successfully?
-
15 hours ago, David George said:
Hi Victor - I'm attempting to do the same thing, your right its not easy. I will post the solution when I have one!
Here's some info on including '3rd party' Makefiles into an Automake project : http://www.gnu.org/software/automake/manual/html_node/Third_002dParty-Makefiles.html
Hi David, It's very good! Thanks for the info.
-
Hello everyone!
I try to integrate uGFX library to existing Eclipse project and couldn't do it. I read "Getting Started -> Integrate uGFX" manual but it couldn't help me. I tried both methods. My Eclipse project has auto-generated makefile. It couldn't be edited manually, only via project Properties. I searched way to include additional makefile in eclipse project properties, but there was no result. In Eclipse forum I was told that, I had to make two projects. First project is basic application project(my existing project), second project is library, based on eclipse makefile project. This library contain uGFX and I use it in my existing project. Probably, this way is right but I don't sure that the uGFX library dedicated for this without many changes. Also I tried to integrate uGFX library using second method described in "Getting Started -> Integrate uGFX" manual, but failed. I added file gfx_mk.c to project sources. I added the source and header files of drivers to compiler including path. I faced with errors like 'undefined reference to', which I tried to solve it time from time but there was no result. It seemed to me, that i had done something wrong.
Anybody could describe integrating uGFX library to existing Eclipse project in detail?
-
This step is solved. Indeed, trouble was in Environment variables specified in eclipse project properties. Thanks.
-
There is file tree...
I unzipped it to the folder template in my workspace without any changes and execute 'make all'. It seems, the same problem. See terminal out near..
C:\Users\TSV\Desktop\NeonWS\template\project>"C:\Program Files\GNU ARM Eclipse\B uild Tools\2.6-201507152002\bin\make" all . C Compiler Options.... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi= hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o. d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base /STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/Include -I../CMSIS/Include - I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DG FX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_R AW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERW ORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o . Assembler Options..... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi= hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o. d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/include -I../ugfx/boards/base /STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/Include -I../CMSIS/Include - I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DG FX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_R AW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERW ORKING -mthumb -DTHUMB fakethumbfile.s -o .build/obj/fakethumbfile.o . Linker Options........ arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fp v4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -T../ugfx/boards/bas e/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fakethumbfile.o -o . build/project.elf . Compiling main.c process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m 7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-con stant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/main.o.d -I. -I../ugfx -I../ugfx/3rdparty/tinygl-0.4-ugfx/inc lude -I../ugfx/boards/base/STM32F746-Discovery -I../CMSIS/Device/ST/STM32F7xx/In clude -I../CMSIS/Include -I../STM32F7xx_HAL_Driver/Inc -I../ugfx/drivers/gdisp/S TM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_W ARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB _PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB main.c -o .build/obj/main.o, .. .) failed. make (e=2): Can not find specified file. ../ugfx/tools/gmake_scripts/compiler_gcc.mk:242: recipe for target '.build/obj/m ain.o' failed make: *** [.build/obj/main.o] Error 2 C:\Users\TSV\Desktop\NeonWS\template\project>
-
Eclipse use PATHes specified in Preferences.
I execute 'make' manually using terminal. It gave the same as eclipse console. See near..
C:\Users\TSV\Desktop\NeonWS\new> "C:\Program Files\GNU ARM Eclipse\Build Tools\2 .6-201507152002\bin\make" all . C Compiler Options.... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi= hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o. d -I. -IC:UsersTSVDesktopNeonWS ewugfx -IC:UsersTSVDesktopNeonWS ewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWS ewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWS ew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWS ew/CMSIS/Include -IC:UsersTSVDesktopNeonWS ewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWS ewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSI nit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumb file.c -o .build/obj/fakethumbfile.o . Assembler Options..... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi= hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -W extra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o. d -I. -IC:UsersTSVDesktopNeonWS ewugfx -IC:UsersTSVDesktopNeonWS ewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWS ewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWS ew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWS ew/CMSIS/Include -IC:UsersTSVDesktopNeonWS ewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWS ewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSI nit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumb file.s -o .build/obj/fakethumbfile.o . Linker Options........ arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fp v4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -TC:UsersTSVDesktopN eonWS ewugfx/boards/base/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fak ethumbfile.o -o .build/new.elf . Compiling main.c process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m 7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-con stant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/main.o.d -I. -IC:\Users\TSV\Desktop\NeonWS\new\ugfx -IC:\User s\TSV\Desktop\NeonWS\new\ugfx/3rdparty/tinygl-0.4-ugfx/include -IC:\Users\TSV\De sktop\NeonWS\new\ugfx/boards/base/STM32F746-Discovery -IC:\Users\TSV\Desktop\Neo nWS\new/CMSIS/Device/ST/STM32F7xx/Include -IC:\Users\TSV\Desktop\NeonWS\new/CMSI S/Include -IC:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver/Inc -IC:\Users\ TSV\Desktop\NeonWS\new\ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_I NIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE - DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mth umb -DTHUMB main.c -o .build/obj/main.o, ...) failed. make (e=2): Can not find specified file. C:\Users\TSV\Desktop\NeonWS\new\ugfx/tools/gmake_scripts/compiler_gcc.mk:242: re cipe for target '.build/obj/main.o' failed make: *** [.build/obj/main.o] Error 2 C:\Users\TSV\Desktop\NeonWS\new>
-
Hello.
I work in Eclipse CDT. I tried to use "STM32F746G-Discovery Template BareMetal Makefile" but couldn't build it.
I created new eclipse project, based on makefile, came with this template, I changed corresponding settings in makefile. Changed makefile is here....
# Possible Targets: all clean Debug cleanDebug Release cleanRelease ############################################################################################## # Settings # # General settings # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = raw32 OPT_THUMB = yes OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m7 # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables # GFXLIB = ../ugfx GFXLIB = C:\Users\TSV\Desktop\NeonWS\new\ugfx GFXBOARD = STM32F746-Discovery GFXDEMO = GFXDRIVERS = GFXSINGLEMAKE = no # Special - Required for the drivers for this discovery board. #STMHAL = ../STM32F7xx_HAL_Driver STMHAL = C:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver # Special - Required for Raw32 #CMSIS = ../CMSIS CMSIS = C:\Users\TSV\Desktop\NeonWS\new/CMSIS ############################################################################################## # Set these for your project # ARCH = arm-none-eabi- SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = LDFLAGS = SRC = main.c OBJS = DEFS = DEFS = LIBS = INCPATH = LIBPATH = LDSCRIPT = ############################################################################################## # These should be at the end # include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk # *** EOF ***
Build was finished with errors. Object files aren't created in their directory. The build directory specified as .build in project properties.
Console output is near.13:19:50 **** Incremental Build of configuration Build (GNU) for project new **** make all . C Compiler Options.... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -IC:UsersTSVDesktopNeonWSnewugfx -IC:UsersTSVDesktopNeonWSnewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWSnew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWSnew/CMSIS/Include -IC:UsersTSVDesktopNeonWSnewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWSnewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o . Assembler Options..... arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -IC:UsersTSVDesktopNeonWSnewugfx -IC:UsersTSVDesktopNeonWSnewugfx/3rdparty/tinygl-0.4-ugfx/include -IC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery -IC:UsersTSVDesktopNeonWSnew/CMSIS/Device/ST/STM32F7xx/Include -IC:UsersTSVDesktopNeonWSnew/CMSIS/Include -IC:UsersTSVDesktopNeonWSnewSTM32F7xx_HAL_Driver/Inc -IC:UsersTSVDesktopNeonWSnewugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.s -o .build/obj/fakethumbfile.o . Linker Options........ arm-none-eabi-gcc -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -nostartfiles -mthumb -TC:UsersTSVDesktopNeonWSnewugfx/boards/base/STM32F746-Discovery/stm32f746nghx_flash.ld -lm .build/obj/fakethumbfile.o -o .build/new.elf . Compiling main.c process_begin: CreateProcess(NULL, arm-none-eabi-gcc -c -ggdb -O1 -mcpu=cortex-m7 -falign-functions=16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -MMD -MP -MF .build/dep/main.o.d -I. -IC:\Users\TSV\Desktop\NeonWS\new\ugfx -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/3rdparty/tinygl-0.4-ugfx/include -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/boards/base/STM32F746-Discovery -IC:\Users\TSV\Desktop\NeonWS\new/CMSIS/Device/ST/STM32F7xx/Include -IC:\Users\TSV\Desktop\NeonWS\new/CMSIS/Include -IC:\Users\TSV\Desktop\NeonWS\new\STM32F7xx_HAL_Driver/Inc -IC:\Users\TSV\Desktop\NeonWS\new\ugfx/drivers/gdisp/STM32LTDC -DSTM32F746xx -DGFX_OS_PRE_INIT_FUNCTION=Raw32OSInit -DGFX_OS_INIT_NO_WARNING=TRUE -DGFX_USE_OS_RAW32=TRUE -DCORTEX_USE_FPU=TRUE -DUSE_FPU=hard -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB main.c -o .build/obj/main.o, ...) failed. make (e=2): Can not find specified file. make: *** [.build/obj/main.o] Error 2 13:19:50 Build Finished (took 314ms)
What, I have to change in my project or makefile to build and launch this template in eclipse CDT?
Using FreeRtos C++ wrapper with uGFX
in Support
Posted
Hello Joel,
Yes. C interface is accessible, but don't correlate with C++ instance of FreeRTOS. Build without problems but when uGFX using FreeRTOS functions HardFaultHandler occurs as was expected.
I tryed to replace original gos_freertos.h/c to my gos_freertos.h/cpp. It seems to me, builder apply C compiler to them. C compeler don't know these keywords like class, etc. I don't know, can I use functions declared as C functions and defined with C++, if I have correctly explained.
As the result files, are something like these ( please excuse me for barbarism) :
P.S. At the begining I compiled these files isolated with C++ compiler, and had been build well. But when I tryed to replace(and embed) original uGFX files, compiler began to sware to C++ lexis in my FreeRTOS wrapper. (excuse me for my english)
my gos_freertos.h
my gos_freertos.cpp