cli bitstream loader and build environment

General discussion about the Mojo
Post Reply
mogorman
Posts: 12
Joined: April 29th, 2013, 3:51 pm
Location: United States
Contact:

cli bitstream loader and build environment

Post by mogorman » May 14th, 2013, 12:20 pm

I could not get the java loader to build from source on my machine, and I did not care for the gui stuff so I made my own implementation in python. It is available here https://github.com/mogorman/mojo.py . I hope some one else finds it useful

Code: Select all

$ mojo.py  -h
usage: mojo.py [-h] [-i BITSTREAM] [-r] [-v] [-V] [-n] [-e] [-d MOJO_TTY]
               [BITSTREAM]

Mojo bitstream loader v2

positional arguments:
  BITSTREAM             Bitstream file to upload to the Mojo.

optional arguments:
  -h, --help            show this help message and exit
  -i BITSTREAM, --install BITSTREAM
                        Bitstream file to upload to the Mojo
  -r, --ram             Install bitstream file only to ram
  -v, --verbose         Enable verbose output to cli.
  -V, --version         Display version number of mojo.
  -n, --no-verify       Do not verify the operation to the Mojo.
  -e, --erase           Erase flash on Mojo.
  -d MOJO_TTY, --device MOJO_TTY
                        Address of the serial port for the mojo [Default:
                        /dev/mojo]

mogorman
Posts: 12
Joined: April 29th, 2013, 3:51 pm
Location: United States
Contact:

Re: cli bitstream loader

Post by mogorman » May 14th, 2013, 12:23 pm

Oh I almost forgot the other thing I did was create a udev rule so my mojo always comes up as /dev/mojo. I did this because I often have other serial devices and don't want to get them confused.

Code: Select all

$ more /etc/udev/rules.d/53-mojo.rules 
SUBSYSTEM=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2144", GROUP="users", MODE="0660", SYMLINK+="mojo"
There it is if anyone else has that same problem

davidb
Posts: 1
Joined: May 13th, 2013, 2:23 pm
Location: UK
Contact:

Re: cli bitstream loader

Post by davidb » May 15th, 2013, 1:06 am

Thanks for this. I've been struggling with getting the java stuff to go on my system so was considering putting together a python script...

Dave

mogorman
Posts: 12
Joined: April 29th, 2013, 3:51 pm
Location: United States
Contact:

Re: cli bitstream loader and build environment

Post by mogorman » May 15th, 2013, 1:07 am

I also finished this up today https://github.com/mogorman/mojo-make. For some reason you need to do a make clean before recompiling things. but it works and loads code without any problems. Now I don't have to load the xilinx tools directly. Yay!

User avatar
qrios
Posts: 3
Joined: May 28th, 2013, 3:04 pm
Location: Berlin, Germany
Contact:

Re: cli bitstream loader and build environment

Post by qrios » May 30th, 2013, 12:18 pm

Thnx, mogorman!

After installing pyserial with this line:

Code: Select all

sudo easy_install -U pyserial
I use your script on MacOSX with this command line:

Code: Select all

./mojo.py -v -n -d `ls /dev/tty.usb*` mojo_top.bin
Under OSX some times the serial device get a new name. So I use the ls /dev/tty.usb* to determine the current device name. It only works if there is no other connected device which act as an USB modem.

The -n switch is because of the message "Flash is not same size as local bitstream". But even if the size is different the program is working fine.
I wonder if we really can take notice of the singularity if it happens someday.

Lowells
Posts: 1
Joined: November 22nd, 2017, 4:14 am

Re: cli bitstream loader and build environment

Post by Lowells » November 24th, 2017, 10:19 am

Hi does this loader still work or is there something better?

Post Reply