mirror of
https://github.com/Team-Resurgent/xenium-programmer.git
synced 2026-08-15 02:18:58 -07:00
58 lines
2.4 KiB
Bash
Executable File
58 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
echo -e '▒██ ██▒▓█████ ███▄ █ ██▓ █ ██ ███▄ ▄███▓'
|
|
echo -e '▒▒ █ █ ▒░▓█ ▀ ██ ▀█ █ ▓██▒ ██ ▓██▒▓██▒▀█▀ ██▒'
|
|
echo -e '░░ █ ░▒███ ▓██ ▀█ ██▒▒██▒▓██ ▒██░▓██ ▓██░'
|
|
echo -e ' ░ █ █ ▒ ▒▓█ ▄ ▓██▒ ▐▌██▒░██░▓▓█ ░██░▒██ ▒██ '
|
|
echo -e '▒██▒ ▒██▒░▒████▒▒██░ ▓██░░██░▒▒█████▓ ▒██▒ ░██▒'
|
|
echo -e '▒▒ ░ ░▓ ░░░ ▒░ ░░ ▒░ ▒ ▒ ░▓ ░▒▓▒ ▒ ▒ ░ ▒░ ░ ░'
|
|
echo -e '░░ ░▒ ░ ░ ░ ░░ ░░ ░ ▒░ ▒ ░░░▒Programmer░ ░'
|
|
echo -e ' ░ ░ ░ ░ ░ ░ ▒kooscode@github ░ '
|
|
echo -e ' ░ ░ ░ ░ ░ ░ ░ ░ '
|
|
|
|
# Paths to default Firmware and XeniumOS files
|
|
XENIUM_OS=xenium-bin/xenium_blue.bin
|
|
XENIUM_JED=xenium-bin/openxenium.jed
|
|
FLASH_JED=xenium-bin/xeniumflash.jed
|
|
|
|
if [ $# -eq 1 ] ; then
|
|
XENIUM_OS=$1
|
|
echo -e 'Using XeniumOS: ' $1
|
|
fi
|
|
|
|
# Program the Xilinx CPLD with BitBus to Flash firmware.
|
|
echo -e '--------------------------------------'
|
|
echo -e 'PROGRAMMING XILINX CPLD: BITBUS BRIDGE'
|
|
echo -e '--------------------------------------'
|
|
xenium-flash/bin/xenium-jtag $FLASH_JED
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "ERROR Programming the Xilinx CPLD: " $FLASH_JED
|
|
echo "Please double check your JTAG connection and wires!"
|
|
exit $?
|
|
fi
|
|
|
|
# Send XeniumOS Image to Flash Memory via bitbus bridge
|
|
echo -e '-----------------------------'
|
|
echo -e 'PROGRAMMING FLASH : XENIUM OS'
|
|
echo -e '-----------------------------'
|
|
xenium-flash/bin/xenium-flash $XENIUM_OS $2
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "ERROR Loading XeniumOS into OpenXenium Flash memory!"
|
|
echo "Please double check your LPC Header connection and wires!"
|
|
exit $?
|
|
fi
|
|
|
|
# Program the Xilinx CPLD with OpenXenium Firmware
|
|
echo -e '---------------------------------------------'
|
|
echo -e 'PROGRAMMING XILINX CPLD: OPEN XENIUM FIRMWARE'
|
|
echo -e '---------------------------------------------'
|
|
xenium-flash/bin/xenium-jtag $XENIUM_JED
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "ERROR Programming the Xilinx CPLD: " $XENIUM_JED
|
|
echo "Please double check your JTAG connection and wires!"
|
|
exit $?
|
|
fi
|
|
|