Skip to content

Commit b15efca

Browse files
committed
Cleaning up for pypi release
1 parent 41646e4 commit b15efca

3 files changed

Lines changed: 19 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# picchick
2-
A utility to program PIC microcontrollers
2+
A utility to aid in programming PIC microcontrollers
33

44

55
## Overview
@@ -11,7 +11,7 @@ It attempts to do the majority of the work on the host computer, and sends a sim
1111
## Usage
1212

1313
```
14-
usage: picchick.py [options] [hexfile]
14+
usage: picchick [options] [hexfile]
1515
1616
A utility for programming PIC19196 microcontrollers
1717
@@ -22,13 +22,20 @@ options:
2222
-h, --help show this help message and exit
2323
-f, --flash flash hexfile onto the device
2424
--read addr read specified address or chunk of memory
25-
--write addr word write word to specified address or chunk of memory
26-
--erase addr erase specified address or chunk of memory
25+
--write addr word write word to specified address
26+
--erase [addr] erase device or specified address
27+
-d chipID, --device chipID
28+
device to be programmed
2729
-p port, --port port programmer serial port
2830
--baud baud serial connection baudrate
2931
--map display the hexfile
3032
--list-ports list available serial ports
3133
--list-devices list available device configurations
34+
35+
flag arguments:
36+
[addr]: device memory address in hexadecimal
37+
all all device memory areas
38+
flash user flash area
3239
```
3340

3441

software/picchick/cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
DESCRIPTION = '''\
11-
A utility for programming PIC19196 microcontrollers\
11+
A utility to aid in programming PIC microcontrollers\
1212
'''
1313

1414
USAGE = '''\
@@ -83,6 +83,12 @@ def parseArgv():
8383
# The map flag only requires the hexfile to be present
8484
hexfile_reqd = both_reqd or (args.map)
8585

86+
# If we don't need to do anything, print help because
87+
# the user needs it
88+
if not hexfile_reqd and not programmer_reqd:
89+
parser.print_help()
90+
sys.exit(0)
91+
8692

8793
# Firstly, if we need the hexfile, check if it exists
8894
# If not, immediatly exit with a helpful message

software/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = A utility for programming PIC microntronllers
77
url = https://github.com/rex--/picchick/tree/master/software
88
classifiers =
99
Programming Language :: Python :: 3.10
10-
License :: NCSA
10+
License :: OSI Approved :: University of Illinois/NCSA Open Source License
1111

1212
[options]
1313
packages = picchick

0 commit comments

Comments
 (0)