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

ATMega328PB support fails to compile #461

Open
maxgerhardt opened this issue Jul 21, 2021 · 0 comments
Open

ATMega328PB support fails to compile #461

maxgerhardt opened this issue Jul 21, 2021 · 0 comments

Comments

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Jul 21, 2021

When building simavr, at the start it informs about not being able to give ATMega328PB support.

cc -E -Werror -O2 -Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Wno-missing-field-initializers -Wno-sign-compare -g -I/include -DNO_COLOR --std=gnu99 -Wall -I/include -Isim -I. -I../../shared -I../simavr/cores cores/sim_mega328pb.c
WARNING cores/sim_mega328pb.c did not compile, check your avr-gcc toolchain

Inspecting the invocation and compiler output closer, it's missing the I/O header file.

# 35 "cores/sim_megacores/sim_mega328pb.c:45:10: fatal error: avr/iom328pb.h: No such file or directory
   45 | #include "avr/iom328pb.h"
      |          ^~~~~~~~~~~~~~~~

which seems to be supplied by Atmel in their device header pack. Even in recent AVR-GCC versions, this file is missing (https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/), but can be added.

When I follow above instructions to download the device pack and copy the appropriate files into my AVR-GCC toolchain as well as in the SimAVR directory

cp /c/Users/Max/Downloads/Atmel.ATmega_DFP.1.6.364/gcc/dev/atmega328pb/avr5/* /mingw64/avr/lib/avr5
cp /c/Users/Max/Downloads/Atmel.ATmega_DFP.1.6.364/include/avr/iom328pb.h /mingw64/avr/include/avr/
cp /mingw64/avr/include/avr/iom328pb.h cores/avr/.

After make clean and make build-simavr, that now gives simavr ATMega328PB support.

$ ./simavr/run_avr --list-cores
Supported AVR cores:
[...]
       atmega324a atmega324pa
       atmega328 atmega328p
       atmega328pb
[...]

The issue would be fixed by PR #353.

kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries
kholia added a commit to kholia/simavr that referenced this issue Jan 14, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries

- Fix for reading the 'Serial Number' from ATmega328P
kholia added a commit to kholia/simavr that referenced this issue Jan 16, 2022
- Fix for buserror#461

  Borrowed from https://stuvel.eu/post/2021-04-27-atmega328pb-on-gcc/

- Add easy to understand usage instructions

- Add `ArduinoUniqueID` example and binaries

- Fix for reading the 'Serial Number' from ATmega328P
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