Just FYI,
I tailored [C/C++ Build]>[Settings]>[tab:Build steps]>[Post-build steps] commands, where its syntax is too limited to write simply.
if you put two scripts (attached) into {ProjDirPath}/build/scripts, replace post-build Commands by the line below:
sh ../build/scripts/dk6_image.sh "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}" DK6_PY="\"${DK6_PY}\"" DK6_OPTS="\"${ENV_IMAGE_TOOL_OPTS}\""