*** tpb has joined #tomu | 00:00 | |
*** lathiat has quit IRC | 00:37 | |
*** lathiat has joined #tomu | 00:38 | |
mithro | xobs: do you want me to show you how to set up a python environment so that you don't keep foorbaring yourself? | 01:36 |
---|---|---|
xobs | mithro: I also see bunnie experiencing the same issues. | 01:37 |
mithro | Because he learnt how to set it up from you it seems | 01:38 |
mithro | Basically, if you are using the system Python environment you are going to have a bad time | 01:39 |
mithro | Have you ever used npm or rvm? | 01:40 |
xobs | And when you do a "pip" install, where does it go and how do you keep that under version control? With lxbuildenv, the dependencies are all under `deps/`, and I just need to add my remote to it. | 01:43 |
auscompgeek | you would version control a requirements.txt, similarly to how people would version control a package.json and never a node_modules | 01:48 |
auscompgeek | you can generate a requirements.txt with pinned versions with pip freeze. people sometimes store that in version control as requirements-lock.txt or similar | 01:49 |
xobs | auscompgeek: hmm... and that works offline? I could just give that to someone and they could use it? | 01:50 |
auscompgeek | it wouldn't work offline, no, similar to how you can't `npm install` offline | 01:50 |
mithro | xobs: So you want one "Python install" per project -- you shouldn't share Python installs between projects | 01:51 |
mithro | xobs: This is mostly true even for multiple checkouts of the same project | 01:52 |
mithro | xobs: There are many ways to get a "separate install per project" -- nobody agrees on the best way | 01:53 |
xobs | mithro: Which one lets me do something like we have now, where I can give someone a USB drive and they can start working right away? | 01:54 |
xobs | Without having an Internet connection. | 01:54 |
auscompgeek | nothing does | 01:55 |
auscompgeek | there is no way to have a "portable" python environment currently | 01:56 |
mithro | xobs: The closest is probably how litex-buildenv sets up conda... | 01:56 |
auscompgeek | although there is https://www.python.org/dev/peps/pep-0582/ | 01:56 |
tpb | Title: PEP 582 -- Python local packages directory | Python.org (at www.python.org) | 01:56 |
xobs | auscompgeek: wow, that does seem perfect. | 01:58 |
auscompgeek | other than the fact that it's not a thing yet yes | 01:59 |
mithro | xobs: It is unclear to me the status of that thing... | 01:59 |
xobs | mithro: One of the things I don't like about conda is that it seems to require you use its terminal window, which is based on cmd.exe and doesn't have things like non-square text selection. | 02:03 |
mithro | xobs: Why do you think that? | 02:04 |
xobs | mithro: Because when it installed itself, that's the only icon that it created. And it didn't give any other information about how to use it. | 02:04 |
mithro | xobs: That starts a terminal with the path set up correctly so conda is in it | 02:08 |
mithro | It looks like what that Anaconda Prompt does is | 02:10 |
mithro | %windir%\System32\cmd.exe "/K" C:\Users\MY_USERNAME\Documents\ProgramFilesForSoftwareHatingSpaces\Continuum\miniconda3\Scripts\activate.bat C:\Users\MY_USERNAME\Documents\ProgramFilesForSoftwareHatingSpaces\Continuum\miniconda3 | 02:10 |
mithro | Apparently there is "conda-pack" @ https://conda.github.io/conda-pack/ | 02:12 |
tpb | Title: Conda-Pack conda-pack 0.3.0+8.g52daedd documentation (at conda.github.io) | 02:12 |
xobs | mithro: that script does a lot of stuff, including setting the codepage if necessary. That seems like a good idea. | 02:13 |
mithro | Which script? | 02:13 |
xobs | But it's nice to know that "Anaconda Prompt" is just running cmd.exe with a given batch script. | 02:13 |
xobs | activate.bat, which calls conda.bat | 02:13 |
mithro | To "enter an isolated Python environment" almost all tools require you to "activate" it by sourcing a script of some type | 02:14 |
mithro | it's almost always called something like "activate" | 02:14 |
xobs | I guess that's kind of what I've been doing with lxbuildenv, except it automatically enters its own environment, and makes minimal assumptions about the base system. | 02:16 |
mithro | xobs: See these lines? https://github.com/SymbiFlow/sphinxcontrib-verilog-diagrams/blob/master/docs/Makefile#L23-L26 | 02:17 |
tpb | Title: sphinxcontrib-verilog-diagrams/Makefile at master · SymbiFlow/sphinxcontrib-verilog-diagrams · GitHub (at github.com) | 02:17 |
*** CarlFK has quit IRC | 02:17 | |
xobs | mithro: hmm... so what would the offline workshop install process look like using pip and virtualenv? | 02:18 |
mithro | xobs: It is unlikely you can make such a thing happen | 02:19 |
xobs | And how do you work on packages that get installed? | 02:20 |
xobs | For example, if I "pip install" litex, then I want to go and modify litex, how do I do that? | 02:20 |
mithro | xobs: Basically virtualenv tried to add relocatable environments but it was a failure | 02:20 |
mithro | https://virtualenv.pypa.io/en/latest/userguide/#making-environments-relocatable | 02:21 |
tpb | Title: User Guide virtualenv 16.7.5 documentation (at virtualenv.pypa.io) | 02:21 |
mithro | WARNING: The --relocatable option currently has a number of issues, and is not guaranteed to work in all circumstances. It is possible that the option will be deprecated in a future version of virtualenv. | 02:21 |
*** CarlFK has joined #tomu | 02:21 | |
xobs | Hmm... virtualenv also makes it seem like I can't work in both Windows and Linux land at the same time. | 02:22 |
mithro | xobs: You want to install the library in "development mode" or "editable" mode | 02:23 |
mithro | xobs: What do you mean by can't work in both Windows and Linux land at the same time? | 02:23 |
xobs | mithro: with lxbuildenv, I can run e.g. "python foboot-bitstream.py" from Windows, or "python3 foboot-bitstream.py" from a Linux prompt and it works fine in both environments with the same dependencies. With virtualenv, they would have their own virtualenv environments. | 02:24 |
xobs | So if I made a change to litex_boards in one, that change wouldn't get reflected in the other unless I did a push/pull/reinstall. Or is that not the case? | 02:25 |
mithro | xobs: "development mode" or "editable" mode is what you want | 02:27 |
mithro | python setup.py develop || pip install -e path/to/SomeProject | 02:28 |
mithro | xobs: See https://github.com/timvideos/litex-buildenv/blob/f2c790cc36d73781c63d7c89900281074608181c/scripts/download-env.sh#L584-L593 | 02:29 |
tpb | Title: litex-buildenv/download-env.sh at f2c790cc36d73781c63d7c89900281074608181c · timvideos/litex-buildenv · GitHub (at github.com) | 02:29 |
mithro | `pip install path/to/SomeProject` ~= `cd path/to/SomeProject; python setup.py install` -- except that pip will also get all the declared dependencies for SomeProject... | 02:30 |
mithro | "editable" / "development mode" == install the files in a way that I can keep editing them in their original location | 02:32 |
mithro | xobs: Which is why we use `python setup.py develop` for all the submodules in `third_party/xxxx` | 02:32 |
xobs | That's really good to know that exists. In the past I've done "pip install" and then "git init" of the install directory under /usr/share which didn't seem like the right way to do it. | 02:34 |
mithro | xobs: `python setup.py install` and `python setup.py develop` don't install dependencies -- `pip` does | 02:43 |
*** andi- has quit IRC | 02:44 | |
xobs | mithro: conda-pack looks like it might address the issues I'm having with pip/virtualenv/venv, and the latest version fixed powershell support. Let me see how it works with "develop" mode. | 02:46 |
mithro | xobs: You can think of conda verse virtualenv as `python packages + python binary packages + other binaries` verse `python packages`-- although that has changed a bit with the existence of binary wheels | 02:46 |
mithro | xobs: conda was started back when virtualenv was really only working for pure-python packages | 02:47 |
*** andi- has joined #tomu | 02:51 | |
xobs | Conda seems to have broken things very badly :( | 02:55 |
mithro | xobs: In what way? | 02:55 |
xobs | Now every terminal window I open looks like it's a Conda environment. | 02:55 |
xobs | All of my prompts now have "base" added to them. | 02:56 |
mithro | xobs: How did you install conda? | 02:57 |
xobs | I wanted to initialize a new conda directory, so I did "conda init" in a new directory (similar to how one does a "git init", I suppose?). But that seems to have caused it to take over everything. | 02:57 |
xobs | mithro: I went to https://www.anaconda.com/distribution/ and clicked the big "Python 3.7 version" download button. | 02:57 |
mithro | xobs: It looks like `conda init`installs conda into your bash/shell/etc environment permanently... | 02:58 |
mithro | I have never used conda init before | 02:59 |
xobs | What's the conda equivalent to "git init" / "cargo init" / "npm init"? | 03:00 |
xobs | And more importantly, how do I undo what it's done? | 03:00 |
mithro | Wow - `conda init` is exactly how you **shouldn't** use conda... | 03:01 |
mithro | xobs: Looks like there is a `conda init --reverse` and a `conda init --dry-run --verbose` | 03:02 |
xobs | That does look like it's removed it from the default prompt. Phew. | 03:04 |
mithro | xobs: `conda create --name myenv` | 03:05 |
mithro | `conda create --prefix ./envs jupyterlab=0.35 matplotlib=3.1 numpy=1.16` | 03:05 |
mithro | `conda activate ./envs` | 03:05 |
mithro | xobs: There isn't really an equivalent of `npm init` or `cargo init` from what I can see of those commands... | 03:06 |
mithro | xobs: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html | 03:06 |
xobs | Conda really wants me to run "conda init". | 03:10 |
mithro | xobs: Oh? | 03:10 |
xobs | https://gist.github.com/xobs/44618a89f57bdd3e0c87930b6e80068d | 03:10 |
tpb | Title: conda activate. · GitHub (at gist.github.com) | 03:10 |
xobs | It works if I use the terrible cmd.exe window, and it works if I let it take over my system using "conda init". But it looks like Conda only works if it's the only thing installed. | 03:12 |
mithro | xobs: This seems to be something about windows setup | 03:13 |
mithro | xobs: Try `conda config --set auto_activate_base false` | 03:14 |
mithro | This `conda init` crap seems to be a huge step backwards for conda... | 03:15 |
xobs | What should I do after `conda config`? | 03:17 |
mithro | xobs: Close and open the terminal? | 03:17 |
xobs | No change. | 03:18 |
mithro | xobs: Conda still seems to have taken over your terminal? | 03:22 |
xobs | Okay, so instead of providing "activate.ps1" on Windows, they provide the intuitively-named "shell/condabin/conda-hook.ps1" that needs to be run in order to get conda to work. | 03:22 |
xobs | If I run conda-hook.ps1 then conda starts to work. | 03:23 |
mithro | xobs: activate is entering a specific environment | 03:23 |
mithro | xobs: It seems like the conda-hook is about setting up conda so you can activate an environment? | 03:24 |
xobs | mithro: but if I run Anaconda3\scripts\activate.bat then I can use conda. It looks like it's activating conda itself? | 03:24 |
mithro | xobs: As you are calling activate with no environment, it is probably activating conda's "default" environment | 03:25 |
xobs | And I can run anaconda3\scripts\conda.exe but it doesn't work very well. | 03:25 |
mithro | I'm still confused about what you are doing | 03:28 |
mithro | You start a new terminal | 03:28 |
mithro | then... | 03:28 |
xobs | The goal is to be able to use conda from a fresh terminal. | 03:29 |
xobs | So I open a terminal (ConEmu, Terminal Preview, etc.). How do I use conda? | 03:29 |
xobs | I can run `D:\Software\Anaconda3\Scripts\conda.exe` and get access to conda. Well, it kind if works. It blows up if I actually try to do anything. | 03:30 |
xobs | If I run `cmd.exe` then I can run `D:\Software\Anaconda3\Scripts\activate.bat` and gain access to conda. I can create environments and things like that. | 03:30 |
xobs | If I want to use powershell, however, I first need to run `D:\Software\Anaconda3\shell\condabin\conda-hook.ps1`. Then I'll be able to run `conda.exe`. No need to run activate first. | 03:31 |
mithro | What else is in `D:\Software\Anaconda3\shell\condabin\` | 03:32 |
xobs | Just conda.psm1: https://github.com/conda/conda/blob/95e80f1487f3cc72bd57137af09377290fa2db64/conda/shell/condabin/Conda.psm1 | 03:33 |
tpb | Title: conda/Conda.psm1 at 95e80f1487f3cc72bd57137af09377290fa2db64 · conda/conda · GitHub (at github.com) | 03:33 |
mithro | Should I add Anaconda to the Windows PATH? - When installing Anaconda, we recommend that you do not add Anaconda to the Windows PATH because this can interfere with other software. Instead, open Anaconda with the Start Menu and select Anaconda Prompt, or use Anaconda Navigator (Start Menu - Anaconda Navigator). | 03:34 |
xobs | Right, I didn't add it to the PATH. My goal was to use anaconda with something other than cmd.exe. It worked in cmd.exe, which is how I was able to run "conda init". The trick was getting it to work with a terminal other than cmd.exe. | 03:37 |
mithro | xobs: So, you installed anaconda and it doesn't take over all your cmd.exe? | 03:39 |
xobs | Yes, I have conda installed now, and it hasn't taken over my system. Hooray! | 03:40 |
mithro | xobs: So do you need the `conda config --set auto_activate_base false` to fix it? | 03:40 |
xobs | I don't think so. I just need to run `conda-hook.ps1` first. | 03:40 |
xobs | Though now I need to figure out how to get visual studio code to work with this environment. | 03:41 |
mithro | xobs: https://docs.anaconda.com/anaconda/user-guide/getting-started/ | 03:42 |
tpb | Title: Getting started with Anaconda Anaconda 2.0 documentation (at docs.anaconda.com) | 03:42 |
mithro | https://docs.anaconda.com/anaconda/user-guide/tasks/integration/python-vsc/ | 03:43 |
tpb | Title: Python for Visual Studio Code Anaconda 2.0 documentation (at docs.anaconda.com) | 03:43 |
xobs | Visual Studio Code detected the conda environment nicely. Hooray! | 03:51 |
xobs | Now let's see if conda-pack works as advertised. If it does, that would actually solve the packaging problem I have on Linux. | 03:54 |
mithro | https://gist.github.com/mithro/a0d9413ea020f4157a39b7f1b529629a | 03:54 |
tpb | Title: Windows Instructions for Conda · GitHub (at gist.github.com) | 03:54 |
mithro | xobs: Why are you talking about Linux now? | 03:54 |
mithro | xobs: This is a separate thing to the windows issue you where trying to solve? | 03:54 |
xobs | mithro: If the goal is to replace `lxbuildenv` with something else, I'll need a way to get it working on other platforms. The `fomu-toolchain` distributes a version of Python on Mac and Windows in order to make it easy for people to get started. | 03:55 |
xobs | The documentation for `conda pack` seems to indicate that it creates a similar, portable directory structure. So that would be a nice way to package everything up. And it would be a good excuse to merge the fomu toolchain stuff with conda. | 03:56 |
mithro | xobs: Okay, your currently looking at `conda pack` for getting offline setup? | 03:59 |
mithro | xobs: I'm pretty sure we have distributed litex-buildenv on USB keys | 04:00 |
xobs | mithro: yes, and for creating single-file distributions. Conda does seem to be installed now -- the big thing that was missing was the need to run `conda-hook.ps1` in a terminal before using `conda.exe` | 04:00 |
mithro | xobs: For powershell? | 04:00 |
xobs | Yes. Or running `activate.bat` from cmd.exe. | 04:01 |
*** rohitksingh has quit IRC | 04:02 | |
mithro | xobs: You can create a conda installer from an environment... | 04:03 |
xobs | Though `conda pack` has created a broken tar file. | 04:09 |
xobs | Huh. The default conda environment includes libicu and qt. That would explain why it's so huge. Let me remove those. Maybe it's hitting a 2GB barrier somewhere... | 04:11 |
mithro | xobs: I assume you actually installed anaconda rather than miniconda | 04:14 |
xobs | mithro: I went to anaconda.org and clicked Download, which took me to https://www.anaconda.com/distribution/ -- is that not the right one? | 04:15 |
mithro | xobs: If you want the full anaconda which is conda+scientific packages | 04:17 |
mithro | xobs: you probably wanted miniconda - https://conda.io/en/latest/miniconda.html | 04:17 |
mithro | xobs: https://conda.io/en/latest/miniconda.html | 04:18 |
xobs | Oh. Alright, let me uninstall conda and install that instead. | 04:18 |
xobs | Fun fact: Anaconda doesn't have an uninstaller. | 04:22 |
xobs | Miniconda has one, Python 3.7 has one, but Anaconda doesn't have one. | 04:24 |
*** pepijndevos has quit IRC | 04:37 | |
mithro | https://docs.anaconda.com/anaconda/install/uninstall/ | 04:37 |
tpb | Title: Uninstalling Anaconda Anaconda 2.0 documentation (at docs.anaconda.com) | 04:37 |
mithro | To uninstall Anaconda, you can do a simple remove of the program. This will leave a few files behind, which for most users is just fine. See Option A. | 04:37 |
mithro | Holy crap... | 04:37 |
xobs | Yeah, I just removed the directory, since the uninstaller doesn't exist. | 04:38 |
*** feuerrot has quit IRC | 04:38 | |
*** deltab has quit IRC | 04:38 | |
*** eightdot has quit IRC | 04:38 | |
xobs | So with miniconda, I can't just run `conda-hook.ps1`. | 04:40 |
*** feuerrot has joined #tomu | 04:40 | |
xobs | If I activate an environment with `conda activate condaenv`, then my prompt changes. | 04:40 |
mithro | xobs: What happens? | 04:40 |
*** deltab has joined #tomu | 04:40 | |
xobs | However, if I try to install something it breaks. E.g. `pip install migen` | 04:40 |
xobs | `Fatal error in launcher: Unable to create process using '"c:\python27\python.exe" "C:\Python27\Scripts\pip.exe" install migen'` | 04:40 |
mithro | What what were the exact steps you did? | 04:41 |
xobs | conda create -p condaenv | 04:41 |
xobs | conda activate condaenv | 04:41 |
xobs | pip install migen | 04:41 |
mithro | xobs: Before that -- how did you install miniconda? | 04:41 |
xobs | miniconda3 works if I use the cmd.exe version and run activate.bat like before. | 04:42 |
xobs | (being forced to use cmd.exe on Windows is similar to being forced to use xterm on Linux) | 04:43 |
xobs | Anyway. I'll use their Anaconda shell, instead of using Windows Terminal Preview. | 04:43 |
mithro | That isn't telling me how you installed miniconda.... | 04:43 |
*** pepijndevos has joined #tomu | 04:44 | |
xobs | I downloaded it from https://conda.io/en/latest/miniconda.html and ran the installer. I installed it for all users, and placed it into D:\Software\miniconda3 | 04:44 |
*** eightdot has joined #tomu | 04:45 | |
mithro | xobs: When you installed, what settings did you use? | 04:51 |
xobs | I used the defaults. I didn't add it to PATH, nor did I register it as the system python. | 04:52 |
*** rohitksingh has joined #tomu | 04:54 | |
mithro | xobs: Okay, can you open the anaconda terminal and do a `conda init`and see what it says? | 04:55 |
mithro | Hrm... | 04:57 |
mithro | Using pip wheel, you can bundle up all of a project’s dependencies, with any compilation done, into a single archive. This allows installation when index servers are unavailable and avoids time-consuming recompilation. | 04:57 |
xobs | That does seem to fix it so that I can now run "conda activate" from another terminal. | 04:57 |
mithro | xobs: You might need to do `conda config --set auto_activate_base false`on a new windows | 05:01 |
xobs | Oh, so that's what that does. Okay, that makes sense. | 05:02 |
mithro | xobs: See the "General Conda Process" in the doc at https://docs.google.com/document/d/1AaL460Uf_8_9v8EIy4pAZYTFOFXbv5O4RRU7Jv4t_Z4/edit#heading=h.v434x815dccl | 05:04 |
tpb | Title: conda notes - Google Docs (at docs.google.com) | 05:04 |
xobs | I wonder why they don't provide `activate.ps1`. It looks like what you have to do in miniconda is run `conda-hook.ps1; conda activate base`, which lets you use any terminal again, even without doing "conda init"; | 05:11 |
mithro | See what I just pasted... | 05:15 |
xobs | mithro: yes, and you can avoid running "conda init" entirely by first running "conda-hook.ps1" followed by "conda activate" | 05:17 |
xobs | That saves you from having to set the configuration flag, or modifying the environment at all. | 05:18 |
mithro | xobs: But not luck with conda-pack? | 05:21 |
xobs | mithro: not yet. conda-pack seems promising, and almost works. It definitely doesn't work quite as advertised, though. | 05:24 |
xobs | It looks like you still need to have conda installed on your system. | 05:24 |
mithro | I think the conda constructor might be a better approach? | 05:24 |
xobs | Probably! I'll take a look at that. | 05:26 |
xobs | This is a very complicated system and I'm still trying to figure out how I'm going to package it up. | 05:27 |
mithro | xobs: What is a complicated system? | 05:28 |
xobs | mithro: python packaging. Conda. Pip. Activating virtual environments. Making it not take over the system. | 05:30 |
xobs | I'm wondering how it'll work now. | 05:31 |
xobs | Will the installer create a directory that a user would run "activate" on, and then do the various activities in the workshop? | 05:31 |
*** futarisIRCcloud has quit IRC | 05:44 | |
mithro | xobs: Yes | 05:55 |
xobs | Okay, perhaps `conda pack` will do what I'm looking for. Or the installer you mentioned. I'll take a closer look. | 05:56 |
mithro | xobs: The important thing about conda is that it can include *both* the Python + extra binaries like yosys and co | 06:14 |
*** CarlFK has quit IRC | 06:38 | |
*** CarlFK has joined #tomu | 07:44 | |
*** kamil_r has joined #tomu | 09:09 | |
xobs | mithro: that's a concern I have. Will that force me to have one version of all the packages for all the different litex/migen projects on my system? Or will it force me to have one copy of conda for each project? | 09:13 |
xobs | Hmm... it seems like conda allows you to nest exactly one environment, which is probably sufficient: https://github.com/conda/conda/issues/2502 | 09:14 |
tpb | Title: Consider leaving root env on PATH with activate · Issue #2502 · conda/conda · GitHub (at github.com) | 09:14 |
*** rohitksingh has quit IRC | 09:33 | |
*** foosinn[m] has quit IRC | 11:07 | |
*** AmosSam_ has quit IRC | 11:07 | |
*** alexhw[m] has quit IRC | 11:07 | |
*** ptotter[m] has quit IRC | 11:07 | |
*** nrossi has quit IRC | 11:07 | |
*** xobs has quit IRC | 11:07 | |
*** manf[m] has quit IRC | 11:07 | |
*** jimt[m] has quit IRC | 11:07 | |
*** EmilKarlson has quit IRC | 11:07 | |
*** kwauchope[m] has quit IRC | 11:07 | |
*** shalzz has quit IRC | 11:07 | |
*** synaption[m] has quit IRC | 11:07 | |
*** alexhw[m] has joined #tomu | 11:17 | |
*** shalzz has joined #tomu | 11:28 | |
*** foosinn[m] has joined #tomu | 11:28 | |
*** xobs has joined #tomu | 11:28 | |
*** EmilKarlson has joined #tomu | 11:28 | |
*** ptotter[m] has joined #tomu | 11:28 | |
*** jimt[m] has joined #tomu | 11:28 | |
*** manf[m] has joined #tomu | 11:28 | |
*** nrossi has joined #tomu | 11:28 | |
*** AmosSam_ has joined #tomu | 11:28 | |
*** synaption[m] has joined #tomu | 11:28 | |
*** kwauchope[m] has joined #tomu | 11:28 | |
*** ademski has quit IRC | 12:25 | |
*** xkapastel has joined #tomu | 12:38 | |
*** alexhw has quit IRC | 13:28 | |
*** alexhw_ has joined #tomu | 13:28 | |
*** alexhw_ has quit IRC | 13:29 | |
*** alexhw has joined #tomu | 13:29 | |
*** chrissi^ has quit IRC | 13:35 | |
*** ademski has joined #tomu | 13:39 | |
*** emeb has joined #tomu | 13:47 | |
*** chrissi^ has joined #tomu | 14:13 | |
*** chrissi^ has quit IRC | 14:16 | |
*** chrissi^ has joined #tomu | 14:18 | |
synaption[m] | I'm wondering if there has been any effort to port foboot over to any other boards. Fomu is great and all, but I'd love to play with some more io | 15:23 |
tnt | synaption[m]: I have a DFU bootloader for the icebreaker-bitsy board and also for the upduino v1. The fullsize icebreaker and upduino v2 don't need bootloader since they have ftdi on-board for programming. | 15:33 |
*** cedric has quit IRC | 16:44 | |
pepijndevos | xobs, mithro said on twitter you might know what's up with fomu crashing my keyboard and mouse via an usb hub? | 17:15 |
pepijndevos | https://twitter.com/mithro/status/1179086526493278208 | 17:16 |
xobs | pepijndevos: What's probably happening is your hub has only one Transaction Translator for all FS/LS ports. So the keyboard and mouse are effectively connected directly to Fomu. | 17:18 |
xobs | In the v1.8.7 release of Fomu, it ignored the `SET_ADDRESS` command and always responded to all packets it saw. This behavior is incorrect when there is only one TT. | 17:19 |
pepijndevos | What??? I have no idea how USB hubs work. | 17:19 |
xobs | As a workaround, you can try putting another hub in front of Fomu. That might at least let you use it. | 17:19 |
xobs | Then you can install Foboot v1.9.1. | 17:19 |
xobs | Is this a production unit or a hacker board? | 17:20 |
pepijndevos | hacker board | 17:21 |
pepijndevos | How do I install Foboot? | 17:21 |
xobs | If you have an external USB hub, try plugging Fomu into that before plugging it into your PC. If that works and you can see Fomu with `dfu-util -l`, then you can update Foboot. | 17:22 |
pepijndevos | I can free up one USB port directly on the laptop temporarily | 17:23 |
pepijndevos | That worked before | 17:23 |
xobs | Okay. Then download the Foboot v1.9.1 installer from https://github.com/im-tomu/foboot/blob/master/releases/v1.9.1/hacker-top-installable.dfu?raw=true | 17:24 |
xobs | Finally, install it with `dfu-util -D hacker-top-installable.dfu` | 17:24 |
xobs | It'll pause for about 10 seconds, then go all rainbow while it updates. Afterwards, running `dfu-util -l` should show "Foboot Bootloader v1.9.1 running on Hacker Board" | 17:25 |
pepijndevos | xobs, success rate of 50% it seems... | 17:33 |
pepijndevos | One of the two now gives a rainbow LED but is no longer found by dfu-util, the other does a green blinky and is listed as DFU bootloader 1.9.1 | 17:33 |
xobs | The "rainbow led" was the updater running. It's now finished updating, and should work properly. | 17:34 |
pepijndevos | ohhh okay, all good. | 17:36 |
pepijndevos | So it loads into "user space" and then overwrites the bootloader? | 17:36 |
pepijndevos | Uhm... should I have been more carefull not to unplug it in the middle of things? | 17:37 |
xobs | Yeah. It works very hard to make it so that even if you unplug it during an update, it will resume the update next time you plug it in. | 17:37 |
pepijndevos | [appreciation] | 17:37 |
pepijndevos | Well, I can confirm this works very well. I unplugged it like a dozen times alternating between the two and runing dfu-util -l | 17:38 |
xobs | Yay! I'm glad that solves the issue. | 17:39 |
pepijndevos | Yea, working fine from the hub now | 17:39 |
pepijndevos | Let's see if I can run the Micropython thing and play with the buttons and leds. | 17:41 |
pepijndevos | So there are two buttons on this thing, correct? Can I use those from the python shell? (or custom RISC-V or HDL code) | 17:47 |
xobs | There are four touchpads. You can probably do something where you set two as outputs and two as inputs, and do a kind of "resistive touch". | 17:48 |
pepijndevos | ok thanks for the help | 17:52 |
xobs | Happy to help! Glad it's working better for you now. | 17:53 |
nurelin | Hello, is there a simple way to upload a modified foboot hw + a custom sw on a pvt fomu ? | 18:06 |
nurelin | or shall I flash the hw and then use the DFU to upload the custom sofware ? | 18:09 |
*** rohitksingh has joined #tomu | 18:38 | |
*** xkapastel has quit IRC | 18:48 | |
*** xkapastel has joined #tomu | 18:54 | |
*** rohitksingh has quit IRC | 19:30 | |
*** rohitksingh has joined #tomu | 20:00 | |
*** rohitksingh has quit IRC | 21:06 | |
*** ademski has quit IRC | 21:13 | |
*** rohitksingh has joined #tomu | 21:34 | |
*** luis79 has joined #tomu | 22:15 | |
*** luis79 is now known as luis83 | 22:16 | |
*** luis83 is now known as riskyfive | 22:16 | |
riskyfive | Hi. I have a fomu hacker edition with bootloader v1.7.3-1-g82cb20c. How can I upgrade the bootloader? | 22:16 |
*** im-tomu has left #tomu | 22:27 | |
*** im-tomu has joined #tomu | 22:27 | |
*** im-tomu has left #tomu | 22:28 | |
*** im-tomu has joined #tomu | 22:28 | |
*** kamil_r has quit IRC | 22:53 | |
*** xkapastel has quit IRC | 22:58 | |
*** CarlFK has quit IRC | 23:31 | |
*** emeb has quit IRC | 23:47 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!