Hi, my new CU3 variant system just arrived, I'm following the manual online and used led0 instead of led as suggested here. However I got a warning:

WARNING:artiq.coredevice.comm_kernel:Mismatch between gateware (6.7547.78cbab42.beta) and software (6.7582.c2248278) versions

Looking at this thread I assume that I need to reflash my Kasli, but I am a little surprised that I need to do this when it is pre-assembled and fresh out of the box. Since I am still new to ARTIQ, I'd like to ask if I need to reflash following instructions here before I accidentally destroy things beyond repair?

If so, what kind of USB cable should I use? It is not immediately obvious to me what connection it is on the Kasli side. Also, am I right to say that artiq-board-kasli-cu3-6.7582.c2248278 is the package that I am looking for for the reflash?

Thanks in advance!

    ngkiaboon Looking at this thread I assume that I need to reflash my Kasli, but I am a little surprised that I need to do this when it is pre-assembled and fresh out of the box.

    Well, the software evolved while the crate was on its way to you 🙂
    In your particular case, you can ignore the warning, there have been no incompatible changes between these two versions.

    Since I am still new to ARTIQ, I'd like to ask if I need to reflash following instructions here before I accidentally destroy things beyond repair?

    Flashing as per the manual cannot destroy anything beyond repair (and in general you'd have to try pretty hard to physically damage a Kasli system via reflash - it won't happen by accident). Also reflashing will always work even if you load broken firmware (e.g. if the flashing process is interrupted in the middle). So, don't worry.

    If so, what kind of USB cable should I use?

    Just plug a regular micro-USB cable into the port on Kasli's front panel.

      sb10q So I tried to run the RTIO example because I realize that my device_db does not have an led. I am still getting the same warning regarding mismatch in gateware and software versions. Also, I am not seeing any output on my oscilloscope. The TTL channel seems to be still in "IN" mode (the IN led is lit up instead of the OUT led).

      I am guessing that maybe the warning stopped things from happening, so I tried to reflash my Kasli following this part of the manual and also installing openocd manually following this (thanks @Hanros94#775). I didn't manage to find “Digilent Adept USB Device (Interface 0)” or “FTDI Quad-RS232 HS” (see screenshot).

      The JTAG USB port is definitely connected to my computer with a micro-USB to USB cable (using the port that can read the USB stick that came with the package, so the USB port used should be fine). A point to note is that the ShockWatch indicator was red when it arrived, so I am wondering if there is physical damage, but I could not find any signs of it when I inspected the crate. Before I go get new micro-USB to USB cables (I already tried two) and trying this out on a new computer, I just want to make sure that I am not missing out on anything silly here.

      Any idea how I can troubleshoot this?

        ngkiaboon The TTL channel seems to be still in "IN" mode (the IN led is lit up instead of the OUT led).

        Please use instead one of those channels where the OUT LED is lit up.

        ngkiaboon The JTAG USB port is definitely connected to my computer with a micro-USB to USB cable (using the port that can read the USB stick that came with the package, so the USB port used should be fine).

        Does a new USB device show up in the Windows device manager when Kasli is plugged?

          sb10q It turns out that the two micro-USB cables that I used were faulty. My new cables arrived and they work fine. Kasli is now reflashed, and using a TTL channel with the OUT LED lit up works fine for rtio.py. I will continue to work through the tutorials in the manual.

          Thanks!

          P.S. I noticed that the buffer direction is not switched when I issued the self.ttl4.output() command. This part of the manual also hints that I need to toggle some physical switch on the hardware. Are there instructions on how to do this, or can I safely assume that it will be idiot-proof when I take the card out from the crate?

            ngkiaboon Are there instructions on how to do this, or can I safely assume that it will be idiot-proof when I take the card out from the crate?

            You need to be careful about ESD and also power down the crate to avoid the possibility of any short circuits, otherwise it's pretty simple.

            23 days later

            While I was still learning how to use ARTIQ over the past few days, I noticed that there were a lot of version incompatibilities between artiq and other packages that I want to install (e.g. artiq_comtools, pyvisa), so I did a fresh install of artiq and now I wish to reflash my Kasli again (the warning is a little irritating). I installed the newest version of my variant, but I have some problems with the reflashing:

            (artiq) C:\Users\Cornell Lab>artiq_flash -V cu3
            Design: top;UserID=FFFFFFFF;COMPRESS=TRUE;Version=2020.1
            Part name: 7a100tfgg484
            Date: 2021/03/22
            Time: 06:08:36
            Bitstream payload length: 0x2bfa80
            Traceback (most recent call last):
              File "C:\Users\Cornell Lab\.conda\envs\artiq\Scripts\artiq_flash-script.py", line 9, in <module>
                sys.exit(main())
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_flash.py", line 431, in main
                programmer.write_binary(*config["gateware"], gateware_bin)
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_flash.py", line 168, in write_binary
                self.load_proxy()
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_flash.py", line 229, in load_proxy
                self.load(find_proxy_bitfile(self._proxy), pld=0)
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_flash.py", line 102, in find_proxy_bitfile
                for p in [proxy_path(), os.path.expanduser("~/.migen"),
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_flash.py", line 96, in proxy_path
                os.path.dirname(os.path.realpath(shutil.which("openocd"))),
              File "C:\Users\Cornell Lab\.conda\envs\artiq\lib\ntpath.py", line 526, in abspath
                return normpath(_getfullpathname(path))
            TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType

            Am I missing something silly here?

            sb10q Thanks! It works now. It is embarrassing that it is something so silly.

            I was under the impression that OpenOCD was already installed together with the artiq installation through conda. It was already installed during the last time I flashed my Kasli three weeks ago, and the manual also mentioned something about it being installed together with artiq here. I did try to install OpenOCD manually before I posted the problem but I couldn't find it under -c conda-forge, so I naturally assumed that the artiq installation through conda already installed it.

            Managed to find one under -c m-labs after seeing your reply though.

            As an aside, where should I look to learn about how to write a setup.py that allows me to install my controllers into artiq.frontend.aqctl_XXX? I tried looking here and here but I am not sure (i) if distutils is still the way to go (I see in your thorlabs_cube example (here) you used setuptools instead), and (ii) how to make it install under artiq.frontend.aqctl_XXX instead of just installing as itself aqctl_XXX (I am under the impression that it will just install the package/module as itself unless I tell it something about artiq.frontend somewhere).

              ngkiaboon the manual also mentioned something about it being installed together with artiq here.

              That was an outdated statement - I just fixed it. Thanks for reporting.