mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
setup.py: Deprecate lxterm/lxserver/lxsim short names.
These were no longer really used and was confusing.
This commit is contained in:
parent
6b4d5cd3e1
commit
e8be391504
5 changed files with 19 additions and 23 deletions
1
CHANGES
1
CHANGES
|
@ -27,6 +27,7 @@
|
||||||
- Fully deprecate SoCSDRAM/SPIFlash core (replaced by LiteSPI).
|
- Fully deprecate SoCSDRAM/SPIFlash core (replaced by LiteSPI).
|
||||||
- UART "bridge" name deprecated in favor of "crossover" (already supported).
|
- UART "bridge" name deprecated in favor of "crossover" (already supported).
|
||||||
- "external" CPU class support deprecated (replaced by out-of-tree support).
|
- "external" CPU class support deprecated (replaced by out-of-tree support).
|
||||||
|
- lxterm/lxserver/lxsim short names deprecated (used long litex_xy names).
|
||||||
|
|
||||||
[> 2021.12, released on January 5th 2022
|
[> 2021.12, released on January 5th 2022
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
|
@ -168,14 +168,14 @@ Go to litex-boards/litex_boards/targets and execute the target you want to build
|
||||||
On Linux (Ubuntu):
|
On Linux (Ubuntu):
|
||||||
```sh
|
```sh
|
||||||
$ sudo apt install libevent-dev libjson-c-dev verilator
|
$ sudo apt install libevent-dev libjson-c-dev verilator
|
||||||
$ lxsim --cpu-type=vexriscv
|
$ litex_sim --cpu-type=vexriscv
|
||||||
```
|
```
|
||||||
|
|
||||||
On MacOS:
|
On MacOS:
|
||||||
```sh
|
```sh
|
||||||
$ brew install json-c verilator libevent
|
$ brew install json-c verilator libevent
|
||||||
$ brew cask install tuntap
|
$ brew cask install tuntap
|
||||||
$ lxsim --cpu-type=vexriscv
|
$ litex_sim --cpu-type=vexriscv
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Run a terminal program on the board's serial port at 115200 8-N-1.
|
6. Run a terminal program on the board's serial port at 115200 8-N-1.
|
||||||
|
|
|
@ -18,7 +18,7 @@ Loading the compiled demo app can be done in different ways as explain in LiteX'
|
||||||
https://github.com/enjoy-digital/litex/wiki/Load-Application-Code-To-CPU
|
https://github.com/enjoy-digital/litex/wiki/Load-Application-Code-To-CPU
|
||||||
|
|
||||||
Since our app is small and for simplicity we'll just load it over serial here:
|
Since our app is small and for simplicity we'll just load it over serial here:
|
||||||
`$ lxterm /dev/ttyUSBX --kernel=demo.bin`
|
`$ litex_term /dev/ttyUSBX --kernel=demo.bin`
|
||||||
|
|
||||||
You should see the minimal demo app running and should be able to interact with it:
|
You should see the minimal demo app running and should be able to interact with it:
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@ You should see the minimal demo app running and should be able to interact with
|
||||||
Booting from serial...
|
Booting from serial...
|
||||||
Press Q or ESC to abort boot completely.
|
Press Q or ESC to abort boot completely.
|
||||||
sL5DdSMmkekro
|
sL5DdSMmkekro
|
||||||
[LXTERM] Received firmware download request from the device.
|
[LITEX-TERM] Received firmware download request from the device.
|
||||||
[LXTERM] Uploading demo.bin to 0x40000000 (9264 bytes)...
|
[LITEX-TERM] Uploading demo.bin to 0x40000000 (9264 bytes)...
|
||||||
[LXTERM] Upload complete (9.8KB/s).
|
[LITEX-TERM] Upload complete (9.8KB/s).
|
||||||
[LXTERM] Booting the device.
|
[LITEX-TERM] Booting the device.
|
||||||
[LXTERM] Done.
|
[LITEX-TERM] Done.
|
||||||
Executing booted program at 0x40000000
|
Executing booted program at 0x40000000
|
||||||
|
|
||||||
--============= Liftoff! ===============--
|
--============= Liftoff! ===============--
|
||||||
|
|
|
@ -349,7 +349,7 @@ class LiteXTerm:
|
||||||
elif reply == sfl_ack_crcerror:
|
elif reply == sfl_ack_crcerror:
|
||||||
retry = 1
|
retry = 1
|
||||||
else:
|
else:
|
||||||
print("[LXTERM] Got unknown reply '{}' from the device, aborting.".format(reply))
|
print("[LITEX-TERM] Got unknown reply '{}' from the device, aborting.".format(reply))
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
@ -358,14 +358,14 @@ class LiteXTerm:
|
||||||
if reply == sfl_ack_success:
|
if reply == sfl_ack_success:
|
||||||
return True
|
return True
|
||||||
elif reply == sfl_ack_crcerror:
|
elif reply == sfl_ack_crcerror:
|
||||||
print("[LXTERM] Upload to device failed due to data corruption (CRC error)")
|
print("[LITEX-TERM] Upload to device failed due to data corruption (CRC error)")
|
||||||
else:
|
else:
|
||||||
print(f"[LXTERM] Got unexpected response from device '{reply}'")
|
print(f"[LITEX-TERM] Got unexpected response from device '{reply}'")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def upload_calibration(self, address):
|
def upload_calibration(self, address):
|
||||||
|
|
||||||
print("[LXTERM] Upload calibration... ", end="")
|
print("[LITEX-TERM] Upload calibration... ", end="")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
# Calibration parameters.
|
# Calibration parameters.
|
||||||
|
@ -433,7 +433,7 @@ class LiteXTerm:
|
||||||
length = f.tell()
|
length = f.tell()
|
||||||
f.seek(0, 0)
|
f.seek(0, 0)
|
||||||
|
|
||||||
print(f"[LXTERM] Uploading {filename} to 0x{address:08x} ({length} bytes)...")
|
print(f"[LITEX-TERM] Uploading {filename} to 0x{address:08x} ({length} bytes)...")
|
||||||
|
|
||||||
# Upload calibration
|
# Upload calibration
|
||||||
if not self.safe:
|
if not self.safe:
|
||||||
|
@ -493,12 +493,12 @@ class LiteXTerm:
|
||||||
# Compute speed.
|
# Compute speed.
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end - start
|
elapsed = end - start
|
||||||
print("[LXTERM] Upload complete ({0:.1f}KB/s).".format(length/(elapsed*1024)))
|
print("[LITEX-TERM] Upload complete ({0:.1f}KB/s).".format(length/(elapsed*1024)))
|
||||||
f.close()
|
f.close()
|
||||||
return length
|
return length
|
||||||
|
|
||||||
def boot(self):
|
def boot(self):
|
||||||
print("[LXTERM] Booting the device.")
|
print("[LITEX-TERM] Booting the device.")
|
||||||
frame = SFLFrame()
|
frame = SFLFrame()
|
||||||
frame.cmd = sfl_cmd_jump
|
frame.cmd = sfl_cmd_jump
|
||||||
frame.payload = int(self.boot_address, 16).to_bytes(4, "big")
|
frame.payload = int(self.boot_address, 16).to_bytes(4, "big")
|
||||||
|
@ -512,7 +512,7 @@ class LiteXTerm:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def answer_prompt(self):
|
def answer_prompt(self):
|
||||||
print("[LXTERM] Received serial boot prompt from the device.")
|
print("[LITEX-TERM] Received serial boot prompt from the device.")
|
||||||
self.port.write(sfl_prompt_ack)
|
self.port.write(sfl_prompt_ack)
|
||||||
|
|
||||||
def detect_magic(self, data):
|
def detect_magic(self, data):
|
||||||
|
@ -523,13 +523,13 @@ class LiteXTerm:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def answer_magic(self):
|
def answer_magic(self):
|
||||||
print("[LXTERM] Received firmware download request from the device.")
|
print("[LITEX-TERM] Received firmware download request from the device.")
|
||||||
if(len(self.mem_regions)):
|
if(len(self.mem_regions)):
|
||||||
self.port.write(sfl_magic_ack)
|
self.port.write(sfl_magic_ack)
|
||||||
for filename, base in self.mem_regions.items():
|
for filename, base in self.mem_regions.items():
|
||||||
self.upload(filename, int(base, 16))
|
self.upload(filename, int(base, 16))
|
||||||
self.boot()
|
self.boot()
|
||||||
print("[LXTERM] Done.")
|
print("[LITEX-TERM] Done.")
|
||||||
|
|
||||||
def reader(self):
|
def reader(self):
|
||||||
try:
|
try:
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -38,7 +38,6 @@ setup(
|
||||||
],
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
# full names
|
|
||||||
"litex_term=litex.tools.litex_term:main",
|
"litex_term=litex.tools.litex_term:main",
|
||||||
"litex_server=litex.tools.litex_server:main",
|
"litex_server=litex.tools.litex_server:main",
|
||||||
"litex_cli=litex.tools.litex_client:main",
|
"litex_cli=litex.tools.litex_client:main",
|
||||||
|
@ -49,10 +48,6 @@ setup(
|
||||||
"litex_json2renode=litex.tools.litex_json2renode:main",
|
"litex_json2renode=litex.tools.litex_json2renode:main",
|
||||||
"litex_bare_metal_demo=litex.soc.software.demo.demo:main",
|
"litex_bare_metal_demo=litex.soc.software.demo.demo:main",
|
||||||
"litex_contributors=litex.tools.litex_contributors:main",
|
"litex_contributors=litex.tools.litex_contributors:main",
|
||||||
# short names
|
|
||||||
"lxterm=litex.tools.litex_term:main",
|
|
||||||
"lxserver=litex.tools.litex_server:main",
|
|
||||||
"lxsim=litex.tools.litex_sim:main",
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue