Coder Social home page Coder Social logo

topz's Introduction

Toolchain, OS and the Pi Zero

At the moment I work on the toolchain, such as the Linker or Disk utility. The project is at its infancy and is designed to take a long time, so I have delicious to work on when I have time to tinker with it. The whole thing is MIT licensed, so no strings attached if you want to play around. However I have only tested it on Windows 7 and at the time of writing the Disk utility is hardwired to the WinApi.

I have no clear idea of what the system is supposed to be able to, but I plan to experiment with just about anything related such as file system design, language design, hardware and so on.

topz's People

Contributors

pawwkm avatar

Watchers

 avatar

Forkers

edsen93

topz's Issues

Streaming the disk

Implement a stream that streams the raw contents of a disk, such as an SD card. This will be useful later when I need to create disk images.

Baking the Pi

There is a bare metal tutorial for the Raspberry Pi which shows how to use the screen. Follow this tutorial to get an idea on how to get started. The result should be an api for writing text to the screen.

Define Assembler Architecture

Define the architecture for the assembler. The library should be called Topz.ArmV6Z. The assembly language is somewhat an high level assembly language since it targets Atom.

procedure Main
{
    MOV  R0, #0     ; R0 accumulates total.
    MOV  R1, #10    ; R1 counts from 10 down to 1.

again:
    ADD  R0, R0, R1
    SUBS R1, R1, #1
    BNE  again

halt:
    B    halt       ; infinite loop to stop computation
}

string str "abc"

data myData 
{
    0x00, 0x01, 0x03
    0x04, 0x05, 0x06
}

data myOtherData "path/to/file.bin"

external data extData
external procedure extProcecure
external string extString

As for now there is no reason to make a big deal out of the assembler. Take in a single file and produce an Atom file from it. No need for expressions and such, but make it easy to add in the future if the need should arise.

Encode Instructions

Encode the follwing instructions in a pass over the AST:

  • ADD
  • AND
  • B
  • CMP
  • LDR
  • LDRB
  • LDRD
  • MOV
  • STR
  • STRH
  • SUB
  • TEQ
  • TST

ObjDump

Implement a console program that can dump information about atoms and the object file itself.
Check this out for some ideas.

Assembler Program

Wrap the assembler library in a console program.

  • It should accept one or more *.s files.
  • -f program.bin
  • -o 1231 to specify origin

All parameters are mandatory.

USB OTG

The Pi Zero is capable of OTG. It would be cool to implement that ao it could connect to another computer and do some funky stuff via USB.

Master Boot Record

The Pi understands MBR, so I don't need to implement some hackery to have multiple file systems on the SD card. Implement MBR in the virtual file system.

Linker Console

Implement a console program that takes a list of *.o files and links them to a binary or another library.

Disk utility

Use the virtual file systems api in a disk program. The program should have the following functions.

  • Zero out the stream.
  • Partition a stream.
  • Place a file system in a partition.
  • Handle the functions given in the abstract FileSystem class.

In most cases the functions are going to stringed together. To decrease the amount of redundant command line arguments there should be some form of scripting. Much in the same vein of DiskPart.

Rename the project

Rename the project to Topz which stand for Toolchain, OS and the Pi Zero.

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.