[RFC PATCH 00/10] hw/avr: Introduce the Arduino board

Philippe Mathieu-Daudé posted 10 patches 4 years, 4 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191128015030.27543-1-f4bug@amsat.org
hw/avr/atmega.h                  |  58 +++++
include/hw/char/avr_usart.h      |   2 +
target/avr/cpu.h                 |   2 +
hw/avr/arduino.c                 | 173 ++++++++++++++
hw/avr/atmega.c                  | 379 +++++++++++++++++++++++++++++++
hw/avr/sample.c                  | 282 -----------------------
hw/char/avr_usart.c              |   2 +-
target/avr/cpu.c                 |   2 +-
target/avr/helper.c              |   1 -
hw/avr/Makefile.objs             |   3 +-
tests/acceptance/machine_avr6.py |  10 +-
11 files changed, 623 insertions(+), 291 deletions(-)
create mode 100644 hw/avr/atmega.h
create mode 100644 hw/avr/arduino.c
create mode 100644 hw/avr/atmega.c
delete mode 100644 hw/avr/sample.c
[RFC PATCH 00/10] hw/avr: Introduce the Arduino board
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
Hi Michael,

I complained I'd rather have QEMU model real hardware, with
documentation (schematics).
Since your series is almost ready to get merged, I prefered to
spend some time now to write down what I wanted. This is mostly
a rewrite of your board, but matching the Arduino boards.

Some bug slipped in (uart interrupt not raised) but I'm too tired
to find it, and since I won't have time to look at it the next
days, I prefer to send this now.

The first part of the series are quick review notes, which you
should squash in your previous patches.

I still have in my TODO before merge:
- Fix the USART IRQ bug
- Split "Add limited support for USART and 16 bit timer peripherals"
  in 3 patches: USART/Timer16/INTC

And TODO after merge is:
- Extract Timer8 common parts from Timer16
- Add GPIOs
- Connect LED to GPIO on Arduino

Thank you for having insisted with this during so long!

Regards,

Phil.

Based-on: <20191127175257.23480-1-mrolnik@gmail.com>
https://www.mail-archive.com/qemu-devel@nongnu.org/msg661553.html

Philippe Mathieu-Daudé (10):
  hw/avr: Kludge to fix build failure
  target/avr: Remove unused include
  target/avr: Add missing definitions
  target/avr: Fix IRQ count
  hw/char/avr: Reduce USART I/O size
  hw/avr: Add ATmega microcontrollers
  hw/avr: Add few Arduino boards
  tests/acceptance: Keep multilines comment consistent with other tests
  tests/acceptance: Use the ATmega2560 board
  hw/avr: Remove the 'sample' board

 hw/avr/atmega.h                  |  58 +++++
 include/hw/char/avr_usart.h      |   2 +
 target/avr/cpu.h                 |   2 +
 hw/avr/arduino.c                 | 173 ++++++++++++++
 hw/avr/atmega.c                  | 379 +++++++++++++++++++++++++++++++
 hw/avr/sample.c                  | 282 -----------------------
 hw/char/avr_usart.c              |   2 +-
 target/avr/cpu.c                 |   2 +-
 target/avr/helper.c              |   1 -
 hw/avr/Makefile.objs             |   3 +-
 tests/acceptance/machine_avr6.py |  10 +-
 11 files changed, 623 insertions(+), 291 deletions(-)
 create mode 100644 hw/avr/atmega.h
 create mode 100644 hw/avr/arduino.c
 create mode 100644 hw/avr/atmega.c
 delete mode 100644 hw/avr/sample.c

-- 
2.21.0


Re: [RFC PATCH 00/10] hw/avr: Introduce the Arduino board
Posted by Michael Rolnik 4 years, 4 months ago
Hi Philippe.

This is really good news.

Should I do anything or this will be merged after my stuff goes through?

On Thu, Nov 28, 2019 at 3:50 AM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:

> Hi Michael,
>
> I complained I'd rather have QEMU model real hardware, with
> documentation (schematics).
> Since your series is almost ready to get merged, I prefered to
> spend some time now to write down what I wanted. This is mostly
> a rewrite of your board, but matching the Arduino boards.
>
> Some bug slipped in (uart interrupt not raised) but I'm too tired
> to find it, and since I won't have time to look at it the next
> days, I prefer to send this now.
>
> The first part of the series are quick review notes, which you
> should squash in your previous patches.
>
> I still have in my TODO before merge:
> - Fix the USART IRQ bug
> - Split "Add limited support for USART and 16 bit timer peripherals"
>   in 3 patches: USART/Timer16/INTC
>
> And TODO after merge is:
> - Extract Timer8 common parts from Timer16
> - Add GPIOs
> - Connect LED to GPIO on Arduino
>
> Thank you for having insisted with this during so long!
>
> Regards,
>
> Phil.
>
> Based-on: <20191127175257.23480-1-mrolnik@gmail.com>
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg661553.html
>
> Philippe Mathieu-Daudé (10):
>   hw/avr: Kludge to fix build failure
>   target/avr: Remove unused include
>   target/avr: Add missing definitions
>   target/avr: Fix IRQ count
>   hw/char/avr: Reduce USART I/O size
>   hw/avr: Add ATmega microcontrollers
>   hw/avr: Add few Arduino boards
>   tests/acceptance: Keep multilines comment consistent with other tests
>   tests/acceptance: Use the ATmega2560 board
>   hw/avr: Remove the 'sample' board
>
>  hw/avr/atmega.h                  |  58 +++++
>  include/hw/char/avr_usart.h      |   2 +
>  target/avr/cpu.h                 |   2 +
>  hw/avr/arduino.c                 | 173 ++++++++++++++
>  hw/avr/atmega.c                  | 379 +++++++++++++++++++++++++++++++
>  hw/avr/sample.c                  | 282 -----------------------
>  hw/char/avr_usart.c              |   2 +-
>  target/avr/cpu.c                 |   2 +-
>  target/avr/helper.c              |   1 -
>  hw/avr/Makefile.objs             |   3 +-
>  tests/acceptance/machine_avr6.py |  10 +-
>  11 files changed, 623 insertions(+), 291 deletions(-)
>  create mode 100644 hw/avr/atmega.h
>  create mode 100644 hw/avr/arduino.c
>  create mode 100644 hw/avr/atmega.c
>  delete mode 100644 hw/avr/sample.c
>
> --
> 2.21.0
>
>

-- 
Best Regards,
Michael Rolnik