Hi, Hoping someone can help me with this porting question....
I'm just trying to port an old project from Ardunio 1.06 to Arduino 1.8.19 which uses a custom board based on the 1284P MCU. The board files when placed in the Arduino hardware folder are not visible in the 1.8.19 IDE board selection, if I move them to my-boards I can select the board but I get the error below during compilation. I'm guessing I need to make a 'build.board' and place it somewhere but don't really know where to begin? Thanks for any pointers
Warning: Board my_boards:max1284p:max_opt_8 doesn't define a 'build.board' preference. Auto-set to: MAX1284P_MAX_OPT_8
Detecting libraries used...
recipe.preproc.macros pattern is missing
Error compiling for board ATMega1284P 8MHz using Optiboot 3.3V.
Amazingly.... I seem to have made a bit of progress!!!.... by adding the line below to the boards.txt file but.... the second compile error still remains as per the second code snip which looks more complex to fix?
max_opt_8.build.board=MAX1284P_MAX_OPT_8
Using board 'max_opt_8' from platform in folder: C:\Users\Me\Documents\Arduino\hardware\my_boards\max1284p
Using core 'standard' from platform in folder: C:\Users\Me\Documents\Arduino\hardware\my_boards\max1284p
Detecting libraries used...
recipe.preproc.macros pattern is missing
Error compiling for board ATMega1284P 8MHz using Optiboot 3.3V.
Hi @point5. I recommend just using the excellent MightyCore boards platform;
This provides full support for the ATmega1284P microcontroller in the modern boards platform framework that can be used with any of the Arduino IDE versions higher than 1.0.x.
Thanks ptillisch, looks like just the ticket I have it loaded and now looking up to see how the pin map compares - might have to learn something new to remap these or I might get lucky
It is quite unfortunate that the Arduino community created so many different pin mappings for this chip. I actually did a survey of them as a hobby project years ago and discovered 18 distinct mappings in the various published Arduino boards platforms for the ATmega1284P family.
MightyCore does allow you to select from the three most common mappings via the Tools > Pinout menu in Arduino IDE. Hopefully your project used one of those three.
Blimmey.... 18 variants The rules of probability have determined that I have some learning to do and remap the pinout..... I've had a look at pins_arduino.h file ---- looks complex
Update..... so, its possible that I have managed to update the pin map but I'm not able to upload any code so cannot test this - see error below. The same error occurs if I use the original unedited pins_arduino.h file so perhaps not anything I have done and the problem stems from elsewhere? Any pointers greatly appreciated.
An error occurred while uploading the sketch
avrdude: error at C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf:402: syntax error
avrdude: error reading system wide configuration file "C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf"
Hi, alas....no changes were made to the avrdude.conf file (I even replaced it from the zip folder to be sure). I can upload fine to a 328P MCU in 1.8.19 and I can upload fine to my 1284p MCU in 1.0.6 using the mighty-1284p board files (maniacbug), I've uninstalled the avr boards and reinstalled from board manager, I've uninstalled 1.8.15 which was the only version installed as a windows program, the other vesions are run from standalone folders. Searching C drive I now only have 2 copies of avrdude.conf, one in the MightyCore harware folder and the other in Arduino15 packages folder. I've installed the bootloader: atmega1284p\8000000L\optiboot_flash_atmega1284p_UART0_57600_8000000L_B0_BIGBOOT.hex from the MightyCore folder with fuses set to: Extended 0xFD : High 0xD6 : Low 0xFF. I have all the right settings selected in the boards section of the IDE but cannot find my way past this error. I'm sure its probably something straightforward but I have no idea what
Just as a check, I've now delected the MightyCore folder from 'hardware' and installed a fresh unzip just to make sure nothing is out of place..... but no change!
Global variables use 250 bytes (1%) of dynamic memory, leaving 16134 bytes for local variables. Maximum is 16384 bytes.
C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf -v -patmega1284p -carduino -PCOM6 -b57600 -D -Uflash:w:C:\Users\Me\AppData\Local\Temp\arduino_build_790028/ASCIITable.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf"
avrdude: error at C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf:402: syntax error
avrdude: error reading system wide configuration file "C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf"
avrdude: error reading system wide configuration file "C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr/avrdude.conf"
To keep anyone with the same problem in the loop I have some positive news: If I copy the avrdude.conf file from the location C:\Users\Me\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc to the MightyCore location C:\Users\Me\Documents\Arduino\hardware\MightyCore\avr (overwriting the MightyCore avrdude.cong file after making a backup) everything compiles and uploads as expected Some initial tests suggests this works but the issue I have now is that I have no idea if this is a sensible solution of if I have made a heap of problems which I'm yet to discover?.......