As Philippe GRAILLE mentioned, if you are using MCUXpresso it can create the Hex file for you.
To do this automatically you can go in the settings and add the following to the post-build steps.
arm-none-eabi-objcopy -v -O ihex "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.hex"
if you prefer the MOTOROLA SRECORD format, use:
arm-none-eabi-objcopy -v -O srec "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.srec"
Converting from binary can be tricky as the binary files have no address location information.
So, if your code does not start at address 0, you need a tool where you can specify the memory location when converting.