_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
lkcl has quit [Ping timeout: 256 seconds]
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #litex
lf has quit [Ping timeout: 260 seconds]
lf has joined #litex
lkcl has joined #litex
futarisIRCcloud has joined #litex
lkcl has quit [Ping timeout: 264 seconds]
lkcl has joined #litex
shorne has quit [Quit: Lost terminal]
lkcl has quit [Ping timeout: 264 seconds]
FFY00 has quit [Read error: Connection reset by peer]
FFY00 has joined #litex
keesj_ has joined #litex
lkcl has joined #litex
keesj has quit [Ping timeout: 260 seconds]
Bertl_oO is now known as Bertl_zZ
Degi_ has joined #litex
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
lkcl has quit [Ping timeout: 240 seconds]
lkcl has joined #litex
lkcl has quit [Ping timeout: 256 seconds]
indy has joined #litex
lkcl has joined #litex
lkcl has quit [Ping timeout: 272 seconds]
<geertu> nickoe: somlo: Just look at the generated images/boot.json
<geertu> linux-on-litex-vexriscv$ cat images/boot.json
<geertu> { "Image": "0x40000000", "rv32.dtb": "0x40ef0000", "rootfs.cpio": "0x41000000", "opensbi.bin": "0x40f00000"
<geertu> }
<geertu> (hmm, somehow the LFs after commas got lost)
lkcl has joined #litex
<nickoe> geertu: Yeah, thank you. I will try it out when I get home.
jimbzy has quit [Ping timeout: 272 seconds]
midnight has quit [Ping timeout: 272 seconds]
jimbzy has joined #litex
midnight has joined #litex
Bertl_zZ is now known as Bertl
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
awordnot has quit [Ping timeout: 246 seconds]
lkcl has quit [Ping timeout: 240 seconds]
lkcl has joined #litex
Bertl is now known as Bertl_oO
Dolu has joined #litex
mikeK_de1_SoC_py has joined #litex
zyp has quit [Ping timeout: 268 seconds]
zyp has joined #litex
<nickoe> geertu: Can I put a bitstream on to the sdcard as well?
<nickoe> Or only things that are to be loaded into memory of the soc?
<somlo> nickoe: loading bitstream from an sdcard is a feature that depends on your board (typically there's a jumper that configures whether the board should search for a .bit file on the first msdos formatted partition of an sdcard, or whether it should wait to be programmed over jtag/usb, etc.)
<nickoe> somlo: well, it looks like the bios searches for it, but I just tried to reload the bios.bin, but that sorta does not boot properly
<nickoe> somlo: So I just flashed the bittream on the device, and then https://dpaste.com/GRAQGX2H9
<tpb> Title: dpaste: GRAQGX2H9 (at dpaste.com)
<nickoe> it gets stuck in the end of that paste.
<somlo> nickoe: the bios "software" (or "firmware" if you will) is part of the bitstream itself, an gecomes accessible to the SoC as a SRAM "memory" once the FPGA has been programmed
<nickoe> I am not sure whats up with that.
<nickoe> yes, so I would expect that I can reload that as is again?
<somlo> how you get bitstream into the FPGA happens way before this thing even "nows" it's supposed to act out a LiteX SoC, which includes the ROM containing the bios for the "cpu" to "execute" :)
<somlo> * "knows"
<nickoe> But shouldn't I be able to reload and reboot the original bios.bin?
<somlo> litex_term will under certain circumstances let you load a new bios without needing to rebuild the whole bitstream that includes its default, "burned-in" state
<somlo> but you asked "can I put a bitstream on the sdcard", which is somewhat orthogonal to "can I update the bios opcodes of a default bios that came as part of the bitstream" :)
<somlo> the first one is "depends on whether the board will do that for you"; the latter is "yes, via litex_term, and I'm not super familiar with the details of *that*"
<nickoe> somlo: well, yes, but I wanted to verify that the bin file I am trying to boot from a sdcard works via serialboot fist.
<nickoe> *first
<nickoe> I figure, if I can serialboot a bin, it should also work on the sdcard. It is a bit eaasier to serialboot than sdard boot when testing.
futarisIRCcloud has joined #litex
<somlo> that makes sense -- as long as the only things you're changing are in the bios (i.e., *not* in the gateware itself), loading a fresh bios on top of what came default with the bitstream should save you all the vivado synthesis/place/route
<futarisIRCcloud> https://github.com/riscv/meta-riscv/pull/267 - RV32 should be working in meta-riscv openembedded now. Anyone tried it on litex yet?
awordnot has joined #litex
<nickoe> there appears to be some more documentation about the boot stuff at https://github.com/enjoy-digital/litex/wiki/Load-Application-Code-To-CPU
<nickoe> similar issue when booting it from sdcard, https://dpaste.com/CDHDV2V7V
<tpb> Title: dpaste: CDHDV2V7V (at dpaste.com)
<nickoe> it sorta boots, but crashes.
<nickoe> _florent_: Any hint?
mikeK_de1_SoC_py has quit [Ping timeout: 240 seconds]
kgugala has quit [Ping timeout: 264 seconds]
<nickoe> I created a bug abour the demo example seemingly not building https://github.com/enjoy-digital/litex/issues/814
<_florent_> nickoe: sorry, haven't been able to look at it yet, will do this evening or tomorrow
<_florent_> nickoe: for the demo, please be sure to first execute the target you want to test with to generate the software headers required by the demo app
<nickoe> _florent_: What command should I use for the arty? I mean, I was just following the README of the demo project.
<nickoe> ah, ok, now it did build the demo
kgugala has joined #litex
<nickoe> ugh, the demo.bin boots fine via serial boot.. somlo :O
<nickoe> ok, that donut is fun
<nickoe> Is the only way to update the bitstream on artix7 to flash it directly via jtag or popping it on a SPI flash device?
duanev has quit [Ping timeout: 240 seconds]
peepsalot has quit [Ping timeout: 264 seconds]
<nickoe> gttp://www2.futureware.at/~nickoe/aausat/20210211_205012.mp4
<nickoe> I wonder why the demo.bin is different to the bios.bin... in that the bios.bin when serialbooted boots a bit and crashes, while the demo.bin does not.
FFY00 has quit [Read error: Connection reset by peer]
FFY00 has joined #litex
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex
CarlFK has joined #litex
<tcal> nickoe: maybe check which base address bios.bin was linked for? You can check by disassembling the .elf. demo.elf shows that it's compiled for base address 0x40000000, which is where serialboot puts it, so it's happy.
esden has quit [Read error: Connection reset by peer]
esden has joined #litex
<nickoe> tcal: like this? https://dpaste.com/CVYEFLJGD
<tpb> Title: dpaste: CVYEFLJGD (at dpaste.com)
<tcal> Yeah, I see the .text and .rodata sections in 0x40000000, which is good.
<tcal> Now try with the bios.elf for the bios.bin that crashes.
<tcal> oh sorry i missed it
<tcal> yeah, you might be able to get bios to boot again, at 0x40000000, by adjusting the linker.ld script. I've never tried that.
<tcal> In what you pasted, you can see that the bios is linked to start executing at 0x00000000, which is the ROM for the Arty SoC.
FFY00 has quit [Ping timeout: 260 seconds]
<nickoe> tcal: ok. I wil play around with the demo project for a bit
<tcal> 👍
<nickoe> but that sorta explains why it is wonky.. I mean if the ld config for it is not the same.
<nickoe> although I am not sure why they are different by "default"
<tcal> Yep, there's a lot of little details. BIOS is meant to be the first thing that runs, to enable the SoC to load the actual "user application", so it's built into ROM. The demo is meant to be such a "user application". That's why by default they're linked for different memory regions. Serialboot is for the user app, so by default it sticks things at 0x40000000, although that can be overridden by the lxterm
<tcal> --kernel-adr option.
<nickoe> heh, I was like.. . why the hell can't I change this register... I forgot to build the bitstream and load it... --- at least I hope that is the reason.
<nickoe> tcal: Hm, yeah, makes sense.
<nickoe> tcal: is it possible to "sideload" a bitstream like with the firmware?
<nickoe> I mean the gateware
Bertl_oO is now known as Bertl_zZ
<tcal> Lots of things are possible! I'm pretty new to this area myself, so I'm not the best to answer. Foboot does some pretty amazing things for example, in a very constrained context. Do you mean something like load a new bitstream from an sdcard?
<nickoe> tcal: yeah
<nickoe> ok,I think I got my little register thing to work https://dpaste.com/CMNTCGG4R
<tpb> Title: dpaste: CMNTCGG4R (at dpaste.com)
<nickoe> next up, double check that the output matches with a logic analyer for sanity checking, but that must be tomorrow.!
<tcal> Cool! Reloading a bitstream....that's pretty board and device-dependent...
<nickoe> tcal: yeah, probably, but is as a SPI flash which I think the artix7 can boot from, but dunnot how to do that yet.
kgugala has quit [Ping timeout: 272 seconds]
FFY00 has joined #litex
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #litex