Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
OliverSparrow opened this issue Sep 15, 2023 · 0 comments
Open

Comments

@OliverSparrow
Copy link

Hello,

Context:

  • I'm quite new to using an AVR, and haven't written Assembly Code before.
  • I'm trying to program an ATmega324A, by following snippets from a handful of tutorials off the internet.
  • I'm programming on MacOS Big Sur (Intel Chip).

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant