rowol Posted October 2, 2015 Report Posted October 2, 2015 Hi,I've just started using uGFX. I've written a few applications using the Linux and Win32 platforms, now I would like to port uGFX to my embedded system platform (based on an ARM Cortex M3 which could run FreeRTOS or be used bare metal.)I am using the master branch from the uGFX Bitbucket git repo.I thought I would start by trying to port the Raspberry Pi example in $/boards/base/RaspberryPi, purely because I think (?) it's the only example board that uses FreeRTOS (I'd also thought having a uGFX port that ran on a Pi+FreeRTOS would be great for other future projects) --- however that example does not appear to build. When I try to build it, it fails pretty early with the output below. I did check, and there is no FreeRTOS.h file included in the uGFX tree. I also downloaded a copy of the current FreeRTOS sources, in that tree I find $/Source/include/FreeRTOS.h. I don't think this the right thing to do, but I temporarily added the FreeRTOS include area to the include path... in that case the build then failed looking for portmacro.h which appears to be a bunch of definitions specific to the platform... also not in the uGFX tree.Any ideas? Ross======= Build output ===========C Compiler Options.... /home/rowol/bin/gcc-arm-none-eabi-4_9-2015q2/bin/arm-none-eabi-gcc -c -ggdb -O0 -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -ffunction-sections -fdata-sections -fno-common -flto -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -I../../uGFX/ugfx_git_master_snapshot/ugfx -I../../uGFX/ugfx_git_master_snapshot/ugfx/3rdparty/tinygl-0.4-ugfx/include -I../../uGFX/ugfx_git_master_snapshot/ugfx/boards/base/RaspberryPi -I../../uGFX/ugfx_git_master_snapshot/ugfx/drivers/gdisp/framebuffer -I../../uGFX/ugfx_git_master_snapshot/ugfx/demos/modules/gdisp/basics -I../FreeRTOS/Source/portable/GCC/RaspberryPi -I../FreeRTOS/Source/include -DGFX_USE_OS_FREERTOS=TRUE -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.c -o .build/obj/fakethumbfile.o.Assembler Options...../home/rowol/bin/gcc-arm-none-eabi-4_9-2015q2/bin/arm-none-eabi-gcc -c -ggdb -O0 -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -ffunction-sections -fdata-sections -fno-common -flto -MMD -MP -MF .build/dep/fakethumbfile.o.d -I. -I../../uGFX/ugfx_git_master_snapshot/ugfx -I../../uGFX/ugfx_git_master_snapshot/ugfx/3rdparty/tinygl-0.4-ugfx/include -I../../uGFX/ugfx_git_master_snapshot/ugfx/boards/base/RaspberryPi -I../../uGFX/ugfx_git_master_snapshot/ugfx/drivers/gdisp/framebuffer -I../../uGFX/ugfx_git_master_snapshot/ugfx/demos/modules/gdisp/basics -I../FreeRTOS/Source/portable/GCC/RaspberryPi -I../FreeRTOS/Source/include -DGFX_USE_OS_FREERTOS=TRUE -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB fakethumbfile.s -o .build/obj/fakethumbfile.o.Linker Options......../home/rowol/bin/gcc-arm-none-eabi-4_9-2015q2/bin/arm-none-eabi-gcc -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -nostartfiles -mthumb -Wl,--gc-sections -T../../uGFX/ugfx_git_master_snapshot/ugfx/boards/base/RaspberryPi/FreeRTOS/raspberrypi.ld .build/obj/fakethumbfile.o -o .build/example-FreeRTOS.elf.Compiling ../../uGFX/ugfx_git_master_snapshot/ugfx/src/gfx.cIn file included from ../../uGFX/ugfx_git_master_snapshot/ugfx/src/gos/gos.h:454:0, from ../../uGFX/ugfx_git_master_snapshot/ugfx/gfx.h:201, from ../../uGFX/ugfx_git_master_snapshot/ugfx/src/gfx.c:16:../../uGFX/ugfx_git_master_snapshot/ugfx/src/gos/gos_freertos.h:18:22: fatal error: FreeRTOS.h: No such file or directory #include "FreeRTOS.h" ^compilation terminated.make: *** [.build/obj/GFXLIB/src/gfx.o] Error 1
Joel Bodenmann Posted October 2, 2015 Report Posted October 2, 2015 Hello Ross and welcome to the community!The uGFX repository doesn't come with any of the operating systems it can run on, you have to supply those yourself! It's the same with ChibiOS/RT: There are many examples ready to be used with ChibiOS/RT but the ChibiOS/RT itself is not part of the uGFX repository - you have to supply that yourself.The normal workflow is getting the underlying operating system (FreeRTOS) in your case up and running before you add uGFX to it.The FreeRTOS port that comes with uGFX is known to be working with FreeRTOS versions 7.x and 8.x.A little side note: The Raspberry Pi port and example that you can find in our repository was not written nor tested by us. It was supplied by a user from this form. Maybe you want to contact him. His user name is macload1. When I remember correctly he put some videos on youtube that might contain a link to the project.I hope that helps.~ Tectu
rowol Posted October 2, 2015 Author Report Posted October 2, 2015 Hi Tectu,Thanks for responding... yes, I did also try building against the latest version of FreeRTOS (that's what I mentioned in the last paragraph of my post...) I wasn't sure that was the right thing to do (since FreeRTOs is so small I thought it might just be included in the example), but in any event that didn't work either (that build went slightly further, then failed when it couldn't find portmacro.h, which looks to be a file specific to the platform it runs on.)I did see a video on YouTube, but it just showed the uGFX+FreeRTOS demo running, didn't really detail how he'd set it up. I think macload1 mentioned in another post I saw earlier that his build was based on another guy's project and that he had simplified the Makefile, or something like that --- I did also look quickly at that page. uGFX lists FreeRTOS as a supported platform, so I had hoped there would be an example included that used it and compiled without messing around, or at least some instructions, etc... It's too bad the included build didn't work out of the box, I was thinking of some cool stuff I could have built with the Pi... but that isn't the main focus of my project (we're using a Cortex M3) so I'll probably wait to try to fix it until later when I have free time. As far as my project goes, I think it will be easier to use the raw32 platform. (I didn't really need FreeRTOS, I just already have a port of it from the ARM vendor that works on the MCU, so I thought using it would simplify things.) I really just want to use uGFX as a library and don't want it to include startup code, configure the processor, etc, etc (that will be done by my code, the UI will all be separate in a static library, and "just UI code.") I was able to make that architecture work with the Win32 and Linux platforms fairly easily, and assume I will be able to make it work with a raw32 setup also, by making a board file that is mostly empty and maybe modifying the build slightly if necessary.Thanks again for your help.Ross
Joel Bodenmann Posted October 2, 2015 Report Posted October 2, 2015 FreeRTOS is the second most used port of uGFX and it is known to work without any issues at all. We even support advanced FreeRTOS features such as FreeRTOS+Trace.However, we can't supply you with a ready to run demo and neither do we for any other available ports. That uGFX contains a port for operating system XYZ means that you can just enable it in the configuration file and 99% of the rest is done for you (eg. in RAW32 you have to implement two functions to convert system ticks to milliseconds, that's the 1% we can't do for you).The variations for different hardware platforms, RTOSes, library configuration and compilers are just way too many to include any ready-to-run example. Also, we will never ever include any RTOS as 3rd party source into the library.With ChibiOS/RT it is just a whole lot easier because ChibiOS/RT comes with it's own Makefile build system. We can simply include the ChibiOS/RT Makefile in our own Makefile and you have a ready to run demo where you just have to type 'make'. FreeRTOS on the other hand doesn't come with a "default build system" so we can't provide such an easy-to-use feature.The general workflow is always: Get the operating system that you want to use running on your platform and then add uGFX. As soon as you have a running OS adding uGFX is just a matter of a few minutes.In case of RAW32 it is the same - you need to have a working minimal example for your platform and then you just add uGFX to it which is usually a matter of a few minutes.When working bare-metal with an STM32 you need to grab some of the ST examples - they come ready to build specific for each board and compiler and include the necessary startup code and linker scripts. Then just add uGFX and you are ready to go.tl;dr: There are way way way way to many different combinations of platforms, compilers, underlying systems and so on. We can't provide an example for each of them so we focus on making it easy to integrate the uGFX library in an existing project.~ Tectu
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now