As the comments suggested, removing the previous build, updating west and doing new build worked. My toolchain and SDK is v3.1.3.