445 views
in System Integration by

Hello!

I need to move GeneratedCode and PlatformPackage folders to another location relative to MDK-ARM project folder, and to rename them into EmWizGeneratedCode and EmWizPlatformPackage respectively. And to move Project folder upper than it situated.

My project has following characteristics:

    Embedded Wizard Studio Pro Version 9.00,

    Keil uVision V5.24.2.0 MDK-ARM Professional,

    Project is based on STM32F746 Discovery template.

Paths before:Paths after:
SRC\
  Application\
    GeneratedCode\
    Project\
      MDK-ARM\
  PlatformPackage\
SRC\
  ApplicationSources\
    EmWizGeneratedCode\
    EmWizPlatformPackage\
  Project
    MDK_ARM

 

 

 

 

I have already done the following:

  • in Embedded Wizard project modified settings inside Profile member: OutputDirectory
  • modified Project\MDK-ARM\MDK-ARM_ew_post_process.cmd file (as i have understood it generates .gpdsc file)

Result: Keil uVision creates directory SRC\GeneratedCode and tries to find .gpdsc file there but can't.


P.S.

Now MDK-ARM_ew_post_process.cmd is as follows:

 

@echo off
SETLOCAL EnableDelayedExpansion

set out_file=%EmWi_OutputDirectory%\ewfiles.gpdsc
set out_file_uV_Prj_Relative=../../ApplicationSources/EmWizGeneratedCode/ewfiles.gpdsc
set dir_platf_package=%EmWi_OutputDirectory%/../EmWizPlatformPackage
set dir_platf_package_gpdsc_relative=../EmWizPlatformPackage

if not exist %dir_platf_package%\%EmWi_ColorFormat% (
echo "ERROR: The requested color format %EmWi_ColorFormat% is not supported for this platform!"
exit /B 1
)

set rte_path=%dir_platf_package_gpdsc_relative%\RTE
set gfx_path=%dir_platf_package_gpdsc_relative%\%EmWi_ColorFormat%

date /t > date.tmp
time /t > time.tmp
for /f %%i IN (date.tmp) DO SET cur_date=%%i
for /f %%i IN (time.tmp) DO SET cur_time=%%i
del date.tmp time.tmp


if exist %dir_platf_package%/RTE/ewcolor.c (
  set EmWi_RTESrcFiles=ewcolor.c ewdebug.c ewextrte.c ewobject.c ewpoint.c ewrect.c ewref.c ewresource.c ewscalars.c ewslot.c ewstring.c ewtimer.c
  
  if %EmWi_ColorFormat% == Index8 (
    set EmWi_GFX_SrcFiles=ewextbmp_Index8.c ewextfnt.c ewextgfx.c ewextpxl_Index8.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
  if %EmWi_ColorFormat% == LumA44 (
    set EmWi_GFX_SrcFiles=ewextbmp_LumA44.c ewextfnt.c ewextgfx.c ewextpxl_LumA44.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
  if %EmWi_ColorFormat% == RGB565 (
    set EmWi_GFX_SrcFiles=ewextbmp_RGB565_RGBA8888.c ewextfnt.c ewextgfx.c ewextpxl_RGB565_RGBA8888.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
  if %EmWi_ColorFormat% == RGB888 (
    set EmWi_GFX_SrcFiles=ewextbmp_RGB888_RGBA8888.c ewextfnt.c ewextgfx.c ewextpxl_RGB888_RGBA8888.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
  if %EmWi_ColorFormat% == RGBA4444 (
    set EmWi_GFX_SrcFiles=ewextbmp_RGBA4444.c ewextfnt.c ewextgfx.c ewextpxl_RGBA4444.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
  if %EmWi_ColorFormat% == RGBA8888 (
    set EmWi_GFX_SrcFiles=ewextbmp_RGBA8888.c ewextfnt.c ewextgfx.c ewextpxl_RGBA8888.c ewgfx.c ewgfxattrtext.c ewgfxcore.c ewgfxdriver.c ewgfxtasks.c
  )
) ELSE (
  set EmWi_RTESrcFiles=ewextrte.c
  set EmWi_RTELibFiles=libewrte-m7-keil.lib
  if %EmWi_SurfaceRotation% == 0 (
    set EmWi_GFX_SrcFiles=ewextgfx.c
    set EmWi_GFX_LibFiles=libewgfx-m7-keil.lib
  ) else (
    set EmWi_GFX_SrcFiles=ewextgfx.c
    set EmWi_GFX_LibFiles=libewgfx-m7-r%EmWi_SurfaceRotation%-keil.lib
  )
)

@echo ^<?xml version="1.0" encoding="UTF-8"?^> > %out_file%
@echo ^<package xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.0" xs:noNamespaceSchemaLocation="PACK.xsd"^> >> %out_file%
@echo   ^<vendor^>TARA Systems^</vendor^> >> %out_file%
@echo   ^<name^>EmWiGeneratedCode^</name^> >> %out_file%
@echo   ^<description^>Generated Code of Embedded Wizard^</description^> >> %out_file%
@echo   ^<url^>^</url^> >> %out_file%
@echo   ^<releases^> >> %out_file%
@echo     ^<release version="1.0.0"^> >> %out_file%
@echo      - Generated: %cur_date% %cur_time% >> %out_file%
@echo     ^</release^> >> %out_file%
@echo   ^</releases^> >> %out_file%

@echo     ^<generators^> >> %out_file%
@echo       ^<generator id="Embedded_Wizard"^> >> %out_file%
@echo         ^<description^>Tara: Embedded Wizard Studio^</description^> >> %out_file%
@echo         ^<command^>%EmWi_InstallDirectory%\EmbeddedWizard.exe^</command^> >> %out_file%
@echo         ^<workingDir^>%EmWi_InstallDirectory%^</workingDir^> >> %out_file%
@echo         ^<arguments^> >> %out_file%
@echo           ^<argument^>%EmWi_ProjectFile%^</argument^> >> %out_file%
@echo         ^</arguments^> >> %out_file%
@echo         ^<gpdsc name="%out_file_uV_Prj_Relative%"/^> >> %out_file%
@echo       ^</generator^> >> %out_file%
@echo     ^</generators^>  >> %out_file% 

@echo   ^<components^> >> %out_file%

@echo     ^<component generator="Embedded_Wizard" Cclass="EmWiGeneratedCode" Cgroup="Open Project "^> >> %out_file%
@echo       ^<description^>Opens the connected Embedded Wizard Project^</description^> >> %out_file%
@echo     ^</component^> >> %out_file%

@echo     ^<component Cclass="EmWiGeneratedCode" Cgroup="Generated Code"^> >> %out_file%
@echo       ^<description^>Embedded Wizard Generated Source Code^</description^> >> %out_file%
@echo       ^<RTE_Components_h^> >> %out_file%
@echo          #define  EW_SURFACE_ROTATION %EmWi_SurfaceRotation% >> %out_file%
@echo          #define  EW_FRAME_BUFFER_COLOR_FORMAT EW_FRAME_BUFFER_COLOR_FORMAT_%EmWi_ColorFormat% >> %out_file%
@echo       ^</RTE_Components_h^> >> %out_file%
@echo       ^<files^> >> %out_file%

for %%f in (%EmWi_OutputSrcFiles%) do ( @echo         ^<file category="source" name="%%f"/^> >> %out_file% )

@echo       ^</files^> >> %out_file%
@echo     ^</component^> >> %out_file%

@echo     ^<component Cclass="EmWiPlatformPackage" Cgroup="Platform Package"^> >> %out_file%
@echo       ^<description^>Embedded Wizard Platform Package Libs and Source Code^</description^> >> %out_file%
@echo       ^<RTE_Components_h^> >> %out_file%
@echo       ^</RTE_Components_h^> >> %out_file%
@echo       ^<files^> >> %out_file%

@echo       ^<^^!--  include folder --^> >> %out_file%
@echo         ^<file category="include" name="%dir_platf_package_gpdsc_relative%/RTE/"/^> >> %out_file%
@echo         ^<file category="include" name="%dir_platf_package_gpdsc_relative%/%EmWi_ColorFormat%/"/^> >> %out_file%

for %%f in (%EmWi_RTESrcFiles%) do ( @echo         ^<file category="source" name="%rte_path%\%%f"/^> >> %out_file% )
for %%f in (%EmWi_GFX_SrcFiles%) do ( @echo         ^<file category="source" name="%gfx_path%\%%f"/^> >> %out_file% )
for %%f in (%EmWi_RTELibFiles%) do ( @echo         ^<file category="library" name="%rte_path%\%%f"/^> >> %out_file% )
for %%f in (%EmWi_GFX_LibFiles%) do ( @echo         ^<file category="library" name="%gfx_path%\%%f"/^> >> %out_file% )

@echo       ^</files^> >> %out_file%
@echo     ^</component^> >> %out_file%


@echo   ^</components^> >> %out_file%
  
@echo ^</package^> >> %out_file%

1 Answer

0 votes
by
Hello Gunter,

the Embedded Wizard post process 'MDK-ARM_ew_post_process.cmd' is mainly intended to handle the different examples contained in an Embedded Wizard BuildEnvironment without the need to modify the MDK-ARM project on each change to another example. However, this mechanism depends on the given BuildEnvironment directory structure. The relative path to the generated code is predetermined via 'Tara.Embedded_Wizard_Launcher.0.6.0.pack'. So, MDK-ARM will always try to load ewfiles.gpdsc from '..\..\GeneratedCode'.

Using 'MDK-ARM_ew_post_process.cmd' post process is not mandatory. In a custom project where the settings and project files do not change permanently it can be also a good solution to update the MDK-ARM project manually.

Nevertheless, there is possible workaround:
Close the MDK-ARM project
Edit  <RTE> section at the end of file 'Project.uvprojx' by text editor:
  Modify the gpdsc path in to '<gpdsc name="..\..\..\ApplicationSources\EmWizGeneratedCode\ewfiles.gpdsc">'
  Remove all further gpdsc sections if existing
  Remove <components> ... </components> from <RTE> section
Reopen the MDK-ARM project

Hope this helps!

Regards,
Martin
by

Hello, Martin!

Thank you for answer.

Modify the gpdsc path in to '<gpdsc name="..\..\..\ApplicationSources\EmWizGeneratedCode\ewfiles.gpdsc">'

 I suspect you meant to Modify the gpdsc path in to '<gpdsc name="..\..\ApplicationSources\EmWizGeneratedCode\ewfiles.gpdsc">', right?

by
Yes, you're right.

Embedded Wizard Website | Privacy Policy | Imprint

...