Closed streamliner18 closed 5 years ago
Does it work with Arduino IDE?
I wanted to try with platformio, and got the same issue here. To make the chip work with arduino, i needed to change avrdude.conf atmega238p signature from 0x1e 0x95 0x0f to 0x1e 0x95 0x16 (PB signature), then i can select the Arduino Pro Mini 8Mhz 3.3V. And the compilation works.
With platformio, i've seen that there is a new definition in avrdude for atmega328pb, however, when using board = pro8MHzatmega328
, i hit the issue:
avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
If i use board = pro8MHzatmega328
, i hit the same issue as OP.
Using
board = pro8MHzatmega328
board_build.mcu = atmega328pb
still lead to the same compilation issues
@tito Changing to a ArduinoPro doesn't solve the problem though. It leverages the fact that 328PB is backward compatible with 328 on the binary level, but will not work if your code is already 328PB-specific.
On your signature problem, DO NOT modify the sig in avrdude.conf, that's too destructive. Simply add upload_flags = -F
, and it will override the signature check.
Adding -F impact all my others projects, and requires me to be even more cautious when switching from one board to another (i code theses days 2 boards type at the same time, so 2 instances of arduino). Changing the signatures is for me safer at the moment.
That's because the Atmega328PB has 2 SPI ports, thats why you see
'SPSR' was not declared in this scope
take a look a this appnote to catch up on the differences. https://www.pololu.com/file/0J1464/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_ApplicationNote_AT15007.pdf
I'm sure this will work if you use ATmega328PB with MiniCore. https://github.com/MCUdude/MiniCore/blob/master/PlatformIO.md
Thanks, @MCUdude, great documentation! https://github.com/MCUdude/MiniCore/blob/master/PlatformIO.md
We will release this dev/platform tomorrow or on Monday.
I'm trying to load the RF24 Example Project into a ATmega328PB board. Turns out it spells havoc all over the place complaining about the absence of register definitions tied to SPI:
More errors are omitted. Here's my
platform.ini
:To reproduce the issue, just try to compile RF24Mesh's official example at http://dl.platformio.org/libraries/examples/2/209/RF24Mesh_Example.ino