HowTo build the Marlin 3D Printer Firmware on the Raspberry Pi

If you are already running octoprint as a printserver on a Raspberry Pi it is very convenient to also build Marlin on it via ssh. I made a script that sets up the necessary build environment and provides commands for building and uploading from the commandline. It uses the official Arduino toolchain for ARM. Everything is standalone, nothing is installed.

It should also work on Linux in general. If you don’t build on ARM you will need to change the architecture though. Check the parameters at the beginning of the script for that.

The script is setup by default to build the Marlin fork “Skynet3D” for the Anet A8 Prusa clone. If you want to build stock Marlin change the “marlinRepositoryUrl” parameter respectively. You should also set the parameter “hardwareDefintionDirectory” to an empty string, this prevents the script from trying to copy the board definition that is needed for the A8.

If you are running octopi on you Raspberry you need to disconnect it from your printer before uploading otherwise the serial port is blocked.

Code

here on github: https://github.com/mmone/marlintool

 

Commandline parameters

-s  — setup

Download and configure the toolchain and the necessary libraries for building Marlin.

-m  — marlin

Download Marlin sources.

-v  — verify

Build without uploading.

-u  — upload

Build and upload Marlin. If you are running octopi on you Raspberry you need to disconnect it before uploading otherwise the serial port is blocked.

-b  — backupConfig [file]

Backup the Marlin configuration to the given file.

-r  — restoreConfig [file]

Put the given configuration into the Marlin directory. Rename to Configuration.h implicitly.

-c  — clean

Cleanup everything. Remove Marlin sources and Arduino toolchain.

-p  — port [port]

Set the serialport for uploading the firmware. Overrides the default set in the script.

-h  — help

Show help.

 

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Building a Raspian Image with Xenomai

The LinuxCNC wiki has detailed instructions on how to build a Raspian image with the Xenomai development framework / realtime kernel extension. They also link to a ready made image if you don’t want to build it yourself.

If you build yourself and copy and paste the comands into your shell be aware that under item “5. Create SD card image / Populate BOOT” there seems to be a random character in the command: “sudo cp linux-rpi-3.2.27/build/arch/arm/boot/Image mnt/boot/kernel.img” behind the “…/boot/Image” part, remove it otherwise it will not execute.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Raspberry Pi Oscilloscope and Logic Analyzer

The BitScope BS05U is a simple Oscilloscope, Logic Analyzer and Signal Generator for the Raspberry Pi. As it connects via USB and there is software for Windows, Mac OS X and Linux available it can be used on this systems as well.

Features

  • 20 MHz Bandwidth.
  • 40 MSps Logic Capture.
  • 2 Analog Scope Channels.
  • 2 Analog Comparator channels.
  • 6 Logic/Protocol Analyzer channels.
  • 8 & 12 native analog sample resolution.
  • Decodes Serial, SPI, I2C, CAN and more.
  • Windows, Linux, Mac OS X & Raspberry Pi.
  • Built-in analog waveform & clock generators.
  • User programmable, C/C++, Python, VM API.
  • Tiny, light weight (12g) and water resistant.

scope

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Raspberry Pi based Autopilot Sensor Platform

The guys at emlid have developed Navio a navigation/flight controller sensor shield for the Raspberry Pi targeting robotic models like cars, boats, submarines, multirotors and planes.

With a lot of projects in the field of flight/navigation controller hardware moving away from 8-Bit to 32 Bit MCU for better performance, it seems that it was about time that someone developed something like that for the Pi. While you would think that it’s generally a bad idea to have a control loop running in a non-realtime environment, realtime kernel extensions like for example Xenomai make things like this possible and manageable. All while running in a linux environment with all the features of an OS and the command line magic of the tools you love available at your fingertips.

In case of the Pi you have the added benefit of comparatively large processing power that makes things like streaming video of a camera or even running image recognition on top of it possible, especially if you incorporate the GPU.

Apart from that the possibility to for example add Wi-fi or 3G connectivity by simply plugging in a device into the USB port seems also a plus.

This are the features the shield adds to your Pi:

  • 13 PWM outputs to control servos
  • 9DOF inertial measurement unit
  • Pressure and temperature sensor
  • GPS with carrier phase measurement
  • External GPS antenna
  • 4-channel 16bit ADC
  • 1 trillion read/write cycles FRAM. An interesting feature as in my experience the SD card read/write access, if necessary, is often a problem if you want to achieve realtime performance.
  • Bright RGB LED
  • I2C, SPI, UART ports.

On the software side of things emlid is planing to port ArduCopter to the Pi.

Navio

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Open Source Video Driver for the Raspberry Pi

Broadcom recently announced the release of full documentation for the VideoCore IV graphics core, and a complete source release of the graphics stack under a 3-clause BSD license. This is good news for the Raspberry Pi community. The release targets the BCM21553 cellphone chip, it should be reasonably straightforward to port this to the Pis BCM2835, allowing access to the graphics core without using a binary blob.

raspberry-pi

As an incentive to do build a open source video driver the Raspberry Pi foundation will pay a bounty of $10,000 to the first person to demonstrate that they can successfully run Quake III at a playable framerate on Raspberry Pi. This competition is open worldwide, and you can find competition rules here which describe what you have to do, and how to enter.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

BitTorrent Sync – Serverless Cloud Storage

BitTorrent Sync is what seems to be a great encrypted serverless Dropbox alternative. You can read more about the technical background here. It provides clients on OSX, Linux, Windows, Android, iOS, ARM and others. The client for ARM can easily be run on the Raspberry Pi. Just download the binary and copy it to your pi. Start it by executing “./btsync”. You can now access a web interface at http://[raspberry IP]:8888/gui. This interface allows you to create new “Shares” or connect a local folder to and existing one.

 

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

WebIOPi – Browser based GPIO for the Raspberry Pi

WebIOPi is a webserver and a combination of libraries to control the Pis GPIO from the browser or from any application via HTTP/REST. It also has support for many common ICs like I2C IO expander etc.

The feature list:

  • Control, debug, and use your Pi’s GPIO, sensors and converters from a web browser or any app
  • WebIOPi is the perfect Swiss-knife to make connected things
  • Written in Python, with facilities to load and execute custom script, using a comprehensive structure with setup and loop functions
  • Unified Serial/SPI/I2C support with a complete and consistent set of functions to control more than 30 devices, including most used analog converters, I/O expander and sensors
  • Javascript/HTML client library to make Web UI
  • Python/Java clients, to make Pi-to-Pi systems or Android applications
  • CoAP support brings the best Internet of Things protocol on the Pi, as a future proof of Pi possibilities
  • Includes simple web apps, to debug GPIO, devices and Serial interface

webiopi-new

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone