Souliss on Platformio

80 views
Skip to first unread message

Bartek Celary

unread,
Sep 30, 2015, 8:23:57 AM9/30/15
to souliss
Hello,

Quick question as I am just starting out with Souliss to implement the Arduino portion of my home automation :)

Has anyone tried to use platformio framework to compile sketches? I was using it for testing different solutions and to program my current "poor man's light control" and it proved very handy compared to official IDE. Is anyone using it with Souliss?

Thanks!
Bartek

Di Maio, Dario

unread,
Sep 30, 2015, 8:36:58 AM9/30/15
to sou...@googlegroups.com
Hi Bartek,

never used but interested in, if it works with standard Arduino libraries likely it will with Souliss too.

Have a try and let us know,
Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/b04432db-9b2a-4d4c-88f3-c80e47ceb982%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bartek Celary

unread,
Oct 1, 2015, 3:45:25 PM10/1/15
to souliss
Hi Dario.

It appears it is not working at the moment. A workaround is to rename or remove the cpp files which should not be compiled. Arduino IDE is not compiling other files than those found in src, utility and the main directory of the library. Further details and the workaround available here: https://github.com/platformio/platformio/issues/298

I will try the workaround and see how it goes.

BTW, Ivan Kravets who is behind the platformio project is also behind a quite interesting (but still in a very early stage) IoT platform - SmartAntHill: https://github.com/smartanthill. Hope you don't mind me posting about competition to Souliss ;-)

Cheers,
Bartek

Di Maio, Dario

unread,
Oct 2, 2015, 1:45:24 AM10/2/15
to sou...@googlegroups.com

The IDE if doesn't found the src folder, just compiles the files in the main root. As trick we build an unique big file with all the code, using conditional statements to include the code that we need.

Isn't nice, but AFAIK there are no other ways on the IDE.

Why are you willing to use platformio?

Had a look to your link, looks something serious :) I will followup.

Dario.

From Mobile.

Bartek Celary

unread,
Oct 2, 2015, 6:00:39 AM10/2/15
to sou...@googlegroups.com
I am mostly working on the console and really do not like to use the
IDE just to compile things. The Platformio proved to be a good balance
between ease of use and ability to have more control over the code.
Another good usage case is when building firmware on the Raspberry or
some other low end device. Java is quite heavy there. I heard there's
a CLI available in the Arduino IDE for some time now, but it is still
Java AFAIK.

Cheers,
Bartek
--
Bartek
> You received this message because you are subscribed to a topic in the
> Google Groups "souliss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/souliss/PkegYrnXsGM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> souliss+u...@googlegroups.com.
> To post to this group, send email to sou...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/souliss/CAKGhMPJ468ewNtLorVC%3DV5w1dkV%3DOnZArR5HJi0YWmY4DcH%2B3w%40mail.gmail.com.

Di Maio, Dario

unread,
Oct 2, 2015, 6:51:36 AM10/2/15
to sou...@googlegroups.com
Got it, let me know if I can help you further.

Dario.

Bartek Celary

unread,
Oct 12, 2015, 12:12:39 PM10/12/15
to souliss
Hi,

A quick update about compiling on PlatformIO.

To make it work add the following configuration to the platformio.ini:

build_flags = -I/path/to/lib/souliss
lib_ignore = souliss

This should to the trick.

BTW, there's a bunch of warnings that get suppressed by the Arduino IDE for the souliss library. Not sure if you are aware? Most of them are really harmless like:

souliss/tools/IEEE754/float16.c:83:1: warning: "/*" within comment [-Wcomment]

some unused variables (I guess that might be the result of precompiler modification with the defines)

but some look bad:

Communication.cpp:213:1: warning: no return statement in function returning non-void [-Wreturn-type]
LocalIO.cpp:706:1: warning: no return statement in function returning non-void [-Wreturn-type]
LocalIO.cpp:711:1: warning: no return statement in function returning non-void [-Wreturn-type]
LocalIO.cpp:762:1: warning: no return statement in function returning non-void [-Wreturn-type]
oFrame.c:109:1: warning: control reaches end of non-void function [-Wreturn-type]
vNet.cpp:607:1: warning: control reaches end of non-void function [-Wreturn-type]
oFrame.c:205:9: warning: 'outbyte' may be used uninitialized in this function [-Wmaybe-uninitialized]

Are these expected?

Regards,
Bartek

Di Maio, Dario

unread,
Oct 12, 2015, 12:23:03 PM10/12/15
to sou...@googlegroups.com

Yep I know, you can see those even with the Arduino IDE using the Verbose option.

Those are mostly for non-void fuctions used as void, is somenthing easy to fix that doesn't affect your code because the return value is not used.

There is one relevant to an ambiguous else that is there from long time, we fixed once and got a strange behavior. Never investigated on how the compiler translated that, I will sooner or later.

In any case use Souliss and forget those warnings.

If you want, you may write a tutorial or a blog post to explain how and why you are using Platgormio. On github there is the souliss.github.io repository with instruction to contribute.

Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Bartek Celary

unread,
Oct 13, 2015, 7:10:35 AM10/13/15
to souliss
hm, these 2 cases of undefined return values are used as non-void function:

oFrame_isBusy -- this one has a case when a return is undefined (well - at least just by looking at the function - maybe there is no logical way for this)

U8 oFrame_isBusy()
{
// If the frame is available, increase the busy index
if(oFrame_Available())
{
i_busy++;
return 1;
}

// If the frame is busy from too many cycles, reset it
if(i_busy > MAX_BUSYCYCLE)
{
i_busy = 0;
oFrame_Reset();
}

        // ??? return value undefined here... the function is always used as returning value

}

oFrame_Available -- the same applies here - still there's a way to return undefined value. The nested if statement has a leg that exits without return. This function is used as returning value in the function above (e.g.)
-       if(actualframe)
-               if (oFrame_GetLenght())
-                       return 1;
// maybe fix it like so:
+       if(actualframe && oFrame_GetLenght()) <-- wouldn't this be what should really be the condition here and otherwise return 0?
+               return 1;

I might be wrong - maybe this is designed that way -- could you double check? It could work OK on atmega, but maybe someone will try to compile this on a slightly different platform and then the fun will begin :)

Thanks,
Bartek

Di Maio, Dario

unread,
Oct 13, 2015, 7:19:21 AM10/13/15
to sou...@googlegroups.com
For the isBusy, this should be converted as void. Rather an extra else return 0; is required for the Available one.

Would you mind to open an issue for this on github? This will keep the issue tracked.

If you would do somenthing more, you can fix it, test it and make a pull request if you feel that things are still working :D

Bartek Celary

unread,
Oct 13, 2015, 10:28:29 AM10/13/15
to souliss
OK - will get back to this on github.

For now - just created a no-brainer patch with the fix for comment lines (simply added missing '/' char to prevent the warning). Hope you can pull it - I sometimes like to check if my code got any warnings - could be helpful with stupid mistakes :D

Cheers,
Bartek

Di Maio, Dario

unread,
Oct 13, 2015, 10:29:35 AM10/13/15
to sou...@googlegroups.com
Yep, merged. 

Thanks,
Dario.

Reply all
Reply to author
Forward
0 new messages