<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[No MY_DEBUGDEVICE.begin ?]]></title><description><![CDATA[<p dir="auto">I've been testing a Genuino Zero as a serial gateway. Everything works fine except for the redirection of debug output to the Programming port.</p>
<p dir="auto">I saw a thread and a pull request which added MY_DEBUGDEVICE to the architecture files, but if I #define MY_DEBUGDEVICE SERIAL my gateway crashes, silently.</p>
<p dir="auto">I believe this is because there is no 'begin' for MY_DEBUGDEVICE.</p>
<p dir="auto">When I add one to to relevant architecture file it works fine, with debug output sent as expected to the Programming port.</p>
<p dir="auto">I'm a bit puzzled how anybody has got this to work without that mod, have I missed something?</p>
<p dir="auto">Note that adding MY_DEBUGDEVICE.begin into Setup in the sketch is too late - the node crashes before it gets to that point.</p>
]]></description><link>https://forum.mysensors.org/topic/9381/no-my_debugdevice-begin</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 09:44:56 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/9381.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 May 2018 09:40:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to No MY_DEBUGDEVICE.begin ? on Fri, 25 May 2018 16:26:40 GMT]]></title><description><![CDATA[<p dir="auto">fac13 about 2 hours ago</p>
<p dir="auto">I realized I should have added a wait after the initialization, like this: -</p>
<p dir="auto">void preHwInit()<br />
{<br />
MY_DEBUGDEVICE.begin(115200);<br />
while(!MY_DEBUGDEVICE){};<br />
}</p>
<p dir="auto">With that included, my sketch works without needing the architecture code mod.</p>
<p dir="auto">Putting the same code in before() doesn't work.</p>
<p dir="auto">Thanks for your help.</p>
]]></description><link>https://forum.mysensors.org/post/90422</link><guid isPermaLink="true">https://forum.mysensors.org/post/90422</guid><dc:creator><![CDATA[fac13]]></dc:creator><pubDate>Fri, 25 May 2018 16:26:40 GMT</pubDate></item><item><title><![CDATA[Reply to No MY_DEBUGDEVICE.begin ? on Fri, 25 May 2018 14:13:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> I tried both and neither worked - the node still failed to start.</p>
<p dir="auto">My workaround is to add MY_DEBUGDEVICE initialization in hwInit() in MyHwSAMD.cpp , immediately after the initialization of MY_SERIALDEVICE,</p>
<p dir="auto">i.e. insert these lines after line #76: -</p>
<p dir="auto">MY_DEBUGDEVICE.begin(MY_BAUD_RATE);<br />
#if defined(MY_GATEWAY_SERIAL)<br />
while (!MY_DEBUGDEVICE) {}<br />
#endif</p>
<p dir="auto">Of course if the two devices are the same then MY_SERIALDEVICE gets initialized twice, but doesn't seem to cause a problem.</p>
]]></description><link>https://forum.mysensors.org/post/90419</link><guid isPermaLink="true">https://forum.mysensors.org/post/90419</guid><dc:creator><![CDATA[fac13]]></dc:creator><pubDate>Fri, 25 May 2018 14:13:03 GMT</pubDate></item><item><title><![CDATA[Reply to No MY_DEBUGDEVICE.begin ? on Fri, 25 May 2018 11:38:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fac13" aria-label="Profile: fac13">@<bdi>fac13</bdi></a> as a workaround, could you try placing MY_DEBUGDEVICE.begin in a function called before() or preHwInit() in your sketch? MySensors will execute them before setup().</p>
]]></description><link>https://forum.mysensors.org/post/90417</link><guid isPermaLink="true">https://forum.mysensors.org/post/90417</guid><dc:creator><![CDATA[mfalkvidd]]></dc:creator><pubDate>Fri, 25 May 2018 11:38:26 GMT</pubDate></item><item><title><![CDATA[Reply to No MY_DEBUGDEVICE.begin ? on Fri, 25 May 2018 11:01:36 GMT]]></title><description><![CDATA[<p dir="auto">I think that it's probably because you are the first that use a separate port for debugging..</p>
<p dir="auto">in hwInit for SAMD architecture, we only initialize the standard serial port (MY_SERIALDEVICE)</p>
<p dir="auto"><a href="https://github.com/mysensors/MySensors/blob/59b15f5824bf060fa153b30065d089b04fff77c7/hal/architecture/SAMD/MyHwSAMD.cpp#L70" rel="nofollow ugc">https://github.com/mysensors/MySensors/blob/59b15f5824bf060fa153b30065d089b04fff77c7/hal/architecture/SAMD/MyHwSAMD.cpp#L70</a></p>
]]></description><link>https://forum.mysensors.org/post/90416</link><guid isPermaLink="true">https://forum.mysensors.org/post/90416</guid><dc:creator><![CDATA[tbowmo]]></dc:creator><pubDate>Fri, 25 May 2018 11:01:36 GMT</pubDate></item></channel></rss>