Commit 27b7364a7a5da5f592d76c221fcb8cc38745d32c
authorMichel Pollet <buserror@gmail.com>
Tue, 15 Sep 2015 13:34:29 +0000 (14:34 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 2 Oct 2015 06:24:53 +0000 (07:24 +0100)
This is not something that happends on existing cores, but can be
annoying when defining a new one.

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_ioport.c

index 14fabce2437056867ecf623b3ac7b279395829c9..edbdf50165cee129c16d9018069fb73c3e8d5ddd 100644 (file)
@@ -247,6 +247,10 @@ static     avr_io_t        _io = {
 
 void avr_ioport_init(avr_t * avr, avr_ioport_t * p)
 {
+       if (!p->r_port) {
+               printf("skipping PORT%c for core %s\n", p->name, avr->mmcu);
+               return;
+       }
        p->io = _io;
 //     printf("%s PIN%c 0x%02x DDR%c 0x%02x PORT%c 0x%02x\n", __FUNCTION__,
 //             p->name, p->r_pin,