Adjusting serial buffer size in IDE, mk2

#error "no signature definition for MCU available"

excellent! it sounds like i'm on the right track.

cheers,
rob :slight_smile:

have turned the idea into a standalone GitHub project:

cheers,
rob :slight_smile:

Thank you very much, robert rozee & Coding Badly, this saved my life. I was trying to get large RSS feeds from a ESP8266 via Serial to an Arduino Mega and my program was too busy with other things to handle the buffer properly. Now that I can increase it to 1024 that problem is solved. So thanks again!

In my case it only runs fine for the first time. When I then want to compile my sketch once more I get:
"GetFileAttributesEx options.h C:\Users\username\Documents\Arduino\libraries\Time\Time.h: The filename, directory name, or volume label syntax is incorrect. Error compiling."

The reference to Time.h is weird because when I close the IDE and then open it again, the sketch compiles flawlessly. Until the next time, that is. Then I have to close and open the IDE again. When I undo the buffer size changes this problem disappears.
Any thoughts, anyone?

Leonas:
Any thoughts, anyone?

When you changed the boards.txt / platform.txt files did you use \ or / ?

Thanks for responding. Well, although I saw your posts involving changing the boards / platform files I just followed the procedure in post #7 and it worked, so I stopped making other changes. But it only works the first compile/upload after loading the sketch into the IDE, the second time I get this error message. Then I close the sketch and reopen it again and I can do another compile. So, I'm not sure the changes to the boards.txt etc. would make a difference, but I can always give it a try.

A slash in English prose is an "or". Details are available here.

So, my question can be rewritten like this...

When you changed the boards.txt file or the platform.txt file did you use the backslash or the forward-slash character to separate the elements of any file system paths?

I want to know which separator character you used? Did you make the changes exactly as specified or did you use the Windows backslash separator? It looks like the only path is in this: "{build.path}/build_options.h".

I guess we are misunderstanding each other. I know what a slash is. :slight_smile:

Like I said, I just followed post #7. It says to change the line from
build.extra_flags=
to
build.extra_flags=-I "{build.path}" -include options.h
in platform.txt.

That's what I did, literally, like that. Just copy/paste. In other words, there is no slash there. Then I created two options.h files, one in the folder mentioned (empty, 0 bytes), and another one in the current sketch folder with the changed buffer sizes.

I didn't change boards.txt and I didn't use "{build.path}/build_options.h" or "{build.path}\build_options.h".

I was just thinking: do you perhaps mean I need to expand "{build.path}" to the actual path myself? Like "c:\program files...."? I always thought it was for the IDE/compiler/linker to expand.

The suspense is unbearable, Coding Badly :wink:

In the mean time my problem is solved, or more accurately: I have decreased the size of the RSS messages (smaller but more frequent) and now I can do without increasing the buffer at all. But perhaps it's still nice to know for future readers what the reason is of being able to run only once and the mystery of the slash is still unsolved too. :slight_smile:

Which version of the Arduino IDE are you using?

That's 1.6.7

Thanks for explaining this Coding Badly. This was exactly what I wanted to do: set the serial buffer on a per sketch basis instead of as a global option.

The only issue I ran into was that with the last line unox.build.extra_flags=-include "{build.path}/build_options.h" I would get an error 1 while verifying that the file build_option.h could not be created or found. I checked the temp file path in the output log and build_option.h was in there with the values I had entered.

I infinitely checked the code for errors and could not find any. The IDE I am using is 1.6.9. It wasn't until after A LOT of digging around that I found someone with this error. They said that by changing -include to -l solved their problem. I did so and my sketch compiled without any errors! Strange since the post with that solution was from a year before yours.

Did the IDE commands change in the newer releases?

I do not see anything that would cause -include to stop working. (Assuming I did the diff correctly.)

Sorry but I'm a complete noob to Arduino programming, as in I still have pieces of shrink wrap to take off so I have little idea about how to interpret the links you posted.

I have included my boards and verify logs for both -l and -include if you would like see what the output is for each one. I don't expect you to go through all of it but I did want you to see how I have my files configured in case it is some stupid mistake on my part (most likely).

boards.txt (25.4 KB)

Verify Logs.txt (44.4 KB)