Commit f93de95ac3aafa3d296f0022d455333488b05620
1 parent
4c65c3ae
Added virtual lab
Showing
6 changed files
with
10 additions
and
1 deletions
hw/at91_pio.c
@@ -170,7 +170,7 @@ static void at91_pio_mem_write(void *opaque, target_phys_addr_t offset, | @@ -170,7 +170,7 @@ static void at91_pio_mem_write(void *opaque, target_phys_addr_t offset, | ||
170 | PIOState *s = opaque; | 170 | PIOState *s = opaque; |
171 | int i; | 171 | int i; |
172 | 172 | ||
173 | - printf("Writing PIO: offset=0x%8lx, value=0x%8x\n",offset,value); | 173 | + printf("Writing PIO: offset=0x%08lx, value=0x%08x\n",offset,value); |
174 | 174 | ||
175 | offset &= PIO_SIZE - 1; | 175 | offset &= PIO_SIZE - 1; |
176 | switch (offset) { | 176 | switch (offset) { |
@@ -196,13 +196,19 @@ static void at91_pio_mem_write(void *opaque, target_phys_addr_t offset, | @@ -196,13 +196,19 @@ static void at91_pio_mem_write(void *opaque, target_phys_addr_t offset, | ||
196 | s->odsr |= value; | 196 | s->odsr |= value; |
197 | for (i = 0; i < PIO_PINS; i++) | 197 | for (i = 0; i < PIO_PINS; i++) |
198 | if (value & (1 << i) & s->osr) | 198 | if (value & (1 << i) & s->osr) |
199 | + { | ||
199 | qemu_set_irq(s->out[i], 1); | 200 | qemu_set_irq(s->out[i], 1); |
201 | + printf("Pin %d set\n",i); | ||
202 | + } | ||
200 | break; | 203 | break; |
201 | case PIO_CODR: | 204 | case PIO_CODR: |
202 | s->odsr &= ~value; | 205 | s->odsr &= ~value; |
203 | for (i = 0; i < PIO_PINS; i++) | 206 | for (i = 0; i < PIO_PINS; i++) |
204 | if (value & (1 << i) & s->osr) | 207 | if (value & (1 << i) & s->osr) |
208 | + { | ||
205 | qemu_set_irq(s->out[i], 0); | 209 | qemu_set_irq(s->out[i], 0); |
210 | + printf("Pin %d reset\n",i); | ||
211 | + } | ||
206 | break; | 212 | break; |
207 | case PIO_ODSR: | 213 | case PIO_ODSR: |
208 | s->odsr = (s->odsr & ~s->owsr) | (value & s->owsr); | 214 | s->odsr = (s->odsr & ~s->owsr) | (value & s->owsr); |
virtual_lab/debugme.sh
0 → 100755
1 | +./qemu-system-arm -M at91sam9263ek -pflash pflash.img -nographic -S -s |
virtual_lab/led_blink.elf
0 → 100644
No preview for this file type
virtual_lab/pflash.img
0 → 100644
No preview for this file type
virtual_lab/qemu-system-arm
0 → 120000
virtual_lab/runme.sh
0 → 100755
1 | +./qemu-system-arm -M at91sam9263ek -pflash pflash.img -serial /dev/tty |