My develop platform:
Windows 10 enterprise 10.0.17134.112
Embedded-Wizard free: 9.0
AMR Compile: MDK V5.25
MCU Hardware: STM32F767IGT6
Language: Chinese Simplified
=================================================================================
1. Open "HelloWorld" example.
2. Set OutputDirectory to ..\..\Application\Project\MDK-ARM\MDK-ARM_ew_post_process.cmd
3. Build --> Build this profile
4. Open .\Application\Project\MDK-ARM\Project.uvprojx file with Keil uVision5
5. Keil uVision5 output:
Error loading file 'D:\ARM\STM32F767\Application\GeneratedCode\ewfiles.gpdsc'
D:\ARM\STM32F767\Application\GeneratedCode\ewfiles.gpdsc(1,39):
Fatal Error parsing node '#document' :invalid byte '?' at position 2 of a 2-byte sequence
Error loading file 'D:\ARM\STM32F767\Application\Project\MDK-ARM\..\..\GeneratedCode\ewfiles.gpdsc'
D:\ARM\STM32F767\Application\Project\MDK-ARM\..\..\GeneratedCode\ewfiles.gpdsc(1,39):
Fatal Error parsing node '#document' :invalid byte '?' at position 2 of a 2-byte sequence
Error instantiating RTE components
Error #546: Required gpdsc file 'D:\ARM\STM32F767\Application\GeneratedCode\ewfiles.gpdsc' is not loaded, errors by load
Error #546: Required gpdsc file 'D:\ARM\STM32F767\Application\Project\MDK-ARM\..\..\GeneratedCode\ewfiles.gpdsc' is not loaded, errors by load
6. Change ewfiles.gpdsc file from ASCII to UFT-8, it is OK.
=================================================================================
My OS environment is Chinese Simplified, I open cmd, "chcp" command out is
936, 936 is GB2312 encoding.
C:\Users\ly>chcp
活动代码页: 936
C:\Users\ly>echo String is still UFT-8 > out.txt
C:\Users\ly>
Even if in GB2312 encoding, the output file "out.txt" is still in UTF-8 encoding.
=================================================================================
ewfiles.gpdsc is generated by MDK-ARM_ew_post_process.cmd script. I add "chcp 65001" to
"MDK-ARM_ew_post_process.cmd" file
@echo off
chcp 65001
SETLOCAL EnableDelayedExpansion
set out_file=%EmWi_OutputDirectory%\ewfiles.gpdsc
if not exist %EmWi_OutputDirectory%\..\..\PlatformPackage\%EmWi_ColorFormat% (
echo "ERROR: The requested color format %EmWi_ColorFormat% is not supported for this platform!"
...
...
But not work, ewfiles.gpdsc is still ASCII encoding