Ro5bert / avra

Assembler for the Atmel AVR microcontroller family
GNU General Public License v2.0
153 stars 39 forks source link

Beginner Question: Unable to specify Device Type as ATmega324A #65

Open OliverSparrow opened 10 months ago

OliverSparrow commented 10 months ago

Hello,

Context:

Issue:

I've been trying to assemble some (frankly, unchecked) AVR Assembly code for the ATmega324A, using AVRA. However, I'm unsure how to do this using the CLI.

I've used multiple variations of the code below, including:

  1. Using a locally stored m324adef.inc
  2. Writing the basic command shown in the documentation: avra test1.asm
  3. Specifying the Device type for the Assembler (Unsure how this works, but I've tried both "m324a" & "ATmega324A"): ```avra -D DEVICE=m324a test1.asm

Code:

    ; The .include directive was changed to read "m324Adef.inc", as well as removed entirely, to see if there was any difference.
    .include "m324adef.inc"
    .cseg
    .org    0x00

main:
    ldi     r17, 0x01
    out     DDRB, r17
    out     PORTB, r17

Result:

Each time, the Assembler returns that it either:

  1. Does not recognize the ATmega324A's .inc file: m324adef.inc(47) : Error : Unknown device: ATmega324A
  2. Does not recognize a Device type "ATmega324A" / "m324a": Error : Found no label/variable/constant named ATmega324A
  3. It does not know how to interpret some of the pin definitions:
    test1.asm(10) : Error   : Found no label/variable/constant named DDRB
    test1.asm(10) : Error   : I/O out of range (0 <= P <= 63)
    test1.asm(11) : Error   : Found no label/variable/constant named PORTB
    test1.asm(11) : Error   : I/O out of range (0 <= P <= 63)

I also noticed that, when running --devices, it did not list the ATmega324A processor as a supported processor. It did include the ATmega324P, and ATmega324PA processor. While skimming through the GitHub repository, however, it looked like there was support files for ATmega324A, in the "includes" folder.

Is there an obvious mistake, or step that I've forgotten? Please let me know if I should any more detail.

Thank you!