mchlmmc / CirnOS

Bringing the workflow of Arduino to the Raspberry Pi
GNU General Public License v3.0
101 stars 6 forks source link

Buildfixup #14

Open tilkinsc opened 5 years ago

tilkinsc commented 5 years ago

Added test repo Cleaned up imports Improved build and deploy scripts Shifted around build directory to make more sense and to have a place for everything (lib directory for libs, include directoy for includes, etc)

tilkinsc commented 5 years ago

aha just a name change okay. with rbpi3b+ I can run images off usb.

mchlmmc commented 5 years ago

Can't run the build.sh file, variety of reasons:

If everything is being rearranged then build.sh should be transformed into a makefile so in the future different models can be built with make zero or make rpi2 etc.

tilkinsc commented 5 years ago

I develop on Windows so that's a caveat of not being able to test there. I'll add some cleanup commits.

tilkinsc commented 5 years ago

I have always been against makefile. Once you make it nobody in their right mind wants to maintain it. In fact in LuaConsole I just made it so the build script just executes commands.

mchlmmc commented 5 years ago

Being as ubiquitous as it is, I think it is safe to assume that all future contributors will be familiar with Makefile.

However, there are no current problems with build.sh, and perhaps not using Make may be a good sign of CirnOS' scale -- if it needs Make then it is getting too big.

tilkinsc commented 5 years ago

Well its not like make install is going to do anything. So familiarity isn't really prevalent. However, caching is nice. I wonder if we can develop a solution where we can just pass files through a program that returns the last edited time. This way we can easily test caching and have a simplex makefile or sh. I actually have a lua implementation of said makefile.

CirnOS' scale should be as big as it can be to accommodate everything developers want to do with their microcontroller. Tools that carry along the project. Maybe even a text editor somewhat like VIM for their lua scripts. I don't think you have to shut off or reboot every time you want to do something different.

mchlmmc commented 5 years ago

Caching can be handled later, if needed.

As for updates, I plan on allowing CirnOS to be updated directly over USB, once the USB driver is done. This will make programming very similar to Arduino.

Updates done this way will not require turning off the rPi, or even removing the SD card. The script execution will simply freeze, the 'kernel' updated, and then the script continues on. I'm still figuring out the details of how this is going to work, but should have a good idea shortly.

tilkinsc commented 5 years ago

I would entirely destroy the lua context and load a new one in its stead. Then make everything go back to default pin wise.

We could probably even benefit from LuaConsole, which, if we have shared library support somehow, we can load any version of lua we want on the fly and use the REPL engine. People could trigger pins high and low if they wanted to rather than running a program to do so. I did, however, create a LuaConsole version in which you can change all the symbols of each lua archive and import them to be of separate use. For example, the archive would hold l51lua and l52lua functions, be put into a struct, and executed from said struct.

This means we don't even require over-usb updating. You could do it all from your raspberry pi, which is something that would be nice on the Arduino to have.