# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import hexdump, renderDebugStatus, renderDebugConfig, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("Generic CCDebugger Information Tool") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get device information from the read-only section print("\nDevice information:") print(" IEEE Address : %s" % dbg.getSerial()) print(" PC : %04x" % dbg.getPC()) print("\nDebug status:") renderDebugStatus(dbg.debugStatus)
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("BlueGiga-Specific CCDebugger Flash Reader Tool", hexOut=True) # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get serial number print("\nReading %i KBytes to %s..." % (dbg.chipInfo['flash'], opts['out'])) hexFile = CCHEXFile(opts['out']) # Read in chunks of 4Kb (for UI-update purposes) for i in range(0, int(dbg.chipInfo['flash'] / 4)):
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from cclib import hexdump, renderDebugStatus, renderDebugConfig, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys import os # Get serial port either form environment or from arguments opts = getOptions("BlueGiga-Specific CCDebugger Information Tool") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print "ERROR: %s" % str(e) sys.exit(1) # Get device information from the read-only section print "\nDevice information:" print " IEEE Address : %s" % dbg.getSerial() print " PC : %04x" % dbg.getPC()
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from cclib import CCHEXFile, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("Generic CCDebugger Flash Reader Tool", hexOut=True) # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print "ERROR: %s" % str(e) sys.exit(1) # Get serial number print "\nReading %i KBytes to %s..." % (dbg.chipInfo['flash'], opts['out']) hexFile = CCHEXFile(opts['out']) # Read in chunks of 4Kb (for UI-update purposes) for i in range(0, int(dbg.chipInfo['flash'] / 4)):
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import hexdump, renderDebugStatus, renderDebugConfig, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys import os # Get serial port either form environment or from arguments opts = getOptions("BlueGiga-Specific CCDebugger Information Tool") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get device information from the read-only section print("\nDevice information:") print(" IEEE Address : %s" % dbg.getSerial()) print(" PC : %04x" % dbg.getPC()) # Get bluegiga-specific info binfo = dbg.getBLEInfo()
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import hexdump, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("Generic CCDebugger CPU Resume Tool") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Check if we are already outside the debug mode if (dbg.debugStatus & 0x20) == 0: print("CPU Already running") sys.exit(0) # Exit debug mode & resume CPU print("Exiting DEBUG mode...")
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions( "Generic CCDebugger Flash Writer Tool", hexIn=True, erase="Full chip erase before write", offset=":Offset the addresses in the .hex file by this value") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get offset offset = 0 if opts['offset']: if opts['offset'][0:2] == "0x": offset = int(opts['offset'], 16)
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("Generic CCDebugger Flash Reader Tool", hexOut=True) # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get serial number print("\nReading %i KBytes to %s..." % (dbg.chipInfo['flash'], opts['out'])) hexFile = CCHEXFile(opts['out']) # Read in chunks of 4Kb (for UI-update purposes) for i in range(0, int(dbg.chipInfo['flash'] / 4)):
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("BlueGiga-Specific CCDebugger Flash Reader Tool", hexOut=True) # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get serial number print("\nReading %i KBytes to %s..." % (dbg.chipInfo['flash'], opts['out'])) hexFile = CCHEXFile(opts['out']) # Read in chunks of 4Kb (for UI-update purposes)
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("Generic CCDebugger Flash Writer Tool", hexIn=True, erase="Full chip erase before write", offset=":Offset the addresses in the .hex file by this value") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter']) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get offset offset = 0 if opts['offset']: if opts['offset'][0:2] == "0x": offset = int(opts['offset'], 16) else: offset = int(opts['offset'])
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from cclib import CCHEXFile, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions( "BlueGiga-Specific CCDebugger Flash Writer Tool", hexIn=True, license=":A 32-byte, hex representation of the license key (64 characters)", addr=":A bluetooth mac address in XX:XX:XX:XX:XX:XX format", ver=":A decimal number that defines the hardware version", erase="Full chip erase before write", offset=":Offset the addresses in the .hex file by this value") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print "ERROR: %s" % str(e) sys.exit(1) # Get offset offset = 0
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from __future__ import print_function from cclib import CCHEXFile, getOptions, openCCDebugger from cclib.extensions.bluegiga import BlueGigaCCDebugger import sys # Get serial port either form environment or from arguments opts = getOptions("BlueGiga-Specific CCDebugger Flash Writer Tool", hexIn=True, license=":A 32-byte, hex representation of the license key (64 characters)", addr=":A bluetooth mac address in XX:XX:XX:XX:XX:XX format", ver=":A decimal number that defines the hardware version", erase="Full chip erase before write", offset=":Offset the addresses in the .hex file by this value") # Open debugger try: dbg = openCCDebugger(opts['port'], enterDebug=opts['enter'], driver=BlueGigaCCDebugger) except Exception as e: print("ERROR: %s" % str(e)) sys.exit(1) # Get offset offset = 0 if opts['offset']: if opts['offset'][0:2] == "0x": offset = int(opts['offset'], 16)