Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
97a92be
Update spi_nor_flash.c
bigbigmdm Mar 22, 2023
9adc2c7
Update spi_nor_flash.c
bigbigmdm Mar 22, 2023
cf31fd5
Add files via upload
bigbigmdm Mar 22, 2023
decd3a6
Add files via upload
bigbigmdm Mar 23, 2023
a9c5d14
Add files via upload
bigbigmdm Mar 23, 2023
687a1ab
Update spi_nor_flash.c
bigbigmdm Mar 23, 2023
b4ec14d
Add files via upload
bigbigmdm Mar 23, 2023
16e0603
Update snander.sh
bigbigmdm Mar 24, 2023
fa32d8e
Update spi_nor_flash.c
bigbigmdm Apr 3, 2023
3553507
Add files via upload
bigbigmdm Apr 3, 2023
7d2a637
Update spi_nor_flash.c
bigbigmdm Apr 3, 2023
de36295
Add files via upload
bigbigmdm Apr 3, 2023
41aae8e
Update spi_nor_flash.c
bigbigmdm Apr 4, 2023
cd33209
Update spi_nor_flash.c
bigbigmdm Apr 4, 2023
83256f3
Update spi_nor_flash.c
bigbigmdm Apr 4, 2023
a5818f6
Add files via upload
bigbigmdm Apr 5, 2023
286442f
Update snander.sh
bigbigmdm Apr 6, 2023
3517dad
Update spi_nor_flash.c
bigbigmdm Apr 6, 2023
d17dd8f
Add files via upload
bigbigmdm Apr 6, 2023
3ec673c
Update spi_nor_flash.c
bigbigmdm Apr 9, 2023
9730308
Update flash_support_list.txt
bigbigmdm Apr 16, 2023
886faa1
Update spi_nor_flash.c
bigbigmdm May 17, 2023
7f79d6a
Update spi_nor_flash.c
bigbigmdm May 22, 2023
7b93d07
Update spi_nor_flash.c
bigbigmdm May 23, 2023
a2a009e
Update spi_nor_flash.c
bigbigmdm May 23, 2023
5f8e991
Update spi_nor_flash.c
bigbigmdm May 23, 2023
7324b55
Update spi_nor_flash.c
bigbigmdm May 23, 2023
acd03dc
Update spi_nor_flash.c
bigbigmdm Jun 26, 2023
a770abe
Update spi_nor_flash.c
bigbigmdm Jun 26, 2023
a57094c
Update spi_nor_flash.c
bigbigmdm Jun 26, 2023
f94714d
Update spi_nor_flash.c
bigbigmdm Jun 28, 2023
7eb2e5a
Update spi_nor_flash.c
bigbigmdm Jun 29, 2023
e356c25
Update spi_nor_flash.c
bigbigmdm Jun 29, 2023
544b2c9
Update spi_nor_flash.c
bigbigmdm Jul 11, 2023
aee8183
Update spi_nor_flash.c
bigbigmdm Jul 13, 2023
208469c
Update spi_nor_flash.c
bigbigmdm Jul 14, 2023
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
Binary file added Linux/24Cxx_icon64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Linux/SNANDer
Binary file not shown.
13 changes: 13 additions & 0 deletions Linux/SNANDer.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Desktop Entry]
Name=SNANDer
Name[ru]=Программатор SNANDer
Comment=24xx/25xx programming tool for the CH341A USB-programmer
Comment[ru]=Программатор микросхем 24xx/25xx для CH341A USB-programmer
Exec=/home/<путь до snander.sh>/snander.sh
Type=Application
Terminal=true
StartupNotify=true
Path=/home/<путь до snander.sh>/
Icon=/home/<путь до snander.sh>/24Cxx_icon64.png
Encoding=UTF-8
Categories=Application;Development;
173 changes: 173 additions & 0 deletions Linux/snander.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
#!/bin/bash
mode=""
t1="24Cxx - Two-Wire Serial EEPROM"
t2="93Cxx - MICROWIRE Serial EEPROM"
ch_dev=$(lsusb | grep "1a86:" -o)
echo $ch_dev
if [[ "$ch_dev" == "1a86:" ]]
then
epromtype=$(zenity --height=320 --width=320 --list --radiolist --text \
"Выберите тип EEPROM:" --column="Set" --column="Тип микросхемы"\
FALSE "24Cxx - Two-Wire Serial EEPROM"\
FALSE "93Cxx - MICROWIRE Serial EEPROM"\
FALSE "25Cxx - NAND FLASH EEPROM"\
FALSE "25Qxx - NOR FLASH EEPROM")
if [ -n "$epromtype" ]
then
if [[ "$epromtype" == "24Cxx - Two-Wire Serial EEPROM" ]]
then
echo "24Cxx selected"
eeprom_model=$(zenity --height=330 --width=320 --list --radiolist --text \
"24Cxx - Two-Wire Serial EEPROM:" --column="Set" --column="Модель микросхемы"\
TRUE "24c01"\
FALSE "24c02"\
FALSE "24c04"\
FALSE "24c16"\
FALSE "24c32"\
FALSE "24c64"\
FALSE "24c128"\
FALSE "24c256"\
FALSE "24c512"\ )
fi
if [[ "$epromtype" == "93Cxx - MICROWIRE Serial EEPROM" ]]
then
echo "93Cxx selected"
eeprom_model=$(zenity --height=320 --width=320 --list --radiolist --text \
"93Cxx - Microwire EEPROM:" --column="Set" --column="Модель микросхемы"\
TRUE "93c06"\
FALSE "93c16"\
FALSE "93c46"\
FALSE "93c56"\
FALSE "93c66"\
FALSE "93c76"\
FALSE "93c86"\
FALSE "93c96"\ )
fi
if [ "$epromtype" == "25Cxx - NAND FLASH EEPROM" ] || [ "$epromtype" == "25Qxx - NOR FLASH EEPROM" ]
then
echo "NOR or NAND selected"
manufacture='Производитель: '
info=$(SNANDer -i)
if [[ $info == *"id: 7f"* ]]
then
zenity --warning \
--text="Пожалуйста подключите адаптер на 1,8 вольт!"
fi
man_code=$(echo "$info" | grep 'spi device id:')
dev_vcc=$(echo "$info" | grep 'VCC:')
if [[ $man_code == *"spi device id:"* ]]
then
if [[ $man_code == *"id: 01"* ]]; then man_name="SPANSION"; fi
if [[ $man_code == *"id: 0b"* ]]; then man_name="XTX"; fi
if [[ $man_code == *"id: 1c"* ]]; then man_name="Eon"; fi
if [[ $man_code == *"id: 1f"* ]]; then man_name="Atmel"; fi
if [[ $man_code == *"id: 20"* ]]; then man_name="Micron"; fi
if [[ $man_code == *"id: 5e"* ]]; then man_name="Zbit"; fi
if [[ $man_code == *"id: 68"* ]]; then man_name="Boya"; fi
if [[ $man_code == *"id: 7f"* ]]; then man_name="ISSI"; fi
if [[ $man_code == *"id: 85"* ]]; then man_name="PUYA"; fi
if [[ $man_code == *"id: 9d"* ]]; then man_name="ISSI"; fi
if [[ $man_code == *"id: a1"* ]]; then man_name="Fudan"; fi
if [[ $man_code == *"id: ba"* ]]; then man_name="Zetta"; fi
if [[ $man_code == *"id: c2"* ]]; then man_name="MXIC (Macronix)"; fi
if [[ $man_code == *"id: c8"* ]]; then man_name="GigaDevice"; fi
if [[ $man_code == *"id: e0"* ]]; then man_name="PARAGON"; fi
if [[ $man_code == *"id: ef"* ]]; then man_name="Winbond"; fi
if [[ $man_code == *"id: f8"* ]]; then man_name="Fidelix"; fi
else manufacture="Производитель не найден."
fi;
manufacture="${manufacture}<b>${man_name}</b>"
info=$(echo "$info" | grep 'Flash:')
rufirst="Найдена микросхема "
rusecond="Объем: "
ruvcc="Напряжение питания:"
dev_vcc=${dev_vcc/'VCC:'/"$ruvcc <b>"}
ruinfo=${info/'Detected '/"\n$rufirst"}
ruinfo=${ruinfo/'Flash Size:'/"\n$rusecond"}
ruinfo=${ruinfo/''/"<b>"}
ruinfo=${ruinfo/''/"<b>"}
ruinfo=${ruinfo/''/"</b>"}
ruinfo=${ruinfo/''/"</b>"}
ruinfo="${ruinfo} \n${manufacture}\n${dev_vcc}</b>"
fi
action_type=$(zenity --height=340 --width=320 --list --radiolist --text \
"Выберите действие:" --column="Set" --column="Действие"\
TRUE "Считать"\
FALSE "Записать"\
FALSE "Записать/проверить"\
FALSE "Стереть" )
if [[ "$action_type" == "Записать/проверить" ]] ; then mode="-v"; else mode=""; fi
if [[ "$action_type" == "Считать" ]]
then
zenity --warning --width=320 \
--text="Выберите каталог для сохранения файла"
filepath=$(zenity --file-selection --directory)
filename=$(zenity --entry \
--title="Введите имя файла" \
--text="Имя файла для сохранения:" \
--entry-text "eeprom.bin")
if [ -n "$eeprom_model" ]
then
SNANDer -E$eeprom_model -r $filepath/$filename | tee >(zenity --width=200 --height=100 \
--title="Считывание" --progress \
--pulsate --text="Подождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
else
SNANDer -r $filepath/$filename | tee >(zenity --width=320 --height=100 \
--title="Считывание" --progress \
--pulsate --text="$ruinfo\n\nПодождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
fi
fi
if [ "$action_type" == "Записать" ] || [ "$action_type" == "Записать/проверить" ]
then
zenity --warning \
--text="Выберите файл для записи микросхемы"
filename=$(zenity --file-selection)
if [ -n "$eeprom_model" ]
then
SNANDer -E$eeprom_model -w $filename $mode| tee >(zenity --width=200 --height=100 \
--title="Запись" --progress \
--pulsate --text="Подождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
else
SNANDer -w $filename $mode| tee >(zenity --width=320 --height=100 \
--title="Запись" --progress \
--pulsate --text="$ruinfo\n\nПодождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
fi
fi
if [[ "$action_type" == "Стереть" ]]
then
if [ -n "$eeprom_model" ]
then
SNANDer -E$eeprom_model -e | tee >(zenity --width=200 --height=100 \
--title="Стирание" --progress \
--pulsate --text="Подождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
else
SNANDer -e | tee >(zenity --width=320 --height=100 \
--title="Стирание" --progress \
--pulsate --text="$ruinfo\n\nПодождите, процесс выполняется..." \
--no-cancel --auto-close \
--percentage=10)
fi
fi
zenity --warning \
--text="Готово" \
--icon-name='applications-electronics'
else
echo "Микросхема не выбрана"
zenity --error \
--text="Микросхема не выбрана"
fi
else
zenity --error \
--text="Программатор CH341A не подключен!"
fi

Binary file added Programmer_photos/1_8_volts_adapter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading