Implement dev option -c */[ASsrt] skeleton

Also changed usbdev, usbsn, usbvendor and usbproduct components from
PROGRAMMER structure to be cached string pointers rather than fixed-size
arrays. These will be initialised by pgm_new() with a pointer to nul;
This commit is contained in:
Stefan Rueger
2022-08-07 14:05:54 +01:00
parent 81136688f6
commit 08049a40ea
12 changed files with 159 additions and 37 deletions

View File

@@ -672,6 +672,7 @@ void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, AVRPART * p,
AVRPART * avr_new_part(void)
{
AVRPART * p;
char *nulp = cache_string("");
p = (AVRPART *)malloc(sizeof(AVRPART));
if (p == NULL) {
@@ -686,8 +687,8 @@ AVRPART * avr_new_part(void)
p->reset_disposition = RESET_DEDICATED;
p->retry_pulse = PIN_AVR_SCK;
p->flags = AVRPART_SERIALOK | AVRPART_PARALLELOK | AVRPART_ENABLEPAGEPROGRAMMING;
p->parent_id = NULL;
p->config_file = NULL;
p->parent_id = nulp;
p->config_file = nulp;
p->lineno = 0;
memset(p->signature, 0xFF, 3);
p->ctl_stack_type = CTL_STACK_NONE;