Skip to content

Commit

Permalink
make.py: Revert board names to snake formating to avoid breaking user…
Browse files Browse the repository at this point in the history
… commands and commands shared in the issues.
  • Loading branch information
enjoy-digital committed Jul 9, 2024
1 parent c14c1bc commit 07f0e39
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 56 deletions.
100 changes: 50 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,56 +45,56 @@ The board support is directly imported from LiteX-Boards and the configuration i

The current list of boards that have been tested and are supported can be obtained by running `./make.py --help`:

├── AESKU40
├── Acorn
├── AcornPCIe
├── AlveoU250
├── AlveoU280
├── Arty
├── ArtyA7
├── ArtyS7
├── ButterStick
├── CamLink4K
├── Colorlight_i5
├── De0Nano
├── De10Nano
├── De1SoC
├── DecklinkQuadHDMIRecorder
├── ECPIX5
├── Genesys2
├── HADBadge
├── HSEDA_xc7a35t
├── IcesugarPro
├── KC705
├── KCU105
├── Konfekt
├── MNT_RKX7
├── MiniSpartan6
├── NeTV2
├── Nexys4DDR
├── NexysVideo
├── Noir
├── OrangeCrab
├── Pipistrello
├── Qmtech_5CEFA2
├── Qmtech_EP4CE15
├── Qmtech_EP4CE55
├── Qmtech_WuKong
├── SDS1104XE
├── STLV7325
├── STLV7325_v2
├── Schoko
├── Sipeed_tang_nano_20k
├── Sipeed_tang_primer_20k
├── TitaniumTi60F225DevKit
├── TrellisBoard
├── TrionT120BGA576DevKit
├── ULX3S
├── ULX4M_LD_V2
├── VC707
├── VersaECP5
├── XCU1525
├── ZCU104
├── acorn
├── acorn_pcie
├── aesku40
├── alveo_u250
├── alveo_u280
├── arty
├── arty_a7
├── arty_s7
├── butter_stick
├── cam_link4k
├── colorlight_i5
├── de0nano
├── de10nano
├── de1so_c
├── decklink_quad_hdmirecorder
├── ecpix5
├── genesys2
├── hadbadge
├── hseda_xc7a35t
├── icesugar_pro
├── kc705
├── kcu105
├── konfekt
├── mini_spartan6
├── mnt_rkx7
├── ne_tv2
├── nexys4ddr
├── nexys_video
├── noir
├── orange_crab
├── pipistrello
├── qmtech_5cefa2
├── qmtech_ep4ce15
├── qmtech_ep4ce55
├── qmtech_wu_kong
├── schoko
├── sds1104xe
├── sipeed_tang_nano_20k
├── sipeed_tang_primer_20k
├── stlv7325
├── stlv7325_v2
├── titanium_ti60f225dev_kit
├── trellis_board
├── trion_t120bga576dev_kit
├── ulx3s
├── ulx4m_ld_v2
├── vc707
├── versa_ecp5
├── xcu1525
├── zcu104


Adding support for another board from LiteX-Boards satisfying the requirements should only be a matter of adding a few lines to `make.py`.
Expand Down
11 changes: 8 additions & 3 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
# Helpers
#---------------------------------------------------------------------------------------------------

def camel_to_snake(name):
name = re.sub(r'(?<=[a-z])(?=[A-Z])', '_', name)
return name.lower()

def get_supported_boards():
board_classes = {}
for name, obj in globals().items():
name = camel_to_snake(name)
if isinstance(obj, type) and issubclass(obj, Board) and obj is not Board:
board_classes[name] = obj
return board_classes
Expand Down Expand Up @@ -127,15 +132,15 @@ def main():
soc.add_constant(k, v)

# SoC peripherals --------------------------------------------------------------------------
if board_name in ["Arty", "ArtyA7"]:
if board_name in ["arty", "arty_a7"]:
from litex_boards.platforms.digilent_arty import _sdcard_pmod_io
board.platform.add_extension(_sdcard_pmod_io)

if board_name in ["AESKU40"]:
if board_name in ["aesku40"]:
from litex_boards.platforms.avnet_aesku40 import _sdcard_pmod_io
board.platform.add_extension(_sdcard_pmod_io)

if board_name in ["OrangeCrab"]:
if board_name in ["orangecrab"]:
from litex_boards.platforms.gsd_orangecrab import feather_i2c
board.platform.add_extension(feather_i2c)

Expand Down
6 changes: 3 additions & 3 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def board_build_test(self, board, cpu_count=1):

def test_boards(self):
excluded_boards = [
"Schoko", # USB OHCI netlist generation issue.
"TrionT120BGA576DevKit", # Reason: Require Efinity toolchain.
"TitaniumTi60F225DevKit", # Reason: Require Efinity toolchain.
"schoko", # USB OHCI netlist generation issue.
"trion_t120bga576dev_kit", # Reason: Require Efinity toolchain.
"titanium_ti60f225dev_kit", # Reason: Require Efinity toolchain.
]
for board in supported_boards:
if board in excluded_boards:
Expand Down

0 comments on commit 07f0e39

Please sign in to comment.