Tuesday, 2020-12-15

*** tpb has joined #litex00:00
*** kgugala has quit IRC00:03
*** Dolu has quit IRC00:06
*** kgugala has joined #litex00:24
*** ranzbak has quit IRC00:28
*** lf has quit IRC00:56
*** lf has joined #litex00:56
*** ranzbak has joined #litex01:03
*** npcomp has quit IRC01:03
*** Degi_ has joined #litex01:12
*** Degi has quit IRC01:15
*** Degi_ is now known as Degi01:15
*** nelgau has quit IRC01:30
*** nelgau has joined #litex01:31
*** nelgau has quit IRC01:35
*** nelgau has joined #litex02:01
*** nelgau has quit IRC02:09
*** vitalmixofnutrie has joined #litex02:37
*** lkcl has quit IRC02:46
*** lkcl has joined #litex02:58
*** vitalmixofnutrie has quit IRC03:49
*** Bertl_oO is now known as Bertl_zZ04:14
*** lkcl has quit IRC06:02
*** lkcl has joined #litex06:15
*** kgugala_ has joined #litex06:20
*** kgugala has quit IRC06:21
*** kgugala has joined #litex07:37
*** kgugala_ has quit IRC07:41
_florent_roboknight: for XIP, depending the SPI Flash you are using it's possible the dummy cycles will need to be adapted: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/fomu.py#L10307:58
_florent_the difficulty with small ice40 FPGAs is that due to the small size, the bringup can be more difficult: on larger FPGA, we generally start with the BIOS in ROM, verify the SPI Flash is working correctly from the BIOS (with mem_read) and then switch to XIP from SPI Flash07:59
_florent_with ice40 it's a not possible08:00
*** lkcl has quit IRC08:00
_florent_but it's possible to use the UART bridge08:01
_florent_ex you build your target with the crossover UART and bridge (using the iceBreaker here): ./icebreaker.py --cpu-type=vexriscv --cpu-variant=minimal --uart-name=crossover+bridge --build08:08
_florent_this will allow you test the SPI Flash peripheral from your Host using LiteX server and python scripts08:08
_florent_to learn how to use it, you can have a look at: https://github.com/enjoy-digital/litex/wiki/Use-Host-Bridge-to-control-debug-a-SoC08:09
_florent_with the bridge, you can also use LiteScope for debug (https://github.com/enjoy-digital/litex/wiki/Use-LiteScope-To-Debug-A-SoC) but still because of the lack of RAM on ice40, it will be a bit limited.08:11
*** lkcl has joined #litex08:13
*** lkcl has quit IRC08:22
*** lkcl has joined #litex08:33
*** lkcl has quit IRC08:43
*** lkcl has joined #litex08:57
*** lkcl has quit IRC09:57
*** Dolu has joined #litex10:07
*** lkcl has joined #litex10:09
*** Bertl_zZ is now known as Bertl10:26
*** kgugala has quit IRC12:15
*** kgugala has joined #litex12:15
roboknightflorent: Thanks for the info... I'm going to try that... it appears that I have "uartbone" and "crossover". Not sure which will provide the crossover+bridge (they both seem to be a wishbone bridge of some type).  I'll try crossover first.  At any rate, I checked the SPI flash datasheet and it seems to indicate 8 dummy cycles for FAST_READ.  My real13:42
roboknightproblem is that I actually tried 0 cycles to see something change in the SPI output and it appeared that the # of cycles didn't change (I checked the scope).  The other strange thing is that changing my clock speed doesn't seem to change anything at all.  My SPI is still attempting to run at 12MHz (even if I set the clock faster or slower).  So I'm13:42
roboknightnot sure what is going on there.  I'd post some of my setup code for the board, but the machine I'm using here is separate from the dev machine.13:42
roboknightAt any rate, I'm trying to track things down one at a time, so I'll try the crossover and see how that goes.13:42
_florent_roboknight: crossover+bridge  support is recent (5 days ago) so you should probably update LiteX if you don't have it. With it you will be able to control the access to the SPI Flash so it should be easier. For the SPI clock, maybe you could add a print in the code to see if the divider has changed.14:25
*** roboknight has quit IRC14:39
*** roboknight has joined #litex14:43
somlo_florent_, daveshah: https://github.com/riscv/riscv-pk/pull/23015:27
somlowith luck, I can just point at their upstream repo when creating linux-on-litex-rocket :)15:27
*** lkcl has quit IRC15:52
*** lkcl has joined #litex16:05
*** Bertl is now known as Bertl_oO16:22
_florent_somlo: :) (in the quest of linux-on-litex-rocket as single README file? :))17:53
somloyeah, a.k.a. "upstream-first" :D17:55
*** Bertl_oO is now known as Bertl18:01
*** somlo has quit IRC18:30
*** somlo has joined #litex18:56
*** cjearls has joined #litex18:57
cjearlsHi, I'm running a custom VexRiscv on linux-on-litex-vexriscv. I'd like to read data from a file, but I'm running into an issue where my filesystem appears to be working properly, I can ls, mkdir, and use things like echo or vim to make, edit, and read files, but my C fopen() function is always returning NULL. I'm thinking this might have something to do with the filesystem being virtual instead of actually reading and writing to the file19:00
cjearlssystem on the microSD card on my orangecrab board, but I'm not sure. How might I fix this issue?19:00
daveshahfopen returning NULL seems very strange, regardless of whether or not it is using a ramdisk19:01
daveshahparticularly as those other things are working19:01
daveshahit almost seems like a syscall issue, something subtly borked in the kernel/userspace interface, but without poking at things I can't really suggest any targeted debugging there19:02
cjearlsThank you, I thought the same, but wanted to check in here for a sanity check19:02
daveshahI'm pretty sure that the busybox utils that you mention working will use similar calls19:03
cjearlsdaveshah: Does this seem like something that I should create an issue for somewhere?19:03
cjearlsThat's what I would've thought as well19:03
daveshahYeah, an issue on linux-on-litex-vexriscv seems reasonable enough to me19:04
cjearlsCould it be my compiler? I'm just running the recommended riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14 compiler with -O3 enabled19:04
cjearlsAlright, I'll do that. Thanks.19:05
daveshahhmm, I'm not sure if unknown-elf is right here19:05
daveshahthe best bet is probably to get buildroot up and running and use the compiler that builds19:05
cjearlsOh, cool, I already have buildroot working so I could transfer the program I wanted to run to the microSD19:06
daveshahThere will be a compiler somewhere in there, or you can do it properly and make your program a buildroot package19:07
cjearlsOk, I'll take a look at that19:24
zyp-unknown-elf is probably linked against libnosys which provides dummy implementations for syscalls, meant for use on bare metal systems19:33
zypI mean, the libc provided with it19:33
*** roboknight has quit IRC19:33
*** vitalmixofnutrie has joined #litex19:51
cjearlsI built the buildroot compiler, and it appears like file access is working properly now. Thanks for your help19:54
*** leons has quit IRC20:10
*** leons has joined #litex20:10
*** roboknight has joined #litex21:05
*** roboknight has quit IRC21:08
*** Bertl is now known as Bertl_zZ21:27
*** FFY00 has quit IRC22:47
*** FFY00 has joined #litex22:48

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!