DCC++ DCCpp_Uno 1.2.1 compiler Errors

John C H Apr 27, 2016

Tags:
  1. John C H

    John C H TrainBoard Member

    14
    13
    3
    Hello
    Just got DCC++ and Arduino Mega. Did a test compile after loading DCCpp_Uno and received multiple error messages of " backslash and new line separated by multiple spaces." Code starts at line 410, the Interrupt Code Macro.

    If I remove the backslashes and re compile I get multiple errors of "Multiple ## error" So I quit testing.

    What now? I don't think I can try uploading the program to the Mega.

    John C H
     
    Scott Eric Catalano likes this.
  2. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    What version and platform are you using for the Arduino IDE? The backslashes can't be removed since they provide for continuity of the macro definition.
     
    Scott Eric Catalano likes this.
  3. John C H

    John C H TrainBoard Member

    14
    13
    3
    Hi Gregg
    I am using IDE 1.6.7 on a Mac with El Capitan latest.
    So would I ignore the error messages, about 10 of them, and upload to the Mega anyway? I am thinking the compile has failed and wouldn't upload.

    John C H
     
    Scott Eric Catalano likes this.
  4. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    I just double-checked -- these are compiler "warnings," not "errors," and can safely be ignored. Normally you would not see these when compiling but you must have the "show warnings" setting under Arduino preferences to something different than "None." The compiler is warning that there are spaces after the backslashes, but it allows it anyway (I noted on some the the C and C++ programming boards that there is a debate about whether this should be allowed without a warning, what the true standard is, etc.). If you switch "show warnings" under Arduino preferences to "None" the warnings should disappear with no ill effect. You will always receive error messages regardless of the setting, so no need to worry that an error will not be reported.
     
    Scott Eric Catalano likes this.
  5. John C H

    John C H TrainBoard Member

    14
    13
    3
    Thanks Gregg
    After I altered the back slash and got more errors, I re downloaded Base Station 1.2.1. I checked my Arduino IDE Preferences and the warning messages were turned off. This time when I compiled, I got no errors or warnings so it is looking good so far. I found a similar post to mine in the Introducing DCC++ thread and the same solution was suggested there.

    John C H
     
    Scott Eric Catalano likes this.
  6. John C H

    John C H TrainBoard Member

    14
    13
    3
    My Arduino Mega is a Chinese counterfeit, looks just like the Italian version but blury silk screen. Cost only $9.00 C but DCC++ will not operate on it. Did the power on off test and the <D> test as suggested by Gregg and the tests both fail. I did install Blink at first to make sure the Mega did somethink and Blink works.
    I have a new Mega genuine coming. I guess the lesson is take heed from China. I have bought lots of stuff from China, and the particular seller that I got the Mega, all stuff until now has caused me no issues.
    I will certainly map through tests to see if I can find the issue on the Mega and salvage the unit for other uses.

    John CH
     
    Scott Eric Catalano likes this.
  7. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    279
    195
    12
    I don't see the harm in trying multiple Chinese boards. I have used at least 10 different ones and only one hasn't worked so for $5 each worth the risk for me.

    As for the warnings. If you go to the GitHub page and look at the pull requests,. There is one that gets rid of all the warnings.

    https://github.com/DccPlusPlus/BaseStation/pull/15/files

    Worked great for me. They may just be warnings but still good to eliminate in my opinion
     
    Scott Eric Catalano likes this.

Share This Page