Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added notebook - flashing scientisst firmware #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"cells":[{"cell_type":"markdown","id":"1e2a027b","metadata":{},"source":["![scientisst-notebooks_top-banner](https://raw.githubusercontent.com/scientisst/notebooks/59632d3d477981a3b1cc12157e12bbdcdb45def8/_Resources/top-banner.png)"]},{"attachments":{},"cell_type":"markdown","id":"3cf183a2","metadata":{},"source":["# <span style=\"color:#484848;\"> A011 How to Flash a ScientISST Board with the Official Firmware </span>"]},{"attachments":{},"cell_type":"markdown","id":"36a4cefd","metadata":{},"source":["### <span style=\"color:#00aba1;\"> Keywords </span>\n","`sense`, `scientisst board`, `firmware`"]},{"attachments":{},"cell_type":"markdown","id":"e09b7dc0","metadata":{},"source":["### <span style=\"color:#00aba1;\"> Notebook Info </span>\n","\n","**Contributor(s):** Rui Maciel, Ana Sofia Carmo\n","\n","**Date of creation:** 03/01/23\n","\n","**Last update:** 03/01/23"]},{"attachments":{},"cell_type":"markdown","id":"e00a3dd5","metadata":{},"source":["<p align=\"center\">\n","<img src=\"./_Resources/flashing.png\" width=\"300\"/> \n","</p>"]},{"attachments":{},"cell_type":"markdown","id":"043fa9be","metadata":{},"source":["### <span style=\"color:#00aba1;\"> Description / Objectives </span>\n","Learn how to flash a ScientISST board with the official (and most recent) firmware - for Windows, MacOS and Linux. "]},{"attachments":{},"cell_type":"markdown","id":"7f2ead9c","metadata":{},"source":["### <span style=\"color:#00aba1;\"> Materials </span>\n","\n","* ScientISST board\n","* Computer"]},{"cell_type":"markdown","id":"01d58803","metadata":{},"source":["***"]},{"attachments":{},"cell_type":"markdown","id":"69307772","metadata":{},"source":["# <span style=\"color:#00aba1;\"> 1. Installing Prerequisites </span>"]},{"attachments":{},"cell_type":"markdown","id":"92b16b2b","metadata":{},"source":["## <span style=\"color:#484848;\"> Windows </span>\n","\n","For Windows, you only need to download and install the ESP-IDF framework (version 4.4) from the following link [https://dl.espressif.com/dl/esp-idf/?idf=4.4](https://dl.espressif.com/dl/esp-idf/?idf=4.4).\n","\n","> ⚠️ **WARNING:** Make sure to download **version 4.4** and **NOT** the most recent one."]},{"attachments":{},"cell_type":"markdown","id":"698da3bd","metadata":{},"source":["## <span style=\"color:#484848;\"> MacOS </span>\n","\n","> 📋 **NOTE:** The instructions for MacOS were taken from the [official espressif documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html). \n","\n","#### Step 0 - Before You Start\n","\n","If an error like this is shown during any step:\n","```\n","xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n","```\n","Then you will need to install the XCode command line tools to continue. You can install thee by running:\n","```\n","xcode-select --install\n","```\n","\n","Furthermore, if you use Apple M1 platform and see an error like this:\n","```\n","WARNING: directory for tool xtensa-esp32-elf version esp-2021r2-patch3-8.4.0 is present, but tool was not found\n","ERROR: tool xtensa-esp32-elf has no installed versions. Please run 'install.sh' to install it.\n","```\n","\n","or like this:\n","```\n","zsh: bad CPU type in executable: ~/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc\n","```\n","\n","Then you will need to install Apple Rosetta 2 by running:\n","```\n","/usr/sbin/softwareupdate --install-rosetta --agree-to-license\n","```\n","\n","#### Step 1 - Install CMake & Ninja build\n","\n","If you have [HomeBrew](https://brew.sh/), you can run on the terminal:\n","```\n","brew install cmake ninja dfu-util\n","```\n","\n","If you have [MacPorts](https://www.macports.org/install.php), you can run:\n","```\n","sudo port install cmake ninja dfu-util\n","```\n","\n","If you don’t have HomeBrew or MacPorts, we suggest installing HomeBrew.\n","\n","#### Step 2 - Install ccache (Optional but recommended)\n","\n","If you have HomeBrew, you can run on the terminal:\n","```\n","brew install ccache\n","```\n","\n","If you have MacPorts, you can run:\n","```\n","sudo port install ccache\n","```\n","\n","#### Step 3 - Installing Python 3\n","\n","Check your current python version by running:\n","```\n","python --version\n","```\n","\n","If the output is Python 3, then you’re good to go and can proceed to the next step. Otherwise, also check if Python 3 isn’t already installed on your computer by running:\n","```\n","python3 --version\n","```\n","\n","If the above command returns an error, it means Python 3 is not installed. Below is an overview of the steps to install Python 3.\n","\n","If you have HomeBrew, you can run on the terminal:\n","```\n","brew install python3\n","```\n","\n","If you have MacPorts, you can run:\n","```\n","sudo port install python38\n","```\n","\n","\n"]},{"attachments":{},"cell_type":"markdown","id":"92b16b2b","metadata":{},"source":["## <span style=\"color:#484848;\"> Linux </span>\n","\n","To compile the firmware you will need to get the following packages. The command to run depends on which distribution of Linux you are using:\n","\n","Ubuntu and Debian:\n","```\n","sudo apt-get install git wget flex bison gperf python3 python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0\n","```\n","\n","CentOS 7 & 8:\n","```\n","sudo yum -y update && sudo yum install git wget flex bison gperf python3 cmake ninja-build ccache dfu-util libusbx\n","```\n","\n","Arch:\n","```\n","sudo pacman -S --needed gcc git make flex bison gperf python cmake ninja ccache dfu-util libusb\n","```\n"]},{"attachments":{},"cell_type":"markdown","id":"923b217f","metadata":{},"source":["# <span style=\"color:#00aba1;\"> 2. Downloading the firmware repository </span>"]},{"attachments":{},"cell_type":"markdown","id":"f1f98913","metadata":{},"source":["```\n","git clone --recursive [email protected]:scientisst/scientisst-sense-firmware.git\n","```\n"]},{"attachments":{},"cell_type":"markdown","id":"923b217f","metadata":{},"source":["# <span style=\"color:#00aba1;\"> 3. Installing Xtensa’s toolchain </span>"]},{"attachments":{},"cell_type":"markdown","id":"c6851a2e","metadata":{},"source":["## <span style=\"color:#484848;\"> Windows </span>\n","```\n","get_idf.bat --install\n","```"]},{"attachments":{},"cell_type":"markdown","id":"9dfd8771","metadata":{},"source":["## <span style=\"color:#484848;\"> Linux </span>\n","\n","```\n",". get_idf.sh --install\n","```\n","\n","## <span style=\"color:#484848;\"> MacOS </span>\n","\n","```\n","./get_idf.sh --install\n","```\n"]},{"attachments":{},"cell_type":"markdown","id":"923b217f","metadata":{},"source":["# <span style=\"color:#00aba1;\"> 4. Loading Xtensa’s tools and flashing the firmware </span>\n","> ⚠️ **WARNING:**Make sure you connect the ScientISST board to the computer using USB and place it in FLASH mode. Consult your board model for instructions on how to place the board in FLASH mode."]},{"attachments":{},"cell_type":"markdown","id":"c6851a2e","metadata":{},"source":["## <span style=\"color:#484848;\"> Windows </span>\n","\n","```\n","get_idf.bat\n","idf.py flash\n","```\n"]},{"attachments":{},"cell_type":"markdown","id":"9dfd8771","metadata":{},"source":["## <span style=\"color:#484848;\"> Linux </span>\n","\n","```\n",". get_idf.sh\n","idf.py flash\n","```\n","\n","## <span style=\"color:#484848;\"> MacOS </span>\n","\n","```\n","./get_idf.sh\n","./idf.py flash\n","```"]},{"attachments":{},"cell_type":"markdown","id":"923b217f","metadata":{},"source":["## <span style=\"color:#484848;\"> Troubleshooting </span>\n","\n","**Cannot open /dev/ttyUSB0: Permission denied**\n","\n","If you see this message, it means your user cannot access the serial ports without elevated permissions. To fix this use, add yourself to the correct user groups to gain access to the serial ports.\n","\n","For MacOS/Linux only:\n","```\n","sudo usermod -a -G tty $USER\n","sudo usermod -a -G dialout $USER\n","```"]},{"cell_type":"markdown","id":"b4c52f8a","metadata":{},"source":["***"]},{"cell_type":"markdown","id":"13f4c736","metadata":{},"source":["![scientisst-notebooks_bottom-banner](https://raw.githubusercontent.com/scientisst/notebooks/master/_Resources/bottom-banner.png)"]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]"},"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}},"nbformat":4,"nbformat_minor":5}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion A.Setting up Your Tools and Workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ A001 Open Signals | Open Signals, Biosignals, Physiological Signals Acquisition|
A002 Arduino Essentials | Arduino, Embedded Systems , Signals Acquisition| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A002%20Arduino%20Essentials/A002%20Arduino%20Essentials.ipynb)
A003 Arduino - Getting started | Arduino, Embedded systems| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A003%20Arduino%20-%20Getting%20started/A003%20Arduino%20-%20Getting%20started.ipynb)
A005 Seeeduino XIAO Essentials | Seeeduino XIAO, Embedded Systems , Signals Acquisition| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A005%20Seeeduino%20XIAO%20Essentials/A005%20Seeeduino%20XIAO%20Essentials.ipynb)
A006 ScientISST - Arduino IDE tutorial | Sense, Arduino, IDE| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A006%20ScientISST%20-%20Arduino%20IDE%20tutorial/A006%20ScientISST%20-%20Arduino%20IDE%20tutorial.ipynb)
A006 ScientISST - Arduino IDE tutorial | `ScientISST`, `ScientISST CORE`, `Arduino IDE`, `Firmware`| Leonor Pereira; Ana Sofia Carmo; Francisco Melo; Afonso Raposo; Prof. Hugo Silva| 11/22| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A006%20ScientISST%20-%20Arduino%20IDE%20tutorial/A006%20ScientISST%20-%20Arduino%20IDE%20tutorial.ipynb)
A007 File Exploration | Hierarchical Data Format (HDF), Data Loading, Metadata| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A007%20File%20Exploration/A007%20File%20Exploration.ipynb)
A008 Setup your Python workspace | `Programming`, `Python`, `Anaconda`, `Data Visualization`, `Data Structures`| Rafael Silva, Hugo Plácido da Silva and Ana Fred| 12/05/2022| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A008%20Setup%20your%20Python%20workspace/A008%20Setup%20your%20Python%20workspace.ipynb)
A009 Essentials of Post-processing | Low-Pass Filter, Python, Plotting| Update authors| dd/mm/aa| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A009%20Essentials%20of%20Post-processing/A009%20Essentials%20of%20Post-processing.ipynb)
A010 Python File Handling and Visualization | `Python`, `File Handling`, `Data Visualization`| Rafael Silva, Hugo Plácido da Silva and Ana Fred| 22/05/2022| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A010%20Python%20File%20Handling%20and%20Visualization/A010%20Python%20File%20Handling%20and%20Visualization.ipynb)
A011 How to flash a ScientISST board with the official firmware | `sense`, `scientisst board`, `firmware`| Rui Maciel, Ana Sofia Carmo| 03/01/23| [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/scientisst/notebooks/blob/master/A.Setting%20up%20Your%20Tools%20and%20Workspace/A011%20How%20to%20flash%20a%20ScientISST%20board%20with%20the%20official%20firmware/A011%20How%20to%20flash%20a%20ScientISST%20board%20with%20the%20official%20firmware.ipynb)

Large diffs are not rendered by default.

Loading