From 0a7443d2734210155579c725f96e1ffe669c0deb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 8 Jan 2021 19:30:37 +0100 Subject: [PATCH] targets/orangecrab: make usr_btn optional to fix compilation with revision 0.1. --- litex_boards/targets/orangecrab.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litex_boards/targets/orangecrab.py b/litex_boards/targets/orangecrab.py index fd5f5a1..c988c5e 100755 --- a/litex_boards/targets/orangecrab.py +++ b/litex_boards/targets/orangecrab.py @@ -39,7 +39,8 @@ class _CRG(Module): # Clk / Rst clk48 = platform.request("clk48") - rst_n = platform.request("usr_btn") + rst_n = platform.request("usr_btn", loose=True) + if rst_n is None: rst_n = 1 # Power on reset por_count = Signal(16, reset=2**16-1) @@ -89,7 +90,8 @@ class _CRGSDRAM(Module): # Clk / Rst clk48 = platform.request("clk48") - rst_n = platform.request("usr_btn") + rst_n = platform.request("usr_btn", loose=True) + if rst_n is None: rst_n = 1 # Power on reset por_count = Signal(16, reset=2**16-1)