Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- [Introduction](#introduction)
- [Requirements](#requirements)
- [:computer: System](#computer-system)
- [Linux](#linux)
- [Windows](#windows)
- [MacOs](#macos)
- [:snake: Python](#snake-python)
- [:floppy\_disk: Bootloader \& Firmware](#floppy_disk-bootloader--firmware)
- [Usage](#usage)
Expand Down Expand Up @@ -34,26 +37,26 @@ With OpenOCD, the program steps are :
## Requirements

### :computer: System
#### Linux
- [OpenOCD](https://openocd.org/): `sudo apt install openocd`
- Python 3.x: `sudo apt install python3`
- Python3 pip: `sudo apt install python3-pip`

:bulb: All in one: `sudo apt install openocd python3 python3-pip`

#### Windows
- [OpenOCD](https://openocd.org/):
- Linux: `sudo apt install openocd`
- Windows:
- [https://github.com/openocd-org/openocd/releases/latest](https://github.com/openocd-org/openocd/releases/latest)
- Download lastest release form [https://github.com/openocd-org/openocd/releases/latest](https://github.com/openocd-org/openocd/releases/latest)
- add the `bin` folder to your [path](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) (e.g `C:/openOCD/bin`).
- Python 3.x:
- Linux: `sudo apt install python3`
- Windows: [https://www.python.org/downloads/windows/](https://www.python.org/downloads/windows/)
- Python3 pip:
- Linux: `sudo apt install python3-pip`
- Windows (If not installed with Python): [https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages](https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages)
- python3 tk:
- Linux: `sudo apt install python3-tk`
- Windows: [https://www.geeksforgeeks.org/how-to-install-tkinter-in-windows/](https://www.geeksforgeeks.org/how-to-install-tkinter-in-windows/)

:bulb: All in one (Linux only): `sudo apt install openocd python3 python3-pip python3-tk`
- Python 3.x: Download it from [https://www.python.org/downloads/windows/](https://www.python.org/downloads/windows/)
- Python3 pip: If not installed with Python, here are the instructions: [https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages](https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages)

#### MacOs
Untested, but certainly identical to Linux.

### :snake: Python
- [virtual-env](https://docs.python-guide.org/dev/virtualenvs/#lower-level-virtualenv): `pip install virtualenv` _(optionnal)_
- [PySimpleGUI](https://pysimplegui.readthedocs.io/en/latest/): `pip install pysimplegui`
- [Tkinter](https://docs.python.org/fr/3/library/tkinter.html): `pip install tkinter`
- [psutil](https://psutil.readthedocs.io/en/latest/): `pip install psutil`

:bulb: You can install everything (virtual env include), with the `install.sh` script (Linux only).
Expand Down
87 changes: 87 additions & 0 deletions azure.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copyright © 2021 rdbende <rdbende@gmail.com>

source [file join [file dirname [info script]] theme light.tcl]
source [file join [file dirname [info script]] theme dark.tcl]

option add *tearOff 0

proc set_theme {mode} {
if {$mode == "dark"} {
ttk::style theme use "azure-dark"

array set colors {
-fg "#ffffff"
-bg "#333333"
-disabledfg "#ffffff"
-disabledbg "#737373"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)

} elseif {$mode == "light"} {
ttk::style theme use "azure-light"

array set colors {
-fg "#000000"
-bg "#ffffff"
-disabledfg "#737373"
-disabledbg "#ffffff"
-selectfg "#ffffff"
-selectbg "#007fff"
}

ttk::style configure . \
-background $colors(-bg) \
-foreground $colors(-fg) \
-troughcolor $colors(-bg) \
-focuscolor $colors(-selectbg) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-insertcolor $colors(-fg) \
-insertwidth 1 \
-fieldbackground $colors(-selectbg) \
-font {"Segoe Ui" 10} \
-borderwidth 1 \
-relief flat

tk_setPalette background [ttk::style lookup . -background] \
foreground [ttk::style lookup . -foreground] \
highlightColor [ttk::style lookup . -focuscolor] \
selectBackground [ttk::style lookup . -selectbackground] \
selectForeground [ttk::style lookup . -selectforeground] \
activeBackground [ttk::style lookup . -selectbackground] \
activeForeground [ttk::style lookup . -selectforeground]

ttk::style map . -foreground [list disabled $colors(-disabledfg)]

option add *font [ttk::style lookup . -font]
option add *Menu.selectcolor $colors(-fg)
}
}
Binary file modified doc/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading