custom board works on 1.5 rev2 how do I install it on 1.8

I have a working installation of IDE 1.5 rev2 which uses a custom board installed that compiles, uploads and functions correctly.

I want to use MQTT pubsubclient on this project. I ran an example on IDE 1.8.3 without errors but it fails on IDE 1.5 rev2.

I want to continue using the current version IDE so I've been hunting for information to install the old custom board. In online searches I see that Additional Boards Manager URLs is looking for a JSON file. I see no JSON file in the old IDE 1.5 rev2 installation.

I see folders: bootloaders, cores, firmwares and variants
and files: boards.txt and programmers.txt

Could someone please offer me advice on how to install the old custom board on IDE 1.8.3

My thanks in advance

Just copy across the pins.h file and any other core files which sit in "custom board" folders. Check C:\users<username>\AppData\Local\Arduino15 and anywhere else that you've installed the software.

Copy lines from boards.txt that look like they might be related to "custom board".

The JSON file is only necessary for Boards Manager installation, which is merely a convenient way for users to install a library without getting all confused with folders and files. You can still do manual installations just like always.

I could give you specific instructions for how to install your custom board but I'd need more information. Please post a link to where you found the definitions for the custom board.

Thank you MorganS. I copied the custom board folder into the hardware folder, added the boards.txt lines to the one existing in \samd\1.5.15. and the compiler appears to have found it but compilation failed.

Thank you pert. The board in question is a product made by the company I work for. I have been tasked to extend the product's development but I only have the existing IDE 1.5 rev2 installation to work with. As such I don't have a link to definitions.

Can you suggest where I might find these definitions among the files?

You know, "compilation failed" usually produces lots of error messages that would be very helpful to resolve the problem.

Additionally, a "verbose" compilation on the working version will show you lots of details on where it's getting libraries and everything.

What board is this? Also, why do I feel like I answered this question

stevemess:
Thank you MorganS. I copied the custom board folder into the hardware folder, added the boards.txt lines to the one existing in \samd\1.5.15. and the compiler appears to have found it but compilation failed.

Thank you pert. The board in question is a product made by the company I work for. I have been tasked to extend the product's development but I only have the existing IDE 1.5 rev2 installation to work with. As such I don't have a link to definitions.

Can you suggest where I might find these definitions among the files?

That's not the correct way to install it.

Copy the custom board folder into the hardware folder in your arduino sketchbook folder (ie, so you'd have (your document folder)/Arduino/hardware/somecustomboard (with all the files and directories in there).

Do not make any changes to boards.txt for any other core, and go undo the changes you made.

What chip is the board based on?

Some of this is a repeat of what MorganS and DrAzzy replied while I was writing it but I already have it typed so posting anyway:

stevemess:
the compiler appears to have found it but compilation failed.

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

stevemess:
Thank you pert. The board in question is a product made by the company I work for. I have been tasked to extend the product's development

Then you should definitely consider adding Boards Manager installation support. But since you don't even understand the fundamentals of how Arduino hardware definitions work yet that's definitely a project for later.

stevemess:
Can you suggest where I might find these definitions among the files?

Ideally they would have been added as a dedicated hardware package in a subfolder of {sketchbook folder}/hardware. The sketchbook folder location can be found at File > Preferences > Sketchbook Location. Unfortunately, all too often companies that are more interested in cashing in on Arduino customers than spending the minimal amount of time to understand how the Arduino IDE actually works will instead paste their hardware definitions into a different vendor's package. This is a terrible idea because it's very much not user friendly and they will need to repeat the process every time they update that package to a new version. I'm not saying you shouldn't copy and modify another vendor's hardware package, that's perfectly fine.

You should be able to determine the location of the definitions by:

  • File > Preferences > Show verbose output during: > compilation (check) > OK
  • Tools > select your custom board
  • Sketch > Compile/verify
  • After the process fails examine the output in the black console window at the bottom of the Arduino IDE window. The paths to the definitions should be somewhere in the output.

Thank you DrAzzy.
The folder was in the right place. I undid the board.txt copy/paste and now the custom board does not appear in the boards list but the compilation completes with a couple of warnings.

The chip is atmega 328

Thank you pert,
I can't find the </> you mentioned on the toolbar (which toolbar are we talking about?)

Thank you MorganS,
verbose is on.

Tomorrow I'll try flashing the hex file and see what happens

stevemess:
The chip is atmega 328

Then you definitely shouldn't be doing anything with Arduino SAMD Boards. Is it actually ATmega328 or is it ATmega328P?

stevemess:
I can't find the </> you mentioned on the toolbar (which toolbar are we talking about?)

The forum toolbar:

The custom board does not appear in the IDE boards list but the sketch compiles with the pubsubclient example sketch in IDE 1.8.2 in win7 also 1.8.3 in Ubuntu 16.10 and for some reason it uses the custom board but I don't know why because the default Arduino board is tagged in the IDE boards list .

I attempted to compile the original product sketch using IDE 1.8.3 but a #include avr/wdt.h file refused to be found using windows7. Ubuntu 16.10 with IDE 1.8.3 got past the wdt.h problem and had a few different but resolvable issues with the original product sketch and compilation completed. Again the compiler found the custom board but it did not appear in the IDE boards list.

Please forgive the confusion over the SAMD boards.txt experiment. Although I was completely wrong to do that I did at least get to see the custom board name in the IDE boards list.

I confirm that the chip is atmega 328.

I am writing this using the Quick Reply window and the toolbar in your screenshot does not appear in mine. Perhaps it's a configuration issue?

Thanks again for your continued help

I'm sure we'd all love to help you out but you're just not providing enough information. I can only provide you with some official documentation that should give you all the information you need but maybe will be more slow than us providing instructions specific to your goal:

Thank you pert, I will read and digest.

I have taken a screenshot of my Quick Reply window to demonstrate the absence of the toolbar which might enable me to post error messages and provide more information but I don't see any way to attach the jpg image.

I may have overlooked some documentation about using the forum. I'll do more research.

Great! Once you've started through that if you have questions they'll probably be more focused and we'll be able to provide answers easily.

I also recommend looking at this hardware package as a model:

It supports ATmega328 and references the Arduino AVR Boards core, which is probably what you'll want to do. It does bundle its own standard variant, which may not be necessary for you. If your board uses the same pin mapping as one of the standard Arduino AVR Boards you can reference the variant from that hardware package so you don't need to maintain your own. More information on referencing components of other hardware packages here:

Note that MiniCore gets a bit fancy with the custom Tools menus defined in boards.txt, which probably won't be necessary for you since you're defining a specific hardware configuration rather than trying to support a wide variety of configurations as MiniCore does.

Once you get to the Boards Manager part of your project you can use MiniCore's system as a reference for that also. The JSON file is stored in the gh-pages branch of the repository:

I think the lack of toolbar is caused by some problem between the forum and your browser, etc.

You can always just manually add code tags by wrapping the text with:

[code][/code]

Here's a guide to attaching and embedding images:
(Out of Date) Guide: How to Insert Uploaded Images in a Post - Website and Forum - Arduino Forum but unfortunately the lack of a toolbar will also cause you problems there because usually we use the embed icon on the toolbar for the second step.

Again, you can just manually add the forum markup:

[code][img]http://forum.arduino.cc/index.php?action=dlattach;topic=485941.0;attach=216698[/img][/code]

Hi pert,

Thank you for the links. I am now able to select the custom board from the boards menu in IDE 1.8.3. This has exposed other compilation problems but I will address these elsewhere.

I realise now I gave incorrect information in earlier messages:
The original IDE was 1.0.5-rev2 not 1.5 rev2
Also.. I was wrong about the chip. It's an atimega 328p

"It's an atimega 328p"
So bootload the board as an Uno, and select Uno as the board type when downloading code. That's what I do will all my 16 MHz '328P boards.

Hi CrossRoads,

I am continuing someone else's project. The task is to get this particular custom board to work on IDE 1.8.3.

Thanks for your input I will keep that in mind for future projects.