Re: Token values are not produced for PCDs under 'PcdsDynamic' section


Konstantin Aladyshev
 

Thanks Andrew!

It turns out, I was looking/using wrong files. Instead of:
```
Build/MyPkg/RELEASE_GCC5/X64/MyPkg/MyApp/MyApp/DEBUG/AutoGen.h
Build/MyPkg/RELEASE_GCC5/X64/MyApp.efi
```
I should have looked at:
```
Build/OvmfX64/RELEASE_GCC5/X64/MyPkg/MyApp/MyApp/DEBUG/AutoGen.h
Build/OvmfX64/RELEASE_GCC5/X64/MyApp.efi
```

This AutoGen.h have a correct token for my dynamic variable:
```
#define _PCD_TOKEN_PcdMyDynamicVar32 38U
#define _PCD_GET_MODE_32_PcdMyDynamicVar32 LibPcdGet32(_PCD_TOKEN_PcdMyDynamicVar32)
#define _PCD_GET_MODE_SIZE_PcdMyDynamicVar32 LibPcdGetSize(_PCD_TOKEN_PcdMyDynamicVar32)
#define _PCD_SET_MODE_32_PcdMyDynamicVar32(Value) LibPcdSet32(_PCD_TOKEN_PcdMyDynamicVar32, (Value))
#define _PCD_SET_MODE_32_S_PcdMyDynamicVar32(Value) LibPcdSet32S(_PCD_TOKEN_PcdMyDynamicVar32, (Value))
```
And with the right *.efi file everything works correctly!

Thanks for the help!

Join discuss@edk2.groups.io to automatically receive all group messages.