Blog

Mongoose Embedded Networking Library on nRF51 and nRF52 (Bluetooth)

2017/02/28 00:13 · dfrank · 0 Comments

I'm Tired of Makefiles

At Cesanta, we use Makefiles to build our firmwares, libraries, and perform other things. But the more I use make, the less I like it. I want my incremental builds to be reliable, and I want to be able to reuse my Makefiles as needed. make can't provide that, and builds just kinda-sorta work most of the time.

Most annoying issues are:

→ Read more...

2016/12/11 17:33 · dfrank · 23 Comments

Docker Printable Quick Reference Card

I use Docker, but not often enough to memorize even basic Dockerfile instructions and CLI commands. After all I got so annoyed by being unable to quickly sketch some Dockerfile or to do something with the existing containers occasionally, so I decided to write a concise cheat sheet which I can print once and constantly keep on my desktop:

2016/08/01 12:59 · dfrank

Let's Run Lisp on a Microcontroller

2016/07/18 17:11 · dfrank

Heap on Embedded Devices Analysis and Improvement

The heap on a device is usually a kind of black box: heap API rarely provides anything more than just returning free space size, and quite often it doesn't provide even that (since C standard doesn't oblige it to). We have little idea of the fragmentation (in particular, we're interested in longest contiguous free chunk of memory) and the behaviour of the allocator in general. But in the resource-limited circumstances we're highly concerned about being memory efficient, right?

Read more

2016/01/26 21:16 · dfrank

Standard interface between a text editor and an IDE?

You may probably consider this a rant post.

→ Read more...

2015/10/09 17:56 · dfrank · 8 Comments

Microchip PICkit3, Don't Halloo Till You Are Out of the Wood

Microchip has a tool called MDB: Microchip command-line debugger. It's a very nice idea: we can automatize things; at least, we can program a hex from a script. Implementation, however, is far from perfect, but, well, it works somehow.

→ Read more...

2015/10/07 00:05 · dfrank · 2 Comments

Unit-testing (embedded) C applications with Ceedling

Just like a lot of other embedded software engineers, I used to ship my embedded applications to production without testing them properly. Only some manual tests were done. I was under the impression that there's no real way to test them: you know, embedded applications run in a custom hardware and interact with this specific hardware heavily, which makes them not so easy to test automatically.

But the more I worked in this field, the more I thought that there should be some way to make my applications more reliable. Of course, I strive to develop right application design and write good implementation, but mistakes (sometimes very silly ones) happen. And one day, I've come across the awesome book: Test Driven Development for Embedded C by James W. Grenning. It is a very good book, and it explains the topic very thoroughly; highly recommended.

Although this article is based heavily on what I've learned from this book, it is not just a very short version of it: while trying to put my knowledge to practice, I found some new tools that simplify the process even more. I hope that the article will help you to start quickly.

Read more

2015/10/05 15:12 · dfrank

How I ended up writing new real-time kernel

I work with embedded stuff for several years: our company develops and manufactures car trip computers, battery chargers, and other car-related electronic devices.

The processors used for our designs are primarily 16- and 32-bit Microchip MCUs, with RAM from 8 to 32 KB, and ROM from 128 to 512 KB, without any kind of MMU. Sometimes, there are even more modest 8-bit chips.

read more

2015/09/20 22:02 · dfrank

Testing Socket.io with authentication by Passport.socketio

The usage of real-time socket connection with authentication data seems quite regular thing to me. And, personally, I find it very strange that this topic receives so little interest.

2015/09/17 01:29 · dfrank · 0 Comments

How do JavaScript closures work under the hood

From my experience, a lot of JavaScript programmers, mine included, learned how to use closures without having clear understanding of how closures actually work, and what exactly is going on behind the scenes when we use them. What the closure actually is, to begin with? When it is created and deleted? What the implementation should look like?

So, I've written an article How do JavaScript closures work under the hood which explains the subject in a very intuitive way, with clear diagrams and examples.

2015/09/09 07:45 · dfrank · 0 Comments

Qt Creator in VirtualBox with Windows guest OS

I needed to develop an utility application in Qt, which should work in Windows. I use Linux, and this is no problem since Qt is crossplatform, but anyway, to make sure resulting application works in Windows as intended, I've installed Qt in Windows guest OS in VirtualBox.

Surprisingly, at the time of writing this, there were two issues running Qt Creator in Windows guest OS.

→ Read more...

2015/07/16 10:28 · dfrank · 0 Comments

Usage of Ragel in Qt project

Recently I had an opportunity to work with Ragel State Machine Compiler in my Qt project (There was a requirement to parse binary protocol), and the question was, how to integrate Ragel source files in the project conveniently. After all, I've read about qmake's QMAKE_EXTRA_COMPILERS facility, which does the job very well.

→ Read more...

2015/07/16 08:24 · dfrank · 0 Comments