During further debugging, I found that the variables are setting with below values:
#define CONFIG_ENV_SIZE 0x20000
#define CONFIG_ENV_OFFSET 0x800000
#define CONFIG_ENV_OFFSET_REDUND 0x1000000
But I have set the CONFIG_ENV_SIZE to 0x2000 and CONFIG_ENV_OFFSET to 64 x 64KB and not configuring the CONFIG_ENV_OFFSET_REDUND in the header file. These values are overwritten by Mender env settings but with wrong values.
May I know how to set the value correctly to our need ?