2024-01-30 04:32 AM
Hello,
GFX 4.23.1 comes with this example project
en.X-CUBE-TOUCHGFX.4.23.1\Projects\STM32F746G-DISCO
I use Keil MDK 5.36. During compilation I get this error:
compiling SoftwareMJPEGDecoder.cpp...
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): error: #5: cannot open source input file "portmacro.h": No such file or directory
#include "portmacro.h"
../TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp: 0 warnings, 1 error
compiling TouchGFXGeneratedHAL.cpp...
../middlewares/st/touchgfx/framework/include/touchgfx/widgets/graph/GraphLabels.hpp(354): warning: #1300-D: drawIndexRange inherits implicit virtual
void drawIndexRange(const Rect& invalidatedArea, const Font* fontToDraw, const AbstractDataGraph* graph, const int rangeMin, const int rangeMax, const int minorInterval, const int majorInterval, const uint8_t a) const;
../touchgfx/gui/include/gui/main_screen/MainView.hpp(17): warning: #1300-D: handleTickEvent inherits implicit virtual
void handleTickEvent();
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): error: #5: cannot open source input file "portmacro.h": No such file or directory
#include "portmacro.h"
../TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp: 2 warnings, 1 error
compiling main.c...
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): error: #5: cannot open source input file "portmacro.h": No such file or directory
#include "portmacro.h"
../Core/Src/main.c: 0 warnings, 1 error
compiling TouchGFXHAL.cpp...
../TouchGFX/target/TouchGFXHAL.hpp(54): warning: #1300-D: initialize inherits implicit virtual
void initialize();
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): error: #5: cannot open source input file "portmacro.h": No such file or directory
#include "portmacro.h"
../TouchGFX/target/TouchGFXHAL.cpp: 1 warning, 1 error
Any idea how to fix missing portmacro.h error please ?
Thank you
Ferro
Solved! Go to Solution.
2024-01-30 07:07 AM
Thank you @Andrew Neil
1. Install FreeRTOS package from Keil Package installer
2. copy files port.c and portmacro.h from
c:\Users\<user>\AppData\Local\Arm\Packs\ARM\CMSIS-FreeRTOS\10.5.1\Source\portable\RVDS\ARM_CM7\r0p1\
into
STM32F746G-DISCO\Applications\DynamicGraph\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM7\r0p1\
Files available here as well:
https://github.com/ARM-software/CMSIS-FreeRTOS/tree/main/Source/portable/RVDS/ARM_CM7/r0p1
2024-01-30 04:49 AM
@ferro wrote:Any idea how to fix missing portmacro.h error please ?
Is it actually missing, or is the compiler just not finding it?
The latter would indicate a problem with your Include Paths ...
2024-01-30 05:01 AM
> "Is it actually missing, or is the compiler just not finding it?"
I am not sure. This is what portable.h says on line 52:
There are 2 portmacros.h in the project:
DynamicGraph\Middlewares\Third_Party\FreeRTOS\Source\portable\IAR\ARM_CM7\r0p1\portmacro.h
DynamicGraph\gcc\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM7\r0p1\portmacro.h
Should there be a portmacro.h for Keil toolchain perhaps ?
2024-01-30 05:05 AM
@ferro wrote:> "Is it actually missing, or is the compiler just not finding it?"
I am not sure.
Well that's the first thing to check!
2024-01-30 05:39 AM
As I said, there are 2 but probably not ported to Keil ? That's for GFX Team to answer i suppose.
2024-01-30 06:03 AM
Your earlier post suggests it's a FreeRTOS thing? So not specific to GFX?
FreeRTOS is very widely used, so shouldn't be hard to find a suitable Keil version?
2024-01-30 07:07 AM
Thank you @Andrew Neil
1. Install FreeRTOS package from Keil Package installer
2. copy files port.c and portmacro.h from
c:\Users\<user>\AppData\Local\Arm\Packs\ARM\CMSIS-FreeRTOS\10.5.1\Source\portable\RVDS\ARM_CM7\r0p1\
into
STM32F746G-DISCO\Applications\DynamicGraph\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM7\r0p1\
Files available here as well:
https://github.com/ARM-software/CMSIS-FreeRTOS/tree/main/Source/portable/RVDS/ARM_CM7/r0p1