Giter Club home page Giter Club logo

placid's Introduction

Placid

First thoughts

I started thinking about bare metal programming on the Raspberry Pi when I tried running OctoPrint (https://octoprint.org) on Model B+. This is a Linux web server designed to run a 3D printer. It works, but it takes minutes to boot into a running server. This is crazy. The Model B+ is not the newest, but it is a powerful ARM processor with 512MB of RAM. It made me harken back to a long time complaint of mine - that as software gets more complex it continues to run slower and slower with each new release.

Examples and reasons why computers are so damn slow

The solution was always to get more RAM or a bigger disk, or a whole new machine.

So I decided to see what I could do if I went right down to the bare metal. Without a doubt, the performance would be much better. But could I do anything practical with it? Could I build, for instance, a web browser, email client or word processor on top of it? I probably could if I simply ported over lots of legacy libraries, but that would kind-of defeat the purpose. I’d just be putting bloated software one layer up.

So I’m starting by writing a bootloader. It will talk to the serial port. The way RPi hardware works, you simply put 3 files on a FAT partition of the SD card: start.elf, boot code.bin and kernel.img. The first two are stock files that have something to do with initializing the GPU and rest of the system before loading and executing kernel.img. The last file is simply a binary that loads at location 0x8000 and starts to run. I’ve run some canned experiments to blink the status LED and talk to the serial port on pins 14 and 15 of the GPIO connector.

Actually, the name of the file loaded and the location where it is placed can be changed, which will be important for my bootloader. Read bootloader/README.md for more info.

Once the bootloader is done I can start on a lightweight kernel that I can load with the bootloader without having to deal with swapping SD cards. See kernel/README.md for more info.

placid's People

Contributors

cmarrin avatar grorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

grorg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.