enjoy-digital / litex

Build your hardware, easily!
Other
2.87k stars 551 forks source link

Running Bare Metal application code on litex with cpu type rocket #2010

Open sramichetty20019 opened 1 month ago

sramichetty20019 commented 1 month ago

Hi Everyone, I am trying to run litex with Rocket as CPU type, and I am trying to demo.bin file to see if the bare metal application code execution works, i know that it doesn't work or does not produce any output while i run using the command

litex_sim --threads-8 --with-sdram --cpu-type rocket --cpu-variant small /linux --sdram-init demo.bin

The above does not go beyond the liftoff

i also tried litex_sim --integrated-rom-size 0x10000 --cpu-type rocket --cpu-variant small --rom-init demo.bin this is also stuck i want to run litex in simulation model i have also removed the -flto flag yet it dosent work kindly provide me some guidence to bare-metal-applications on litex simulation if possible also a way to get the instruction trace

gsomlo commented 1 month ago

On Mon, Jul 08, 2024 at 02:41:58PM -0700, Srinija Ramichetty wrote:

Hi Everyone, I am trying to run litex with Rocket as CPU type, and I am trying to demo.bin file to see if the bare metal application code execution works, i know that it doesn't work or does not produce any output while i run using the command

litex_sim --threads-8 --with-sdram --cpu-type rocket --cpu-variant small /linux --sdram-init demo.bin

The above does not go beyond the liftoff

i also tried litex_sim --integrated-rom-size 0x10000 --cpu-type rocket --cpu-variant small --rom-init demo.bin this is also stuck i want to run litex in simulation model i have also removed the -flto flag yet it dosent work kindly provide me some guidence to bare-metal-applications on litex simulation if possible also a way to get the instruction trace

I'm not sure the demo is written in a way that would allow it to run on 64-bit RISCV -- assuming it is, you'd have to ensure its own start address matches the segment (rom vs. sdram/main-ram) you're planning to load it into, for starters.