You can use RISCV GNU Toolchain and its riscv32-unknown-elf-elf2hex tool. Or alternatively if you don’t want to install the whole toolchain, you can use other projects such as SiFive’s elf2hex ...
However the README of the linked project says
Building requires ... a RISC-V toolchain.
The correct invocation of the elf2hex tool is also not given. This might not be strictly necessary as it is fairly easy to figure out from the following part and the tool's help text, but it is inconsistent with the rest of the tutorial.
However the README of the linked project says
The correct invocation of the elf2hex tool is also not given. This might not be strictly necessary as it is fairly easy to figure out from the following part and the tool's help text, but it is inconsistent with the rest of the tutorial.