Update urclock documentation

This commit is contained in:
Stefan Rueger 2022-11-08 15:18:30 +00:00
parent cf3c81f714
commit 6a6d333849
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
3 changed files with 32 additions and 30 deletions

View File

@ -1185,7 +1185,7 @@ Show the size of the metadata just below the bootloader, then exit.
Show the size of the bootloader, then exit. Show the size of the bootloader, then exit.
.It Ar showversion .It Ar showversion
Show bootloader version and capabilities, then exit. Show bootloader version and capabilities, then exit.
.It Ar showvbl .It Ar showvector
Show the vector number and name of the interrupt table vector used by the Show the vector number and name of the interrupt table vector used by the
bootloader for starting the application, then exit. For hardware-supported bootloader for starting the application, then exit. For hardware-supported
bootloaders this will be vector 0 (Reset), and for vector bootloaders this bootloaders this will be vector 0 (Reset), and for vector bootloaders this

View File

@ -763,7 +763,7 @@ programmer
# See https://github.com/stefanrueger/urboot # See https://github.com/stefanrueger/urboot
programmer programmer
id = "urclock"; id = "urclock";
desc = "Urclock programmer for urboot bootloaders (arduino compatible)"; desc = "Urclock programmer for urboot bootloaders using urprotocol";
type = "urclock"; type = "urclock";
prog_modes = PM_SPM; prog_modes = PM_SPM;
connection_type = serial; connection_type = serial;

View File

