jamesbowman / swapforth

Swapforth is a cross-platform ANS Forth
BSD 3-Clause "New" or "Revised" License
275 stars 56 forks source link

shell.py issues on ArchLinux #38

Closed bmentink closed 6 years ago

bmentink commented 8 years ago

1st issue: I had to comment out the following section in shell.py to even get it running:

def reset(self, fullreset = True): ........

    #waitcr()
    #ser.write(b'\r')
    #waitcr()

2nd issue: bye does not exit shell, doesn't exist ... just get:

bye ?+

3rd issue: #flash command does not work:

flash build/nuc.hex

please wait... Traceback (most recent call last): File "./shell.py", line 72, in swapforth.main(TetheredJ1a) File "../shell/swapforth.py", line 385, in main r.shell() File "../shell/swapforth.py", line 339, in shell self.shellcmd(cmd) File "../shell/swapforth.py", line 197, in shellcmd d = self.serialize() File "./shell.py", line 68, in serialize s = array.array('B', s).tostring().ljust(8192, chr(0xff)) TypeError: ljust() argument 2 must be a byte string of length 1, not str

Seems shell.py is a bit broken .. also the documentation says to connect on /dev/ttyUSB0, but on my system it is /dev/ttyUSB1, USB0 is the programmer SPI interface .. "make connect" does the right thing ..

EDIT:

  1. My bad .. needs '#bye', not 'bye'
  2. Seems shell.py only works with python2, maybe that should be documented .. ;)
  3. Documentation again ... in the "Building from scratch" section it is stated:

Now run make j1a again - this compiles an FPGA image with the complete code base built-in.

This does not work, as you have to run "make -C icestorm" again before "make j1a" to pick up the added words, otherwise you just get the minimum. I guess ram.v is not updated.

RGD2 commented 8 years ago

Just make By itself without -C icestorm should be enough to rebuild build/ram.v

But yes, it is needed after a #flash

bmentink commented 8 years ago

Thanks, any comment on issue #1