Learn with SHAKTI

My First ASM Program


spike simulates the real hardware. The necessary files to compile and simulate an ASM program in spike environment, are hosted inside the spiking folder. Learn more about spike, vim editor, RISC-V GDB and OpenOCD!

Please, copy and paste the below commands to download the spiking folder.

Move to spiking folder.


Open a file in a text editor and save it inside spiking folder


or

example.S content:



Compile


Before starting compilation, Please check if the shakti-tools are successfully installed.

Please ensure you're inside spiking folder and run the below command

On successful compilation, a executable binary named example.elf will be generated.



Object dump for the compiled ASM Program


riscv64-unknown-elf-objdump displays the dis-assembled code of the elf file.

Use vim or gedit to view the objdump file created i.e log

or