*** tpb has joined #litex | 00:00 | |
*** lf has quit IRC | 00:28 | |
*** lf has joined #litex | 00:29 | |
*** mikeK_de10nano has joined #litex | 00:38 | |
*** Degi has quit IRC | 01:09 | |
*** mikeK_de10nano has quit IRC | 03:56 | |
*** Bertl_oO is now known as Bertl_zZ | 04:03 | |
*** davidlattimore has quit IRC | 04:21 | |
*** davidlattimore has joined #litex | 04:21 | |
*** sorear has quit IRC | 04:22 | |
*** sorear has joined #litex | 04:23 | |
*** davidlattimore has quit IRC | 04:37 | |
*** st-gourichon-fid has quit IRC | 04:37 | |
*** davidlattimore has joined #litex | 04:42 | |
*** st-gourichon-fid has joined #litex | 04:42 | |
*** david-sawatzke[m has quit IRC | 04:45 | |
*** apolkosnik[m] has quit IRC | 04:45 | |
*** jevinskie[m] has quit IRC | 04:46 | |
*** xobs has quit IRC | 04:46 | |
*** jryans has quit IRC | 04:47 | |
*** leons has quit IRC | 04:49 | |
*** promach3 has quit IRC | 04:49 | |
*** disasm[m] has quit IRC | 04:49 | |
*** sajattack[m] has quit IRC | 04:50 | |
*** CarlFK[m] has quit IRC | 04:50 | |
*** david-sawatzke[m has joined #litex | 04:56 | |
*** jevinskie[m] has joined #litex | 05:10 | |
*** xobs has joined #litex | 05:12 | |
*** FFY00 has quit IRC | 05:13 | |
*** apolkosnik[m] has joined #litex | 05:17 | |
*** CarlFK[m] has joined #litex | 05:19 | |
*** jryans has joined #litex | 05:22 | |
*** leons has joined #litex | 05:24 | |
*** promach3 has joined #litex | 05:25 | |
*** disasm[m] has joined #litex | 05:25 | |
*** sajattack[m] has joined #litex | 05:26 | |
_florent_ | nickoe: 50MHz is indeed a bit low for the DDR3 frequency and also for the capability of the controller to adjust and find the right delays (it has fixed delay taps, so delays can saturate more easily with a low frequency), that's why I recommend using a higher frequency to do the initial port on a new Artix7 board. | 06:38 |
---|---|---|
*** ius has quit IRC | 07:21 | |
*** Melkhior has joined #litex | 07:28 | |
*** Melkhior has quit IRC | 09:26 | |
*** miek has quit IRC | 09:37 | |
*** Melkhior has joined #litex | 10:24 | |
*** Bertl_zZ is now known as Bertl | 11:33 | |
*** Bertl is now known as Bertl_oO | 12:51 | |
*** Bertl_oO is now known as Bertl | 13:49 | |
*** FFY00 has joined #litex | 14:00 | |
*** Melkhior has quit IRC | 14:10 | |
*** miek has joined #litex | 14:21 | |
nickoe | _florent_: Do you have any hints on how to test the flash? | 15:11 |
*** peeps[zen] has joined #litex | 15:35 | |
*** peepsalot has quit IRC | 15:37 | |
_florent_ | nickoe: you can do a mem_list to get the different memory regions, then to a mem_read on the SPI Flash region and verify it matches contents that has been previously flashed | 15:39 |
*** peeps[zen] has quit IRC | 15:48 | |
*** peepsalot has joined #litex | 15:55 | |
*** peepsalot has quit IRC | 16:04 | |
*** peepsalot has joined #litex | 16:07 | |
*** Degi has joined #litex | 16:19 | |
*** kgugala has quit IRC | 16:22 | |
*** kgugala has joined #litex | 16:22 | |
*** lkcl has quit IRC | 16:39 | |
*** lkcl has joined #litex | 16:40 | |
*** _whitelogger has quit IRC | 16:48 | |
*** _whitelogger has joined #litex | 16:52 | |
*** TMM has quit IRC | 17:46 | |
*** TMM has joined #litex | 17:46 | |
*** peepsalot has quit IRC | 17:47 | |
*** mikeK_de1_SoC_do has joined #litex | 17:58 | |
*** peepsalot has joined #litex | 18:09 | |
nickoe | _florent_: OK, I did try that, and it does not look exactly as I expect, https://dpaste.com/565PNKC58#line-254 | 18:12 |
tpb | Title: dpaste: 565PNKC58 (at dpaste.com) | 18:12 |
nickoe | I think this is in 1x spi mode, but the flash also supports QSPI (4x ?) | 18:13 |
*** lkcl has quit IRC | 18:28 | |
nickoe | https://i.snipboard.io/86HBhl.jpg | 18:32 |
*** lkcl has joined #litex | 18:40 | |
*** peepsalot has quit IRC | 18:48 | |
*** Bertl is now known as Bertl_oO | 19:28 | |
*** peepsalot has joined #litex | 20:58 | |
nickoe | _florent_: If using add_spi_sdcard do I need to use add_sdcard as well? | 22:31 |
somlo | nickoe: I know this one :) spi-sdcard and "native" sdcard are mutually exclusive, if you're using one then you don't need/want the other | 22:51 |
nickoe | somlo: Ok, thank you for confirming! :) | 22:51 |
nickoe | somlo: Have you tried to use it, it does not look like there are any test app for the spi sdcard in the bios code. | 22:52 |
somlo | nickoe: if you build bitstream with either spi- or "native" sdcard, you get a "sdcardboot" command in the bios | 22:52 |
somlo | and a bunch of other commands to test writes and reads from the sdcard, to initialize the card, etc. | 22:53 |
nickoe | Hmm, yesh, I have that. I am not sure I have tried to use that. Doesn't that asume you put a binary on it? | 22:53 |
somlo | typing "help" at the bios prompt should give you a list | 22:53 |
nickoe | somlo: yeah, well, I got this, https://dpaste.com/AVLM8J8TB | 22:54 |
tpb | Title: dpaste: AVLM8J8TB (at dpaste.com) | 22:54 |
somlo | not sure this isn't written down somewhere, but you want a fat16 filesystem (maybe fat32 will work too), and then things diverge: you can have some sort of .json file listing what other files should be loaded (dtb, kernel, etc) | 22:54 |
nickoe | and the sdcard does not seem to be listed in mem_list | 22:55 |
somlo | or (in the rocket/bbl case) just a boot.bin file that has everything built in | 22:55 |
nickoe | somlo: I am not really familiar with the boot stuff | 22:58 |
somlo | nickoe: hmmm, I don't have a bitstream with spi-sdcard handy; on my "native" sdcard bitstream I have sdcardboot in the same place as you, but also a bunch of test commands further down: https://imgur.com/a/Qcr7f7U | 22:59 |
tpb | Title: Imgur: The magic of the Internet (at imgur.com) | 22:59 |
nickoe | somlo: ok, so it appears that it do read the sdcard successfully? in between those two commands I did eject the sdcard and put it in my laptop and touched a boot.json with a few random bytes in it. https://dpaste.com/EXRNGBERW | 23:02 |
tpb | Title: dpaste: EXRNGBERW (at dpaste.com) | 23:02 |
nickoe | somlo: Are you using spi sdcard? | 23:02 |
somlo | yes; and "success" should look something like this: https://imgur.com/a/TOebRY3 | 23:04 |
tpb | Title: Imgur: The magic of the Internet (at imgur.com) | 23:04 |
nickoe | somlo: they appear to come from https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/cmds/cmd_litesdcard.c | 23:05 |
nickoe | I am not sure how those defines are defined, CSR_SDMEM2BLOCK_BASE for example. | 23:06 |
somlo | nickoe: so they depend on `#ifdef CSR_SD*_BASE`, which may be a "native" sdcard thing only | 23:07 |
nickoe | By the way, I build with ./mars_ax3.py --integrated-rom-size=0x10000 --build --with-spi-sdcard | 23:07 |
somlo | if you look in `build/<your-board>/software/include/generated/csr.h`, there should be something related to the sdcard and/or SPI | 23:07 |
nickoe | https://github.com/litex-hub/litex-boards/compare/master...nickoe:mars_ax3 | 23:08 |
nickoe | somlo: there are no SD2MEM thing, but SPISDCARD things | 23:10 |
somlo | and you should be able to tell by switching `s/--with-spi-sdcard/--with-sdcard/` (assuming your target file supports both -- look at litex-boards/targets/nexys4ddr.py for an example of how to "clone" that for your board, if you haven't already | 23:10 |
somlo | so I'm guessing `SDCORE` and `SDPHY` aren't there except when you use `--with-sdcard` | 23:10 |
nickoe | mars_ax3.py: error: argument --with-sdcard: not allowed with argument --with-spi-sdcard | 23:12 |
somlo | right, they're mutually exclusive | 23:12 |
nickoe | I mean, those requirements are inspired by https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/arty.py#L118-L120 | 23:13 |
somlo | nickoe: and if you replace one with the other, you don't have to wait for the bitstream to be built -- as soon as the C compiler starts spitting things out, you can ctrl-c and the generated csr.h should already be there for you to look at | 23:14 |
nickoe | somlo: bu this hardware is only routed in SPI configration to the sdcard. | 23:15 |
somlo | I'm not super familiar with the arty board and its target file, but there are other boards (e.g. nexys4ddr) that enforce mutual exclusion between native and spi sdcard modes: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/nexys4ddr.py#L128 | 23:15 |
nickoe | somlo: yeah, that is what I linked just above :) | 23:17 |
somlo | oh wait, in the *platform* file you only have spi pins connected? nexys has both: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/nexys4ddr.py#L68 | 23:17 |
nickoe | correct. | 23:17 |
somlo | oh, then nevermind about `with-sdcard`, it assumes you have the extra data pins connected to something on the fpga. If that's not the case, then your only option is `--with-spi-sdcard` | 23:17 |
nickoe | Anyway, for the SD card it looks like it works for SPI mode as it appears to be able to find the boot.json | 23:18 |
nickoe | Maybe I can remove those defines in the sdcard lib? | 23:18 |
somlo | I can't tell if it *found* boot.json or skipped it | 23:19 |
somlo | from your screenshot, that is | 23:19 |
somlo | oh, because it didn't say "boot.json file not found" -- which it does for me, since I don't have one :) | 23:20 |
nickoe | yeah | 23:20 |
somlo | so then maybe all you need is the proper dtb and kernel and whatever files on your sdcard | 23:20 |
nickoe | I am still quite new to this, so I am not really sure if I can just run a kernel for this with just the ram workng? | 23:21 |
somlo | well, with the proper boot.json (or boot.bin), you should be able to at least start *loading* a kernel to RAM, and have the bios jump to it, and start booting. That it may die a horrible death some way into that process is to be expected ;) | 23:23 |
nickoe | What do I need to get that? | 23:23 |
somlo | well, in your case, targeting vexriscv, you should dig around the litex-hub/linux-on-litex-vexriscv project and start by figuring out what they like to put into boot.json | 23:24 |
somlo | I would expect a dtb, some sort of machine-layer "emulator", a kernel, and an initrd filesystem | 23:24 |
somlo | I for one am building with a 64-bit rocket CPU, and have the initrd built into the kernel, which is built into BBL along with the dtb. So it's basically a Matrioshka doll of filesystem-within-kernel-plus-dtb-within-bbl, named "boot.bin" -- a single image that gets loaded and executed | 23:26 |
somlo | so what I know about how to do things is going to be less useful to you | 23:26 |
nickoe | ok | 23:27 |
somlo | so boot.json will list all those other files, then the bios will process the json and try to load each file separately from the sdcard, before jumping into either the emulator or the kernel or whatever, and letting things proceed from there | 23:28 |
somlo | I don't have a good handle on the nitty gritty detail for vexriscv, but I'm sure it's somewhere in the linux-on-litex-vexriscv repo | 23:29 |
nickoe | somlo: for https://github.com/litex-hub/linux-on-litex-vexriscv, can I use ny own board there? | 23:31 |
somlo | sorry, I don't know | 23:32 |
nickoe | mm, trying "./make.py --board=arty " I get "subprocess.CalledProcessError: Command 'dtc -O dtb -o images/rv32.dtb build/arty/arty.dts' returned non-zero exit status 127." | 23:33 |
somlo | what I meant is that there will be an example or some sort of specification of what the boot.json file should look like; but yeah, if you're *really* *lucky*, there may be a way to just leverage the whole thing into building software for your board :) I wouldn't know | 23:34 |
somlo | re. your error: do you have the dtc package installed? | 23:35 |
somlo | it's the thing that compiles a .dtb blob from your .dts (device tree spec) sources | 23:35 |
*** mikeK_de1_SoC_do has quit IRC | 23:37 | |
nickoe | woh well, I just installed it, so it did build something | 23:39 |
nickoe | somlo: How is the the kernel built? Is that to be checkout seperately and a custom defconfig? | 23:51 |
nickoe | oh, missed https://github.com/litex-hub/linux-on-litex-vexriscv#generating-the-linux-binaries-optional | 23:51 |
somlo | nickoe: ok, happy you found it -- I'm sure there's some defconfig for vexriscv somewhere under linux-on-litex-vexriscv, but I'd have to race you if I wanted to find it :) | 23:53 |
nickoe | yeah, no worries. I better head to bed anyways :D | 23:54 |
somlo | yeah, time to shut down the day, live to fight another :) Later! | 23:55 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!