Coder Social home page Coder Social logo

toolchain's Introduction

wasm and wlink

wasm and wlink are, respectively, the assembler and linker for WRAMP code. Assembly code, usually in a .s file, is given to wasm, which outputs an object file. One or more object files can be linked together into a program by wlink, outputting an .srec file. These .srec files are then passed directly to WRAMPmon via remote, or further processed by trim to create a .mem file which can be used as part of Vivado's synthesis tool when loading new versions of WRAMPmon onto physical Basys3 boards.

wobj is also included in this repositroy, wobj is an object viewer and disassembler in one. wobj takes .o files, and displays on stdout.

Usage

wasm takes a single input file and produces a single output file, which defaults to the name of the input file with a .o file extension. Alternatively, an output file can be chosen using the -o argument.

$ wasm -o output.o input.s

wlink takes an arbitrary number of input files, and produces a single output file, which defaults to link.out in the current working directory. Again, an output file can be chosen.

$ wlink -o output.srec input1.o input2.o input3.o

wlink can also take several other paramaters. -Ttext <address> provides the memory address to start loading the resulting srec's .text segment. -Tdata <address> provides the memory address to start loading the resulting srec's .data segment. -Tbss <address> provides the memory address to start loading the resulting srec's .bss segment. -Ebss <address> provides the memory address that the resulting srec's .bss segment should finish at. -v instructs wlink to provide verbose output.

Exsposed to the programmer there are also three special labels, bss_size, text_size and data_size. These three labels provide the size of the respective segment evaluated during the linking process. la $1, bss_size will load $1 with the total size of the .bss segment.

wobj first argument must be the object file to be inspected, followed by an optional -d, including this flag instructs wobj to display the dissasembly.

Building

Building wasm, wlink and wobj simply requires g++ to be installed. Type make, or specify a single program with make wasm, make wlink or make wobj.

toolchain's People

Contributors

tyler-marr avatar danoost avatar gizmoguy avatar casperthecat avatar tkern0 avatar

Watchers

James Cloos avatar

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.