Skip to content

Tag Archives: Arduino

mprintf: A thread safe printf: mprintf library

So, I decided to take this one step further and build a library that hides the details of the mutex and variadic macro. To use the library you will need to: Go into your libraries directory and make a new directory called ‘mprintf’ Copy these two files into the new directory; mprintf.h mprintf.cpp Put the [...]

mprintf: a simple thread safe printf for DuinoOS Part A: Getting a thread safe printf to work

There are lots of ways to implement a thread safe printf for DuinOS (or free RTOS). The following is a version that renames printf as mprintf. Like an fprintf function, mprintf has a leading parameter which must be passed with the rest of the printf variables. This implementation exposes the methodology used to make printf [...]

mprintf: a simple thread safe printf for DuinoOS Part A: Getting non threaded printf to work

I thought it best that I document how I got printf to work and how I made it thread safe for DuinoOS (or freeRTOS for that matter) Getting non threaded printf to work. printf makes use of a file handle called stdout. This file handle is null unless we do something to change its value. [...]

How does an Atmega boot?

The bootloader (stk500) used by arduino and other atmega vendors allows for self modifying code.  Normaly not a good idea, however, being able to use your atmega to load code onto the very same chip is extremely handy (think, in the field re-programming and programming your chip without a flash burner) So, how does all [...]

The devil is in the details: Atmega startup to freertos

Figuring out why something breaks usually involves understanding how it is supposed to work.  Sure, it was easy getting my first Atmega328 code running using Arduino.  Getting the DuinOS version of freeRTOS was a little bit more of a challenge but ran remarkably well given its alpha state.  Getting a printf function to work using [...]

RTOS for Arduino

List of RTOS for Arduino and their current activity state

piece parts

avrdude: http://www.bsdhome.com/avrdude/ This is the application that loads a program onto the atmega328.  It has two modes, a direct program mode and ‘special’ mode that makes use of an on board (the atmega chip) boot loader. example of a command line avrdude that loads a hex file using the arduino bootloader This works from the [...]

Arduino boards arrived

Setting up the Arduino environment