Skip to content

Create/manipulate object-files like ELF, IEEE695, SRecord, IHex.

Notifications You must be signed in to change notification settings

pySART/objutils

 
 

Repository files navigation

pyObjUtils

Codacy Badge Code Climate Code Issues Coverage Status Build Status Build status GPL License

Welcome to objutils!

obutils is a Python library to process/parse object files (ELF, IEEE695, S19, iHex, Tektronix...)

you really like readelf, objdump, and objcopy, don't you?

to help you handle this daunting task. especially embedded systems developers are often in need to do strange things with object files...

Features at a glance

  • Write programs faster than you sreen-scrape readelf/objdump.
  • Create and process ..., like Intel hex, Motorola srec, Texas Instruments Text (MSP430), and some historical (text) formats.
  • Decent AAABI (Arm Architecture Application Binary Interface) support.

Basic Examples

First of all, you need to import the library (of cause...)

>>> import objutils

Ok, let's start with the obligatory hello world:

>>> builder.addSection("Hello, world")
>>> builder.image
Section(address = 0X00000000, length = 12, data = 'Hello, world')

Let's have a look what we've just created:

>>> image = builder.image # Create a shortcut.
>>> image.hexdump()

Section #0000
-------------
00000000  48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21           |Hello, world!   |
---------------
       13 bytes
---------------

You may ask, what about addresses?

For a list of supported codecs run the following command:

About

Create/manipulate object-files like ELF, IEEE695, SRecord, IHex.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Batchfile 0.2%