Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiteX-boards support #16

Open
tcal-x opened this issue Mar 30, 2022 · 12 comments
Open

LiteX-boards support #16

tcal-x opened this issue Mar 30, 2022 · 12 comments
Assignees

Comments

@tcal-x
Copy link

tcal-x commented Mar 30, 2022

It would be great to have support (both a platform file and a target file) in litex-boards for v3.1.

I did find these for v1: https://github.com/timvideos/litex-buildenv/blob/master/targets/upduino_v1/base.py (target file), https://github.com/timvideos/litex-buildenv/blob/master/platforms/upduino_v1.py (platform file).

Probably some of the pinout in the platform file would need updating, and it might need some massaging to move it to litex-boards.

@vr2045
Copy link
Contributor

vr2045 commented Mar 31, 2022

Good point. Will add to the list of todo's :)

@Xenador77 Xenador77 self-assigned this Apr 22, 2022
@Xenador77
Copy link
Contributor

https://github.com/tinyvision-ai-inc/litex-boards
Any/all feedback is appreciated, but I have (finally) managed to get the upduino_v3 platform/target files to work with the actual upduino_v3 hardware

@tcal-x
Copy link
Author

tcal-x commented Jul 30, 2022

Hi @Xenador77 , I have a v3.1 board, with pmod connector, with no modifications. Should I expect these board files to work for me? I tried adding LedChaser (yes even though there's just the single RGB LED), since that is usually the first sign of life of LiteX running on the board. But I don't see any activity. Is there a reset signal I need to toggle or something like that?

I know the build is wiring to the LED correctly, since my first attempt I used polarity=0 in the LED chaser, and the LED was just bright white. Then I used polarity=1, and the LED is off.

@Xenador77
Copy link
Contributor

The files should work for both 3.0 and 3.1 (I've only tested with the 3.1). However, there is a small modification needed (oops):
The jumper labeled "OSC" needs to be solder bridged or gpio_20 (pin 44) needs to be connected to the 12MHz pin (pin 41)
@XarkLabs made a useful ASCII pinout diagram that better illustrates the location of the pins/jumper
image

I initially included the LedChaser in the target file, but removed it due to the brightness (although my RGB LED was pinkish-red)

@tcal-x
Copy link
Author

tcal-x commented Jul 31, 2022

@Xenador77 , yeah, I agree the LED is so bright. And you're right it's not pure white. Quickfeather has the same blinding brightness issue.

The jumper should be easy, since I'm already using the pin header on that side (for the uart). I just need to solder those pins. I'll let you know how it goes.

@tcal-x
Copy link
Author

tcal-x commented Jul 31, 2022

@Xenador77 , no success yet at my end. What was the exact LiteX recipe you used? I had tried:

./upduino_v3.py --build --cpu-type=vexriscv --cpu-variant=minimal --flash

@tcal-x
Copy link
Author

tcal-x commented Jul 31, 2022

@Xenador77 , I needed to make this fix; now I see (the RGB version of) LedChaser working :)

 _io = [
     # CLK / RST
-    ("clk12", 0, Pins("35"), IOStandard("LVCMOS33")),
+    ("clk12", 0, Pins("20"), IOStandard("LVCMOS33")),

@tcal-x
Copy link
Author

tcal-x commented Jul 31, 2022

@Xenador77 I'm not having any luck with the UART/TTY though; did it work for you?

@Xenador77
Copy link
Contributor

I'm working on figuring out what is going on with that right now
Just to confirm, you are using an external UART board on pins 2 and 3?
(ie FT232 or FT2232 etc. anything that does UART at 3.3v)
It may have something to do with #13 (comment)

@tcal-x
Copy link
Author

tcal-x commented Aug 1, 2022

Correct, I'm using the Digilent Pmod USBUART, but not in the pmod header, instead directly connected using jumper wires to pins 2, 3, and GND of the Upduino board. I had tried a different usb/uart board beforehand also with no luck, but I switched to the Digilent board because it has tx/rx LEDs. I'm not getting any data coming from the Upduino, but that could be due to anything preventing the CPU from working correctly (SPIflash etc).

I guess we can look at the schematics for Fomu and/or Icebreaker, which can read from spiflash.

@Xenador77
Copy link
Contributor

No luck yet on my end, tried adding
Misc("PULLUP")
to the tx pin, nothing seemed to change.
I'm going to try dumping the flash to see if everything is actually writing correctly to it

@tcal-x
Copy link
Author

tcal-x commented Aug 1, 2022

The Upduino schematic looks pretty much the same as Fomu's w.r.t. to the spiflash connection.

https://github.com/im-tomu/fomu-hardware/blob/master/archive/pvt/releases/pvt1/tomu-fpga-pvt1.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants