|
20 | 20 | from litex_boards.targets import radiona_ulx3s
|
21 | 21 | from litex.gen import *
|
22 | 22 |
|
23 |
| -#-------------------------------------------------------------------------------------------------------- |
24 |
| - |
25 |
| -# Add wifi_en pin to ULX3S platform (to activate / deactivate ESP32) |
26 |
| -# Quick-and-dirty hack: replace Platform constructor and add the missing pin |
27 |
| -# --> Not needed anymore, it is there (called "wifi_gpio0") |
28 |
| -# |
29 |
| -#def new_platform_init(self, device="LFE5U-45F", revision="2.0", toolchain="trellis", **kwargs): |
30 |
| -# assert device in ["LFE5U-12F", "LFE5U-25F", "LFE5U-45F", "LFE5U-85F"] |
31 |
| -# assert revision in ["1.7", "2.0"] |
32 |
| -# _io = ulx3s_platform._io_common + \ |
33 |
| -# {"1.7": ulx3s_platform._io_1_7, "2.0": ulx3s_platform._io_2_0}[revision] + \ |
34 |
| -# [("wifi_en", 0, Pins("F1"), IOStandard("LVCMOS33"), Misc("PULLMODE=UP"), Misc("DRIVE=4"))] |
35 |
| -# LatticePlatform.__init__(self, device + "-6BG381C", _io, toolchain=toolchain, **kwargs) |
36 |
| -# |
37 |
| -#ulx3s_platform.Platform.__init__ = new_platform_init |
38 |
| - |
39 |
| - |
40 | 23 | #--------------------------------------------------------------------------------------------------------
|
41 | 24 |
|
42 | 25 | from litex.build.lattice.trellis import trellis_args, trellis_argdict
|
@@ -84,8 +67,7 @@ def add_blitter(self):
|
84 | 67 | def add_ESP32(self):
|
85 | 68 | self.esp32 = ESP32(self.platform)
|
86 | 69 | self.submodules.esp32 = self.esp32
|
87 |
| - if hasattr(self,'spisdcard_tristate'): |
88 |
| - self.comb += self.spisdcard_tristate.eq(self.esp32._enable.storage) |
| 70 | + self.comb += self.get_module('spisdcard').tristate.eq(self.esp32._enable.storage) |
89 | 71 |
|
90 | 72 | # Build -------------------------------------------------------------------------------------------------
|
91 | 73 |
|
@@ -122,14 +104,15 @@ def main():
|
122 | 104 | with_spi_flash = args.with_spi_flash,
|
123 | 105 | **soc_core_argdict(args))
|
124 | 106 |
|
125 |
| - soc.add_spi_sdcard(with_tristate=True) |
126 |
| -# soc.add_spi_sdcard() |
| 107 | +# soc.add_spi_sdcard(with_tristate=True) # For ESP32 control (commented out for now, see below) |
| 108 | + soc.add_spi_sdcard() |
127 | 109 | if args.with_oled:
|
128 | 110 | soc.add_oled()
|
129 | 111 |
|
130 | 112 | # add my own modules
|
131 |
| - soc.add_blitter() # provides fast memory fill |
132 |
| - soc.add_ESP32() # esp32 on/off + spisdcard tristate control (access SDCard with ftp through wifi !) |
| 113 | + soc.add_blitter() # provides fast memory fill |
| 114 | + # soc.add_ESP32() # esp32 on/off + spisdcard tristate control (access SDCard with ftp through wifi !) |
| 115 | + # commented-out for now (there were changes in LiteX that I need to adapt to) |
133 | 116 |
|
134 | 117 | builder = Builder(soc, **builder_argdict(args))
|
135 | 118 | builder_kargs = trellis_argdict(args) if args.toolchain == "trellis" else {}
|
|
0 commit comments