Giter Site home page Giter Site logo

bin2header's Issues

Add few more options

Add a fewoptions to make tool more usefull:
-add option to start with an offset and for only given length
-add option to pack data into 16/32 bit word (and swap endianess if needed)

bin2header generates invalid identifier names

I have a series of files called things like 36.bin - bin2header will generate an array called 36 with #defines for 36_H. Neither of those are valid names.

It should really know what a valid C identifier looks like to warn you. Or perhaps allow the user to supply a name on the command line? Or add a prefix (e.g. DATA) to the front of names starting with a digit?

File Size Limitation

As reported by a user, it appears that bin2header has a limit on how large of a file it can handle. This limitation may be different depending on operating system & available system resources. I have mostly tested the program with image files, & probably nothing bigger (at most) than a couple megabytes. It appears that when the program attempts to load a file larger than it can handle, it crashes without any helpful information about the error.

There are two things that I want to do:

First, have the program recognize when it cannot handle a file due to size limitations & output error details for the user without crashing.

Second, I want to increase, or perhaps abolish, the limitation on file size. Off-hand, I think a solution would be to set a chunk size for the program to process at a single time, rather than attempting the load the entire file all at once. Perhaps this chunk size could be manually adjusted by the user.

Original issue on SourceForge: https://sourceforge.net/p/bin2header/tickets/1/

NOT AN ISSUE but how does this work

i am new to these kind of stuff but i can't get it to run yesterday i waisted 3 hours on this and today already 2 and i can't get my grasp on what it is i downloaded this git and also the sourceforge version.

:(
greeting
marc

does not work for SDD1306 display

I'm trying to convert a BMP in 128x32 size
for use a custom Adafruit splash screen .
Example https://github.com/adafruit/Adafruit_SSD1306/tree/master/examples/ssd1306_128x32_i2c
replace const uint8_t PROGMEM splash2_data[] in /home/youruser/Arduino/libraries/Adafruit_SSD1306/Splash.h
I got a distorted pixel mesh .

Original splash :
const uint8_t PROGMEM splash2_data[] = { 0b00000000,0b00000000,0b01100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000, 0b00000000,0b00000000,0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,

Updated from what I got from bin2header :

const uint8_t PROGMEM splash2_data[] = { 0x42, 0x4d, 0x8a, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x04, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x23, 0x2e, 0x00, 0x00, 0x23, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

Comment shows data context

A comment at the end of any line should show the containing data as ascii chars (dot for not printable chars).

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.