The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

EAGLE 6.x Invalid Device Names: Repair Thereof

It seems that a much older version of Eagle allowed device names along the lines of ELECTRET MIC that contained blanks and worked perfectly at the time. Since then, the rules changed to prohibit blanks, but the EAGLE 5.x series evidently allowed those names to exist as long as they weren’t used in the schematic or touched in the library editor. In 6.x, however, you can’t even load the library without triggering an error message.

Because 6.x won’t load the library, you can’t use the library editor to remove the blank.

Because the most recent version of 5.x kvetches about the blank, you can’t use the library editor to remove the blank.

Having only two offending device names, I figured I could use a hex editor to jam a hyphen in place of the blanks and be done with it. Come to find out that EAGLE (wisely) wraps a checksum around the binary library file to detect such changes and prevent the files from loading. I think that’s an excellent idea, even if it was inconvenient in this situation.

Fortunately, 6.x both complains about the problem and offers up a “text editor” window with the complete XML source code for the library that it converted from the 5.x binary format.

So:

  • Copy-and-paste the text into an editor that supports highlighted XML editing
  • Find the offending device names
  • Change the blanks to hyphens
  • Rename the original custom.lbr to custom.lbr.bin
  • Save the modified XML as custom.lbr

Done!

Comments

2 responses to “EAGLE 6.x Invalid Device Names: Repair Thereof”

  1. Kuba Avatar
    Kuba

    Hmm, is that checksum really wise? I don’t know. I’d put one around every part itself, and around whatever index structure there was in the file. Having one around the entire file — that can’t be a checksum/CRC anymore. It needs to be a large hash/digest – 128 bits at the minimum.

    1. Ed Avatar

      that can’t be a checksum/CRC anymore

      I used “checksum” in the generic sense: a way to detect any change to the file’s contents. Given that they had the good sense to do it, I’d give ’em the benefit of the doubt and assume they got it right!