FreeRTOS Gets Class

[Michael Becker] has been using FreeRTOS for about seven years. He decided to start adding some features and has a very interesting C++ class wrapper for the OS available.

Real Time Operating Systems (RTOS) add functionality for single-thread microcontrollers to run multiple programs at the same time without threatening the firmware developer’s sanity. This project adds C++ to the rest of the FreeRTOS benefits. We know that people have strong feelings one way or the other about using C++ in embedded systems. However, as the 24 demo projects illustrate, it is possible.

One nice thing about the library is that it is carefully documented. A large number of examples don’t hurt either. The library is clean with just under 30 classes. It seems to have resisted the trend of having classes for everything. You know the kind of library we mean. To create an Integer object, just build a configuration object to pass to the class factory generator which…. This library doesn’t entertain any of that. It has simple abstractions around threads and timers, queues, and mutexes.

Continue reading “FreeRTOS Gets Class”

Hackaday.io User Reviews Six STM32 IDEs

One of the issues with getting started with any Arm-based project is picking a toolset. Some of us here just use the command line with our favorite editor, but we know that doesn’t suit many people–they want a modern IDE. But which one to choose? User [Wassim] faced this problem, evaluated six different options for STM32 and was kind enough to document his findings over on Hackaday.io.

Many of the tools are Windows-only and at least two of them are not totally free, but it is still a good list with some great observations. Of course, the choice of an IDE is a highly personal thing, but just having a good list is a great start.

Continue reading “Hackaday.io User Reviews Six STM32 IDEs”

Hack Your Own Lisp Language Using… Well… Anything

Lisp is one of those interesting computer languages that you either love or hate. But it has certainly stood the test of time. Of all the ancient languages that are still in practical use, only FORTRAN is older, and only by one year. If you ever wanted to learn Lisp, [Kanaka] has an interesting approach: Study how to build your own Lisp in your favorite language.

What if your favorite language is something obscure? [Kanaka’s] GitHub page has no fewer than 64 different implementations of Mal (Make a Lisp), each in a different language. Unsurprisingly, C and Python are on the list. However, so is Forth and Go and Awk. Not strange enough for you? How about Make? Yes, Make, like you use to build programs. Bash, Postscript, and even VHDL have entries, although–surprisingly–no Verilog; we don’t know why.

Each implementation of Mal is separated into eleven incremental, self-contained, and testable steps that demonstrate core concepts of Lisp. The last step can actually run a copy of itself–typical for a mind-bending language like Lisp. There is a guide to help you navigate through the process in the language of your choice. The suggestion is to not look at the code in the repository until after you’ve written it yourself. You can see [Kanaka] (also known as [Joel Martin]) giving a recent talk about the Mal process in the videos below.

Continue reading “Hack Your Own Lisp Language Using… Well… Anything”

Google Machine Learning Made Simple(r)

If you’ve looked at machine learning, you may have noticed that a lot of the examples are interesting but hard to follow. That’s why [Jostmey] created Naked Tensor, a bare-minimum example of using TensorFlow. The example is simple, just doing some straight line fits on some data points. One example shows how it is done in series, one in parallel, and another for an 8-million point dataset. All the code is in Python.

If you haven’t run into it yet, TensorFlow is an open source library from Google. To quote from its website:

TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google’s Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.

Continue reading “Google Machine Learning Made Simple(r)”

DIY 3D Slicer Is A Dynamo

We all know that hacker that won’t use a regular compiler. If he’s not using assembly language, he uses a compiler he wrote. If you don’t know him, maybe it is you! If you really don’t know one, then meet these two. [Nathan Fuller] and [Andy Baldwin] want to encourage you to write your own 3D slicer.

Their post is very detailed and uses Autodesk Dynamo as a graphical programming language. However, the details aren’t really specific to Dynamo. It is like a compiler. You sort of know what it must be doing, but until you’ve seen one taken apart, there are a lot of subtleties you probably wouldn’t think of right away if you were building one from scratch.

Continue reading “DIY 3D Slicer Is A Dynamo”

Will Your CAD Software Company Own Your Files, Too?

We’re used to the relationship between the commercial software companies from whom we’ve bought whichever of the programs we use on our computers, and ourselves as end users. We pay them money, and they give us a licence to use the software. We then go away and do our work on it, create our Microsoft Word documents or whatever, and those are our work, to do whatever we want with.

There are plenty of arguments against this arrangement from the world of free software, indeed many of us choose to heed them and run open source alternatives to the paid-for packages or operating systems. But for the majority of individuals and organisations the commercial model is how they consume software. Pay for the product, use it for whatever you want.

What might happen were that commercial model to change? For instance, if the output of your commercial software retained some ownership on the part of the developer, so for example maybe a word processor company could legally prevent you opening a document in anything but their word processor or viewer. It sounds rather unreasonable, and maybe even far-fetched, but there is an interesting case in California’s Ninth Circuit court that could make that a possibility. Continue reading “Will Your CAD Software Company Own Your Files, Too?”

Browsing Forth

Forth has a strong following among embedded developers. There are a couple of reasons for that. Almost any computer can run Forth, even very small CPUs that would be a poor candidate for running programs written in C, much less host a full-blown development environment. At its core, Forth is very simple. Parse a word, look the word up in a dictionary. The dictionary either points to some machine language code or some more Forth words. Arguments and other things are generally carried on a stack. A lot of higher-level Forth constructs can be expressed in Forth, so if your Forth system reaches a certain level of maturity, it can suddenly become very powerful if you have enough memory to absorb those definitions.

If you want to experiment with Forth, you probably want to start learning it on a PC. There are several you can install, including gForth (the GNU offering). But sometimes that’s a barrier to have to install some complex software just to kick the tires on a system.

We have all kinds of other applications running in browsers now, why not Forth? After all, the system is simple enough that writing Forth in Javascript should be easy as pie. [Brendanator] did just that and even enhanced Forth to allow interoperability with Javascript. The code is on GitHub, but the real interesting part is that you can open a Web browser and use Forth.

Continue reading “Browsing Forth”