File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,13 @@ main(
183
183
exit (1 );
184
184
}
185
185
avr_init (avr );
186
+ avr -> log = (log > LOG_TRACE ? LOG_TRACE : log );
187
+ avr -> trace = trace ;
186
188
avr_load_firmware (avr , & f );
187
189
if (f .flashbase ) {
188
190
printf ("Attempted to load a bootloader at %04x\n" , f .flashbase );
189
191
avr -> pc = f .flashbase ;
190
192
}
191
- avr -> log = (log > LOG_TRACE ? LOG_TRACE : log );
192
- avr -> trace = trace ;
193
193
for (int ti = 0 ; ti < trace_vectors_count ; ti ++ ) {
194
194
for (int vi = 0 ; vi < avr -> interrupts .vector_count ; vi ++ )
195
195
if (avr -> interrupts .vector [vi ]-> vector == trace_vectors [ti ])
Original file line number Diff line number Diff line change @@ -450,8 +450,12 @@ _avr_vcd_notify(
450
450
{
451
451
avr_vcd_t * vcd = (avr_vcd_t * )param ;
452
452
453
- if (!vcd -> output )
453
+ if (!vcd -> output ) {
454
+ AVR_LOG (vcd -> avr , LOG_WARNING ,
455
+ "%s: no output\n" ,
456
+ __FUNCTION__ );
454
457
return ;
458
+ }
455
459
456
460
avr_vcd_signal_t * s = (avr_vcd_signal_t * )irq ;
457
461
avr_vcd_log_t l = {
@@ -478,8 +482,12 @@ avr_vcd_add_signal(
478
482
int signal_bit_size ,
479
483
const char * name )
480
484
{
481
- if (vcd -> signal_count == AVR_VCD_MAX_SIGNALS )
485
+ if (vcd -> signal_count == AVR_VCD_MAX_SIGNALS ) {
486
+ AVR_LOG (vcd -> avr , LOG_ERROR ,
487
+ " %s: unable add signal '%s'\n" ,
488
+ __FUNCTION__ , name );
482
489
return -1 ;
490
+ }
483
491
int index = vcd -> signal_count ++ ;
484
492
avr_vcd_signal_t * s = & vcd -> signal [index ];
485
493
strncpy (s -> name , name , sizeof (s -> name ));
You can’t perform that action at this time.
0 commit comments