@ -289,7 +289,7 @@ typedef struct {
showmeta, // ... metadata size showmeta, // ... metadata size
showboot, // ... bootloader size showboot, // ... bootloader size
showversion, // ... bootloader version and capabilities showversion, // ... bootloader version and capabilities
showvbl, // ... vector bootloader level, vector number and name showvector, // ... vector bootloader level, vector number and name
showpart, // ... part for which bootloader was compiled showpart, // ... part for which bootloader was compiled
xbootsize, // Manual override for size of bootloader section xbootsize, // Manual override for size of bootloader section
xvectornum, // ... for vector number (implies vbllevel = 1) xvectornum, // ... for vector number (implies vbllevel = 1)
@ -1261,7 +1261,7 @@ vblvecfound:
int nm = nmeta(1, ur.uP.flashsize); // 6 for date + size of store struct + 1 for mcode byte int nm = nmeta(1, ur.uP.flashsize); // 6 for date + size of store struct + 1 for mcode byte
// Showing properties mostly requires examining the bytes below bootloader for metadata // Showing properties mostly requires examining the bytes below bootloader for metadata
if(ur.showall || (ur.showid && *ur.iddesc && *ur.iddesc != 'E') || ur.showapp || if(ur.showall || (ur.showid && *ur.iddesc && *ur.iddesc != 'E') || ur.showapp ||
ur.showstore || ur.showmeta || ur.showboot || ur.showversion || ur.showvbl || ur.showstore || ur.showmeta || ur.showboot || ur.showversion || ur.showvector ||
ur.showpart || ur.showdate || ur.showfilename) { ur.showpart || ur.showdate || ur.showfilename) {
if((rc = ur_readEF(pgm, p, spc, ur.blstart-nm, nm, 'F'))) if((rc = ur_readEF(pgm, p, spc, ur.blstart-nm, nm, 'F')))
@ -1315,7 +1315,7 @@ vblvecfound:
// Print and exit when option show... was given // Print and exit when option show... was given
int first=1; int first=1;
int single = !ur.showall && (!!ur.showid + !!ur.showapp + !!ur.showstore + !!ur.showmeta + int single = !ur.showall && (!!ur.showid + !!ur.showapp + !!ur.showstore + !!ur.showmeta +
!!ur.showboot + !!ur.showversion + !!ur.showvbl + !!ur.showpart + !!ur.showdate + !!ur.showboot + !!ur.showversion + !!ur.showvector + !!ur.showpart + !!ur.showdate +
!!ur.showfilename) == 1; !!ur.showfilename) == 1;
if(ur.showid || ur.showall) { if(ur.showid || ur.showall) {
@ -1338,7 +1338,7 @@ vblvecfound:
term_out(" %s%d"+first, single? "": "boot ", ur.blstart? flm->size-ur.blstart: 0), first=0; term_out(" %s%d"+first, single? "": "boot ", ur.blstart? flm->size-ur.blstart: 0), first=0;
if(ur.showversion || ur.showall) if(ur.showversion || ur.showall)
term_out(" %s"+first, ur.desc+(*ur.desc==' ')), first=0; term_out(" %s"+first, ur.desc+(*ur.desc==' ')), first=0;
if(ur.showvbl || ur.showall) { if(ur.showvector || ur.showall) {
int vnum = ur.vbllevel? ur.vblvectornum & 0x7f: 0; int vnum = ur.vbllevel? ur.vblvectornum & 0x7f: 0;
term_out(" vector %d (%s)"+first, vnum, vblvecname(pgm, vnum)), first=0; term_out(" vector %d (%s)"+first, vnum, vblvecname(pgm, vnum)), first=0;
} }
@ -1987,30 +1987,32 @@ static int urclock_parseextparms(const PROGRAMMER *pgm, LISTID extparms) {
bool assign; bool assign;
const char *help; const char *help;
} options[] = { } options[] = {
{"showall", &ur.showall, 0, NULL, 0, "Show all info for connected part and exit"}, #define ARG 0, NULL, 1
{"showid", &ur.showid, 0, NULL, 0, " ... unique Urclock ID"}, #define NA 0, NULL, 0
{"showdate", &ur.showdate, 0, NULL, 0, " ... last-modified date of flash application"}, {"showall", &ur.showall, NA, "Show all info for connected part and exit"},
{"showfilename", &ur.showfilename, 0, NULL, 0, " ... filename of last uploaded application"}, {"showid", &ur.showid, NA, "Show Urclock ID and exit"},
{"showapp", &ur.showapp, 0, NULL, 0, " ... application size"}, {"showdate", &ur.showdate, NA, "Show last-modified date of flash application and exit"},
{"showstore", &ur.showstore, 0, NULL, 0, " ... store size"}, {"showfilename", &ur.showfilename, NA,"Show filename of last uploaded application and exit"},
{"showmeta", &ur.showmeta, 0, NULL, 0, " ... metadata size"}, {"showapp", &ur.showapp, NA, "Show application size and exit"},
{"showboot", &ur.showboot, 0, NULL, 0, " ... bootloader size"}, {"showstore", &ur.showstore, NA, "Show store size and exit"},
{"showversion", &ur.showversion, 0, NULL, 0, " ... bootloader version and capabilities"}, {"showmeta", &ur.showmeta, NA, "Show metadata size and exit"},
{"showvbl", &ur.showvbl, 0, NULL, 0, " ... vector bootloader level, vec # and name"}, {"showboot", &ur.showboot, NA, "Show bootloader size and exit"},
{"showversion", &ur.showversion, NA, "Show bootloader version and capabilities and exit"},
{"showvector", &ur.showvector, NA, "Show vector bootloader vector # and name and exit"},
{"id", NULL, sizeof ur.iddesc, ur.iddesc, 1, "Location of Urclock ID, eg, F.12345.6"}, {"id", NULL, sizeof ur.iddesc, ur.iddesc, 1, "Location of Urclock ID, eg, F.12345.6"},
{"title", NULL, sizeof ur.title, ur.title, 1, "Title stored and shown in lieu of a filename"}, {"title", NULL, sizeof ur.title, ur.title, 1, "Title stored and shown in lieu of a filename"},
{"bootsize", &ur.xbootsize, 0, NULL, 1, "Manual override for bootloader size"}, {"bootsize", &ur.xbootsize, ARG, "Manual override for bootloader size"},
{"vectornum", &ur.xvectornum, 0, NULL, 1, " ... for vector number"}, // implies vbllevel=1 {"vectornum", &ur.xvectornum, ARG, "Manual override for vector number"},
{"eepromrw", &ur.xeepromrw, 0, NULL, 0, " ... for EEPROM read/write capability"}, {"eepromrw", &ur.xeepromrw, NA, "Asssertion of bootloader EEPROM read/write capability"},
{"emulate_ce", &ur.xemulate_ce, 0, NULL, 0, " ... for making avrdude emulate chip erase"}, {"emulate_ce", &ur.xemulate_ce, NA, "Emulate chip erase"},
{"forcetrim", &ur.forcetrim, 0, NULL, 0, "Upload of unchanged files, trim it if needed"}, {"forcetrim", &ur.forcetrim, NA, "Upload of unchanged files, trim it if needed"},
{"initstore", &ur.initstore, 0, NULL, 0, "Fill store with 0xff on writing to flash"}, {"initstore", &ur.initstore, NA, "Fill store with 0xff on writing to flash"},
// @@@ {"copystore", &ur.copystore, 0, NULL, 0, "Copy over store on writing to flash"}, //@@@ {"copystore", &ur.copystore, NA, "Copy over store on writing to flash"},
{"nofilename", &ur.nofilename, 0, NULL, 0, "Don't store filename on writing to flash"}, {"nofilename", &ur.nofilename, NA, "Do not store filename on writing to flash"},
{"nodate", &ur.nodate, 0, NULL, 0, " ... application filename and no date either"}, {"nodate", &ur.nodate, NA, "Do not store application filename and no date either"},
{"nometadata", &ur.nometadata, 0, NULL, 0, " ... metadata at all (ie, no store support)"}, {"nometadata", &ur.nometadata, NA, "Do not store metadata at all (ie, no store support)"},
{"delay", &ur.delay, 0, NULL, 1, "Add delay [ms] after reset, can be negative"}, {"delay", &ur.delay, ARG, "Add delay [ms] after reset, can be negative"},
{"help", &help, 0, NULL, 0, "Show this help menu and exit"}, {"help", &help, NA, "Show this help menu and exit"},
}; };
int rc = 0; int rc = 0;