Zvonimir

AtmelStudio 6 and ATmega103 support

Recommended Posts

Hi,

if anyone recently played with AVR Simulatior/debugging and ATMelStudio6 and figured

out what to do with support for Atmega103? Atmega103 is not supported any more,

and I am wondering if I should downgrade to version 5, or there is a XML device

file for ATMega103 somewhere?

thanks!

Zvonimir

Share this post


Link to post
Share on other sites

Ok - for those who search this kind of stuff later, even Atmel studio 5 is not supporting atmega103;

so I am downloading AVR studio 4, which obviously does support it (from Jack's tutorial).

There could be slight Windows 7 incompatibility,we will see.

Hi,

if anyone recently played with AVR Simulatior/debugging and ATMelStudio6 and figured

out what to do with support for Atmega103? Atmega103 is not supported any more,

and I am wondering if I should downgrade to version 5, or there is a XML device

file for ATMega103 somewhere?

thanks!

Zvonimir

Share this post


Link to post
Share on other sites

From what I remember the newest simulator does not support the atmega103, you have to choose the older simulator in Atmel Studio...

Jack.

Share this post


Link to post
Share on other sites

Jack,

correct, and then with the older simulator version 4, You have to get Windows XP machine,

at least Windows 7 or compatibility modes are a no-go. Although, if I choose Atmega128 as a device,

I seem to get correct disassembly at least for your tutorial example (unfortunately

by the spec, atmega128 and atmega103 have a lot of differences, so this is not a solution).

Z.

From what I remember the newest simulator does not support the atmega103, you have to choose the older simulator in Atmel Studio...

Jack.

Share this post


Link to post
Share on other sites

Hi,

here is the final observation. I have installed AVR Studio 4 in Windows XP SP2 virtual machine (by VMWare) and ran the same ELF file, as in ATMEL Studio 6 (but there with AVR Simulator using ATmega128 model,

as ATMega103 is not supported any more since version 5). If you really want AVR studio 4, and are

already running Windows 7 or later, I recommend building VM in VirtualBox or VMWare, as compatibility

mode seems not to work at all.

But regarding using ATMel Studio 6, it seems so far that there is a great deal of compatibility between ATMega103 and ATMega128 instructions

set, as the disassembler appears substantially similar from what I can see.

Here is the output from AVRStudio4:

+0000004D:  07B1        CPC      R27,R17        Compare with carry

+0000004E:  F7E1        BRNE      PC-0x03        Branch if not equal

+0000004F:  940E005A    CALL      0x0000005A    Call subroutine

+00000051:  940C00C0    JMP      0x000000C0    Jump

+00000053:  940C0000    JMP      0x00000000    Jump

@00000055: setup

---- C:\Documents and Settings\Administrator\Local Settings\Temp\build887447173438038686.tmp\AVR8_Custom_User_Core_5_DEBUGONLY_Shifty_TAR.cpp

23:      void setup()

+00000055:  E083        LDI      R24,0x03      Load immediate

+00000056:  93801010    STS      0x1010,R24    Store direct to data space

27:      }

+00000058:  9508        RET                      Subroutine return

@00000059: loop

29:      void loop()

+00000059:  9508        RET                      Subroutine return

@0000005A: main

---- C:\Program Files\Papilio-ArduinoIDE0018f\hardware\arduino\cores\arduino\main.cpp -------------

5:        int main(void)

+0000005A:  940E00A9    CALL      0x000000A9    Call subroutine

9:            setup();

+0000005C:  940E0055    CALL      0x00000055    Call subroutine

12:              loop();

+0000005E:  940E0059    CALL      0x00000059    Call subroutine

+00000060:  CFFD        RJMP      PC-0x0002      Relative jump

@00000061: __vector_16

---- C:\Program Files\Papilio-ArduinoIDE0018f\hardware\arduino\cores\arduino\wiring.c -------------

45:      {

+00000061:  921F        PUSH      R1            Push register on stack

+00000062:  920F        PUSH      R0            Push register on stack

+00000063:  B60F        IN        R0,0x3F        In from I/O locationHere is the same output for ATMel studio 6, using ATmega128 in simulator:

0000004D b1.07                CPC R27,R17        Compare with carry

0000004E e1.f7                BRNE PC-0x03        Branch if not equal

0000004F 0e.94.5a.00          CALL 0x0000005A        Call subroutine

00000051 0c.94.c0.00          JMP 0x000000C0        Jump

00000053 0c.94.00.00          JMP 0x00000000        Jump

--- C:\Users\ZSDSA0~1\AppData\Local\Temp\build190981914504925258.tmp/AVR8_Custom_User_Core_5_DEBUGONLY_Shifty_TAR.cpp

    23: void setup()

    24: {

    25:  customCoreControl = 0x3;

00000055 83.e0                LDI R24,0x03        Load immediate

00000056 80.93.10.10          STS 0x1010,R24        Store direct to data space

    27: }

00000058 08.95                RET        Subroutine return

    35: }

00000059 08.95                RET        Subroutine return

--- C:\Program Files\Papilio-ArduinoIDE0018f\hardware\arduino\cores\arduino/main.cpp

    5: int main(void)

    6: {

    7:    init();

0000005A 0e.94.a9.00          CALL 0x000000A9        Call subroutine

    9:    setup();

0000005C 0e.94.55.00          CALL 0x00000055        Call subroutine

    12:        loop();

0000005E 0e.94.59.00          CALL 0x00000059        Call subroutine

00000060 fd.cf                RJMP PC-0x0002        Relative jump

--- C:\Program Files\Papilio-ArduinoIDE0018f\hardware\arduino\cores\arduino/wiring.c

    45: {

00000061 1f.92                PUSH R1        Push register on stack

00000062 0f.92                PUSH R0        Push register on stack

00000063 0f.b6                IN R0,0x3F        In from I/O location

Again, this is not too surprising, although I am not sure if in some debugging case

it would be bad to rely on ATmel studio 6 and ATMega128...If YOu have

any suspicions, make sure to try AVR Studio 4 on a Win XP VM.

Best regards,

Zvonimir

Jack,

correct, and then with the older simulator version 4, You have to get Windows XP machine,

at least Windows 7 or compatibility modes are a no-go. Although, if I choose Atmega128 as a device,

I seem to get correct disassembly at least for your tutorial example (unfortunately

by the spec, atmega128 and atmega103 have a lot of differences, so this is not a solution).

Z.

From what I remember the newest simulator does not support the atmega103, you have to choose the older simulator in Atmel Studio...

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now