Go Down

Topic: 1284P - Compiling error (Read 3332 times) previous topic - next topic

hansibull

What kind of core are you using the the 1284P? If you're ready to jump up to the IDE v1.6 you may want to try MightyCore. I haven't tested it with the NRF24L01 libraries, but the other you mentioned works fine. You also got som additional options, like clock frequency, Brown out detection and a variant option (if you have a 1284 instead of the 'P' version). My perception is that it require very little work making libraries compatible with the 1284P (and the rest of the family).
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

Watcher


Thanks hansibull, but I am still using 1.0.6 for now ..


pert

WestFw published a new version of Optiboot that fully supports 1284p (tested by yours truly), which also provides pins_arduino.h with the pinout used by Bobuino.
I don't see any pins_arduino.h in the optiboot repository. boards.txt and boards-1.6.txt have
Code: [Select]
optiboot1284.build.variant=arduino:standard
which doesn't make sense to me because that's the variant used for Uno, etc.
Thanks hansibull, but I am still using 1.0.6 for now ..
Try https://github.com/JChristensen/mighty-1284p

Watcher

Quote
Try https://github.com/JChristensen/mighty-1284p
Wow... Thanks pert!   That eventually worked. Everything now compiles!  

Thanks very much!

Which board option do you use for 16MHz. The "maniacbug" 1284p using optiboot 16 MHz ?

I also need to decide on the pinout (pin mapping) before I get the PCB done... I ll be using the SMD version of the chip.

pert

Which board option do you use for 16MHz. The "maniacbug" 1284p using optiboot 16 MHz ?

I also need to decide on the pinout (pin mapping) before I get the PCB done... I ll be using the SMD version of the chip.
You can use avr-developers.com pinouts 16MHz using Optiboot, Bobuino and Skinny Bob, Mighty Mini 1284p @ 16MHz, Optiboot @ 1Mbps or "maniacbug" Mighty 1284p 16MHz using Optiboot. They are all 16MHz except for Mighty Mini 1284p @ 8MHz. I'm not sure what the best pinout is, there are so many of them. I recently put together a list(let me know if anyone wants it) of 12 different Arduino pinouts used with ATmega1284P. It's a shame that Arduino never made an official ATmega1284P based board just so that we would have a standardized pinout.

Watcher

Quote
I'm not sure what the best pinout is, there are so many of them.
So true...

Does pinout make much difference when it comes to software library support?

oric_dan

Look at the chip diagrams in the pins_arduino.h files for each variant. The Bobuino pinout is closest to anything in the Arduino world, and essentially congruent with the Arduino-UNO pinout for the first 20 pins. Eg, D3..D0 = Tx1,Rx1,Tx0,Rx0, and D13..D10 = SPI Sclk,MISO,MOSI,SS, &etc.

The other variants are in no way similar to anything in the Arduino world.

pert

Does pinout make much difference when it comes to software library support?
It can. Lets take the Ethernet library included with the JChristensen/mighty-1284p core as an example. The patch to add ATmega1284P compatibility is in utility/w5100.h line 330:
Code: [Select]
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
  || defined(__AVR_ATmega644__)  || defined(__AVR_ATmega644A__) \
  || defined(__AVR_ATmega644P__)  || defined(__AVR_ATmega644PA__)
  inline static void initSS()    { DDRB  |=  _BV(4); }
  inline static void setSS()     { PORTB &= ~_BV(4); }
  inline static void resetSS()   { PORTB |=  _BV(4); }

So this means PB4 will be used for the W5100 SS. In the mighty-1284p:standard and mighty-1284p:avr_developers variants this is mapped to Arduino pin 4. In the mighty-1284p:bobuino variant this is mapped to Arduino pin 10. The Ethernet shield connects the W5100 SS to Arduino pin 10.

pert

An issue I've run into with the mighty-1284p pins_arduino.h files is that only the avr_developers variant has license information and that repository doesn't have a license. So can I use the other variant files in my own project? I can reference the variant in the mighty-1284p core but that is not as user friendly because they will need to have it installed and referencing a non-existent variant produces a cryptic java error message in the Arduino IDE.

westfw

Quote
I don't see any pins_arduino.h in the optiboot repository.
Correct; optiboot doesn't include any variants, and points it's 1284 boards.txt entry at "standard" because that will mostly compile (the core mostly has CODE for 1284, just not pin_defs.)


Go Up