This includes:
- LSR, ROR
- ASR
- SWAP
- SBI, CBI
- BST, BLD
- BSET, BCLR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 1123
1 file changed, 1123 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
This includes:
- RJMP, IJMP, EIJMP, JMP
- RCALL, ICALL, EICALL, CALL
- RET, RETI
- CPSE, CP, CPC, CPI
- SBRC, SBRS, SBIC, SBIS
- BRBC, BRBS
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 542 +
1 file changed, 542
This includes:
- BREAK
- NOP
- SLEEP
- WDR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 174 +
1 file changed, 174 insertions(+)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index 19540634df..21ba6004ee
Co-developed-by: Richard Henderson
Co-developed-by: Michael Rolnik
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 234 +
1 file changed, 234 insertions(+)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index 21ba6004ee
serial port
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Acked-by: Thomas Huth
---
tests/Makefile.include | 2 ++
tests/acceptance/machine_avr6.py | 36
tests/boot-serial-test.c | 10
This includes:
- ADD, ADC, ADIW
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 811 +
1 file changed, 811 insertions(+)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index 53c9892a60..3eaa3e5099 100644
--- a/target/avr
Hi Aleksandar.
please explain.
On Sat, Dec 21, 2019 at 1:18 PM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
>
>
> On Wednesday, December 18, 2019, Michael Rolnik wrote:
>
>> This includes:
>> - encoding of all 16 bit instructions
>> -
Hi Igor.
I don't find where machine->ram is defined.
Regards,
Michael Rolnik
On Fri, Dec 20, 2019 at 11:51 AM Igor Mammedov wrote:
> On Wed, 18 Dec 2019 23:03:22 +0200
> Michael Rolnik wrote:
>
> > A simple board setup that configures an AVR CPU to run a give
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
This includes:
- BREAK
- NOP
- SLEEP
- WDR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 68 ++
1 file changed, 68 insertions(+)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index e303a1f4cc..46cbcc9305 100644
This includes:
- LSR, ROR
- ASR
- SWAP
- SBI, CBI
- BST, BLD
- BSET, BCLR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 235 +
1 file changed, 235 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
This includes:
- RJMP, IJMP, EIJMP, JMP
- RCALL, ICALL, EICALL, CALL
- RET, RETI
- CPSE, CP, CPC, CPI
- SBRC, SBRS, SBIC, SBIS
- BRBC, BRBS
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 530
Co-developed-by: Richard Henderson
Co-developed-by: Michael Rolnik
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 234 +
1 file changed, 234 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
This includes:
- MOV, MOVW
- LDI, LDS LDX LDY LDZ
- LDDY, LDDZ
- STS, STX STY STZ
- STDY, STDZ
- LPM, LPMX
- ELPM, ELPMX
- SPM, SPMX
- IN, OUT
- PUSH, POP
- XCH
- LAS, LAC LAT
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 986
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
The test is based on
https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo
demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out.
it also demostrates that timer and IRQ are working
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested
Signed-off-by: Michael Rolnik
---
qemu-doc.texi | 51 +++
1 file changed, 51 insertions(+)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index eea91a2d1e..c169ab9357 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1742,6 +1742,7 @@ differences
Print out 'T' through serial port
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Acked-by: Thomas Huth
---
tests/boot-serial-test.c | 10 ++
tests/Makefile.include | 2 ++
2 files changed, 12 insertions(+)
diff --git a/tests
Make AVR support buildable
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
configure | 7 +++
default-configs/avr-softmmu.mak | 5 +
target/avr/Makefile.objs| 34 +
3
,
AddressSpace *as, bool load_rom, symbol_fn_t sym_cb);
/** load_elf_ram:
diff --git a/hw/avr/sample.c b/hw/avr/sample.c
new file mode 100644
index 00..4fdbc17f1c
--- /dev/null
+++ b/hw/avr/sample.c
@@ -0,0 +1,293 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2019 Michael Rolnik
access instructions are implemented here because some address ranges
actually refer to CPU registers.
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/helper.h | 29
target/avr/helper.c | 347
2 files changed, 376
Include AVR maintaners in MAINTAINERS file
Signed-off-by: Michael Rolnik
---
MAINTAINERS | 21 +
1 file changed, 21 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 740401bcbb..9ed886106a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -163,6 +163,27 @@ S
This includes:
- CPU data structures
- object model classes and functions
- migration functions
- GDB hooks
Co-developed-by: Michael Rolnik
Co-developed-by: Sarah Harris
Signed-off-by: Michael Rolnik
Signed-off-by: Sarah Harris
Signed-off-by: Michael Rolnik
Acked-by: Igor Mammedov
Tested
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
tests/machine-none-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c
index 5953d31755..3e5c74e73e 100644
--- a/tests/machine-none
Signed-off-by: Michael Rolnik
---
include/hw/misc/avr_mask.h | 47
hw/misc/avr_mask.c | 112 +
hw/misc/Kconfig| 3 +
hw/misc/Makefile.objs | 2 +
4 files changed, 164 insertions(+)
create mode 100644 include/hw
Add AVR related definitions into QEMU
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
include/disas/dis-asm.h
---
qapi/machine.json | 3 ++-
include/disas/dis-asm.h| 19 +++
include/sysemu/arch_init.h | 1
, r24
0x04c2: RET
...
```
Signed-off-by: Michael Rolnik
Suggested-by: Richard Henderson
Suggested-by: Philippe Mathieu-Daudé
Suggested-by: Aleksandar Markovic
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/cpu.h | 1 +
target/avr/cpu.c
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 143 +
1 file changed, 143 insertions(+)
create mode 100644 target/avr/translate.c
diff --git a/target/avr/translate.c b
This includes:
- ADD, ADC, ADIW
- SBIW, SUB, SUBI, SBC, SBCI
- AND, ANDI
- OR, ORI, EOR
- COM, NEG
- INC, DEC
- MUL, MULS, MULSU
- FMUL, FMULS, FMULSU
- DES
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 714
lines from target/avr/translate.c file
9. set number of interrupt lines to 64
10. determine cpu type by reading ELF flags
11. update license of all new files to be LGPL
12. udpate QEMU documentation
changes since v38
1. rebase
2. add examples of AVR emulator invokation into the QEMU doc
3. reorder in
This includes:
- encoding of all 16 bit instructions
- encoding of all 32 bit instructions
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/insn.decode | 183 +
1 file changed, 183 insertions(+)
create mode 100644 target
access instructions are implemented here because some address ranges
actually refer to CPU registers.
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/helper.h | 29
target/avr/helper.c | 347
2 files changed, 376
remove empty lines from target/avr/translate.c file
9. set number of interrupt lines to 64
10. determine cpu type by reading ELF flags
11. update license of all new files to be LGPL
12. udpate QEMU documentation
Michael Rolnik (22):
target/avr: Add outward facing interfaces and core CPU logic
targe
This includes:
- ADD, ADC, ADIW
- SBIW, SUB, SUBI, SBC, SBCI
- AND, ANDI
- OR, ORI, EOR
- COM, NEG
- INC, DEC
- MUL, MULS, MULSU
- FMUL, FMULS, FMULSU
- DES
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 734
This includes:
- encoding of all 16 bit instructions
- encoding of all 32 bit instructions
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/insn.decode | 194 +
1 file changed, 194 insertions(+)
create mode 100644 target
, r24
0x04c2: RET
...
```
Signed-off-by: Michael Rolnik
Suggested-by: Richard Henderson
Suggested-by: Philippe Mathieu-Daudé
Suggested-by: Aleksandar Markovic
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/cpu.h | 1 +
target/avr/cpu.c
This includes:
- CPU data structures
- object model classes and functions
- migration functions
- GDB hooks
Co-developed-by: Michael Rolnik
Co-developed-by: Sarah Harris
Signed-off-by: Michael Rolnik
Signed-off-by: Sarah Harris
Signed-off-by: Michael Rolnik
Acked-by: Igor Mammedov
Tested
This includes:
- RJMP, IJMP, EIJMP, JMP
- RCALL, ICALL, EICALL, CALL
- RET, RETI
- CPSE, CP, CPC, CPI
- SBRC, SBRS, SBIC, SBIS
- BRBC, BRBS
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 537
Co-developed-by: Richard Henderson
Co-developed-by: Michael Rolnik
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 234 +
1 file changed, 234 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
This includes:
- BREAK
- NOP
- SLEEP
- WDR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 174 +
1 file changed, 174 insertions(+)
diff --git a/target/avr/translate.c b/target/avr/translate.c
index d8d8f11933..68025112ff
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 143 +
1 file changed, 143 insertions(+)
create mode 100644 target/avr/translate.c
diff --git a/target/avr/translate.c b
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
Signed-off-by: Michael Rolnik
---
include/hw/misc/avr_mask.h | 47
hw/misc/avr_mask.c | 112 +
hw/misc/Kconfig| 3 +
hw/misc/Makefile.objs | 2 +
4 files changed, 164 insertions(+)
create mode 100644 include/hw
I hope I did not miss anything.
On Sun, Dec 8, 2019 at 8:39 PM Michael Rolnik wrote:
> This series of patches adds 8bit AVR cores to QEMU.
> All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully
> tested yet.
> However I was able to execute simple code with fu
This includes:
- LSR, ROR
- ASR
- SWAP
- SBI, CBI
- BST, BLD
- BSET, BCLR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 243 +
1 file changed, 243 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
tests/machine-none-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c
index 5953d31755..3e5c74e73e 100644
--- a/tests/machine-none
/avr/sample.c b/hw/avr/sample.c
new file mode 100644
index 00..6574733b57
--- /dev/null
+++ b/hw/avr/sample.c
@@ -0,0 +1,293 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2019 Michael Rolnik
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms
Add AVR related definitions into QEMU
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
qapi/machine.json | 3 ++-
include/disas/dis-asm.h| 6 ++
include/sysemu/arch_init.h | 1 +
arch_init.c| 2 ++
4 files
This includes:
- MOV, MOVW
- LDI, LDS LDX LDY LDZ
- LDDY, LDDZ
- STS, STX STY STZ
- STDY, STDZ
- LPM, LPMX
- ELPM, ELPMX
- SPM, SPMX
- IN, OUT
- PUSH, POP
- XCH
- LAS, LAC LAT
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 861
Print out 'T' through serial port
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Acked-by: Thomas Huth
---
tests/boot-serial-test.c | 10 ++
tests/Makefile.include | 2 ++
2 files changed, 12 insertions(+)
diff --git a/tests
Include AVR maintaners in MAINTAINERS file
Signed-off-by: Michael Rolnik
---
MAINTAINERS | 21 +
1 file changed, 21 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5e5e3e52d6..9ab7ed0865 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -163,6 +163,27 @@ S
The test is based on
https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo
demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out.
it also demostrates that timer and IRQ are working
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested
Signed-off-by: Michael Rolnik
---
qemu-doc.texi | 10 ++
1 file changed, 10 insertions(+)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 3ddf5c0a68..cea1008800 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1757,6 +1757,7 @@ differences are mentioned in the following sections
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
Make AVR support buildable
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
configure | 7 +++
default-configs/avr-softmmu.mak | 5 +
target/avr/Makefile.objs| 34 +
3
You are right. See at the bottom of the file. There is a comment about it
Sent from my cell phone, please ignore typos
On Tue, Dec 10, 2019, 6:21 AM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
>
>
> On Monday, December 9, 2019, Michael Rolnik wrote:
>
>>
, 2020 at 5:31 PM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
> On Fri, Feb 21, 2020 at 12:04 PM Michael Rolnik wrote:
> >
> > Hi all.
> >
> > How is it going?
> >
> > Regards,
> > Michael.
> >
>
> Michael,
>
>
Hi all.
are there any action items for me?
Regards,
Michael Rolnik
On Thu, Feb 27, 2020 at 10:38 AM Michael Rolnik wrote:
> Hi all.
>
> I don't see how the fact that some MCUs have an instruction and some don't
> within same AVR family.
> Think about gnu binutils (not GCC) t
Just one patch attached.
Thanks.
On Fri, Jan 24, 2020 at 2:49 PM Philippe Mathieu-Daudé
wrote:
> On 1/24/20 12:41 PM, Michael Rolnik wrote:
> > Tested-by: Michael Rolnik mailto:mrol...@gmail.com>>
>
> Thanks a lot!
>
> > The only thing I want to change i
Hi Thomas.
I will fix it. thanks.
Michael Rolnik
On Fri, Jan 24, 2020 at 9:14 AM Thomas Huth wrote:
> On 24/01/2020 01.51, Philippe Mathieu-Daudé wrote:
> > From: Michael Rolnik
> >
> > Signed-off-by: Michael Rolnik
> > Message-Id: <20200118191416.19934-16-mro
Tested-by: Michael Rolnik
The only thing I want to change is instead of -kernel put -bios in
qemu-doc.texi file. Should I send a new series?
On Fri, Jan 24, 2020 at 2:51 AM Philippe Mathieu-Daudé
wrote:
> This is the AVR port from Michael release (merge) candidate 2.
>
> Si
Hi all.
As for now I have no plans to add support for AVR 32 bit CPU. If there are
requests I might consider it.
When I started to implement AVR 8 bit CPU I added that `#ifndef
CONFIG_USER_ONLY` as other CPUs did, so I guess they could be removed.
Regards,
Michael Rolnik
On Mon, Jan 27, 2020
Thanks for you help guys.
On Mon, Jan 27, 2020 at 12:55 AM Aleksandar Markovic <
aleksandar.marko...@rt-rk.com> wrote:
> From: Michael Rolnik
>
> This includes definitions of various basic parameters needed
> for integration of a new platform into QEMU.
>
> Co-developed-
Hi Joaquin.
`AVR_FEATURE_1_BYTE_PC` is used in `gen_push_ret` function
(target/avr/translate.c)
Regards,
Michael Rolnik
On Sun, Jan 26, 2020 at 2:15 PM Joaquin de Andres
wrote:
> Hi! In this mail I only checked the general code and one of the listed
> features for the different types
merge it now.
>
> Thomas
>
>
--
Best Regards,
Michael Rolnik
Sounds good.
Sent from my cell phone, please ignore typos
On Wed, Jan 29, 2020, 5:12 PM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
> On Wed, Jan 29, 2020 at 1:20 PM Sarah Harris wrote:
> >
> > Hi,
> >
> > I think I've found a minor bug: the stack pointer should be initialised
>
flags" was redone to reflect the original intent that was lost in
> >>transalation between multiple autors
> >> - Patch "hw/avr: Add helper to load raw/ELF firmware binaries" was
> >>corrected only in one line to rectify type of "e_flags"
Tested-by: Michael Rolnik
On Fri, Feb 7, 2020 at 3:58 AM Aleksandar Markovic <
aleksandar.marko...@rt-rk.com> wrote:
> From: Michael Rolnik
>
> This includes definitions of various basic parameters needed
> for integration of a new platform into QEMU.
>
> [AM: Split a
Sounds good to me.
On Tue, Jan 28, 2020 at 3:49 PM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
>
>
> On Tuesday, January 28, 2020, Michael Rolnik wrote:
>
>> Hi all.
>>
>> I am totally lost in the email.
>> Are there any action i
Hi all.
I am totally lost in the email.
Are there any action items for me / someone else ?
Regards,
Michael Rolnik
On Mon, Jan 27, 2020 at 10:54 AM Michael Rolnik wrote:
> Thanks for you help guys.
>
> On Mon, Jan 27, 2020 at 12:55 AM Aleksandar Markovic <
> aleksandar.mar
/config/avr/avr-devices.c
Have a look here
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/avr/avr-mcus.def.
you can see that not all xmega support RMW instructions. so whenever QEMU
has atxmega128d4 implemented, atxmega128d4 model it will have to remove RMW
feature.
Regards,
Michael Rolnik
Hi all.
How is it going?
Regards,
Michael.
On Mon, Feb 10, 2020 at 9:39 AM Michael Rolnik wrote:
> Hi all.
>
> When I decided to implement AVR 8 bit CPU support for QEMU I found this
> document
> <http://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruct
c/config/avr/avr-devices.c
<https://github.com/gcc-mirror/gcc/blob/master/gcc/config/avr/avr-devices.c>
file and when a specific MCU is created it will set / reset CPU features
relevant to it.
I hope this helps.
Best Regards,
Michael Rolnik
On Sat, Feb 8, 2020 at 9:35 AM A
This includes:
- ADD, ADC, ADIW
- SBIW, SUB, SUBI, SBC, SBCI
- AND, ANDI
- OR, ORI, EOR
- COM, NEG
- INC, DEC
- MUL, MULS, MULSU
- FMUL, FMULS, FMULSU
- DES
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 751
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 172 +
1 file changed, 172 insertions(+)
create mode 100644 target/avr/translate.c
diff --git a/target/avr/translate.c b
This includes:
- BREAK
- NOP
- SLEEP
- WDR
Signed-off-by: Michael Rolnik
---
target/avr/translate.c | 68 ++
target/avr/insn.decode | 9 ++
2 files changed, 77 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
tests/qtest/machine-none-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c
index 5953d31755..3e5c74e73e 100644
This includes:
- RJMP, IJMP, EIJMP, JMP
- RCALL, ICALL, EICALL, CALL
- RET, RETI
- CPSE, CP, CPC, CPI
- SBRC, SBRS, SBIC, SBIS
- BRBC, BRBS
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 533
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
Co-developed-by: Richard Henderson
Co-developed-by: Michael Rolnik
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 234 +
1 file changed, 234 insertions(+)
diff --git a/target/avr/translate.c b/target/avr
These were designed to facilitate testing but should provide enough function to
be useful in other contexts.
Only a subset of the functions of each peripheral is implemented, mainly due to
the lack of a standard way to handle electrical connections (like GPIO pins).
Signed-off-by: Sarah Harris
The test is based on
https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo
demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out.
it also demostrates that timer and IRQ are working
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested
Signed-off-by: Michael Rolnik
---
qemu-doc.texi | 51 +++
1 file changed, 51 insertions(+)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 39f950471f..515aacfae9 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1741,6 +1741,7 @@ differences
der instructions to match AVR documentation
4. fix elf loader function bug introduced by prev version
changes since v39
1. rename target/avr to hw/avr for hw related commits
2. spread instruction decoding commit
3. add frequency parameter to AVR timer
changes since v40
1. rebase
2. remove not n
,
AddressSpace *as, bool load_rom, symbol_fn_t sym_cb);
/** load_elf_ram:
diff --git a/hw/avr/sample.c b/hw/avr/sample.c
new file mode 100644
index 00..95094a8d6c
--- /dev/null
+++ b/hw/avr/sample.c
@@ -0,0 +1,295 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2019 Michael Rolnik
Make AVR support buildable
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
---
configure | 7 +++
default-configs/avr-softmmu.mak | 5 +
target/avr/Makefile.objs| 34 +
3
Print out 'T' through serial port
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Acked-by: Thomas Huth
tests/Makefile.include
---
tests/qtest/boot-serial-test.c | 10 ++
tests/qtest/Makefile.include | 2 ++
2 files changed, 12
Add AVR related definitions into QEMU
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
Reviewed-by: Aleksandar Markovic
include/disas/dis-asm.h
---
qapi/machine.json | 3 ++-
include/disas/dis-asm.h| 19 +++
include/sysemu/arch_init.h | 1
This includes:
- CPU data structures
- object model classes and functions
- migration functions
- GDB hooks
Co-developed-by: Michael Rolnik
Co-developed-by: Sarah Harris
Signed-off-by: Michael Rolnik
Signed-off-by: Sarah Harris
Signed-off-by: Michael Rolnik
Acked-by: Igor Mammedov
Tested
Include AVR maintaners in MAINTAINERS file
Signed-off-by: Michael Rolnik
---
MAINTAINERS | 21 +
1 file changed, 21 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 55d3642e6c..c70d77b1ae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -163,6 +163,15 @@ S
, r24
0x04c2: RET
...
```
Signed-off-by: Michael Rolnik
Suggested-by: Richard Henderson
Suggested-by: Philippe Mathieu-Daudé
Suggested-by: Aleksandar Markovic
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
---
target/avr/cpu.h | 1 +
target/avr/cpu.c
This is a simple device of just one register, whenver this register is
written it calls qemu_set_irq function for each of 8 bits/IRQs..
It is used to implement AVR Power Reduction
Signed-off-by: Michael Rolnik
---
include/hw/misc/avr_mask.h | 47
hw/misc/avr_mask.c
This includes:
- LSR, ROR
- ASR
- SWAP
- SBI, CBI
- BST, BLD
- BSET, BCLR
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/translate.c | 241 +
target/avr/insn.decode | 14 +++
2 files changed, 255
This includes:
- MOV, MOVW
- LDI, LDS LDX LDY LDZ
- LDDY, LDDZ
- STS, STX STY STZ
- STDY, STDZ
- LPM, LPMX
- ELPM, ELPMX
- SPM, SPMX
- IN, OUT
- PUSH, POP
- XCH
- LAS, LAC LAT
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
access instructions are implemented here because some address ranges
actually refer to CPU registers.
Signed-off-by: Michael Rolnik
Tested-by: Philippe Mathieu-Daudé
---
target/avr/helper.h | 29
target/avr/helper.c | 347
2 files changed, 376
Sure, no problem.
On Mon, Jan 20, 2020 at 12:50 AM Philippe Mathieu-Daudé
wrote:
> Hi Michael,
>
> On 12/30/19 7:17 PM, Michael Rolnik wrote:
> > Hi Philippe.
> >
> > Thank you for joining the effort.
>
> Could you test this series?
>
> Are you OK if we
/{avr_usart.h => atmel_usart.h} (93%)
> rename include/hw/misc/{avr_mask.h => atmel_power.h} (89%)
> rename include/hw/timer/{avr_timer16.h => atmel_timer16.h} (92%)
> create mode 100644 hw/avr/arduino.c
> create mode 100644 hw/avr/atmel_atmega.c
> delete mode 100644 hw/avr/sample.c
> rename hw/char/{avr_usart.c => atmel_usart.c} (99%)
> rename hw/misc/{avr_mask.c => atmel_power.c} (97%)
> rename hw/timer/{avr_timer16.c => atmel_timer16.c} (98%)
>
> --
> 2.21.1
>
>
--
Best Regards,
Michael Rolnik
Hi all,
any news?
Regards,
Michael Rolnik
On Sun, Dec 29, 2019 at 1:52 PM Michael Rolnik wrote:
> This series of patches adds 8bit AVR cores to QEMU.
> All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully
> tested yet.
> However I was able to execute
Print out 'T' through serial port
Signed-off-by: Michael Rolnik
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Acked-by: Thomas Huth
---
tests/boot-serial-test.c | 10 ++
tests/Makefile.include | 2 ++
2 files changed, 12 insertions(+)
diff --git a/tests
,
AddressSpace *as, bool load_rom, symbol_fn_t sym_cb);
/** load_elf_ram:
diff --git a/hw/avr/sample.c b/hw/avr/sample.c
new file mode 100644
index 00..95094a8d6c
--- /dev/null
+++ b/hw/avr/sample.c
@@ -0,0 +1,295 @@
+/*
+ * QEMU AVR CPU
+ *
+ * Copyright (c) 2019 Michael Rolnik
601 - 700 of 783 matches
Mail list logo