erichVK5 / BXL2text

A utility to convert huffman encoded BXL schematic and footprint files to plain text, gEDA PCB (.fp) and gschem (.sym), and KiCad (.lib) formats
GNU General Public License v2.0
22 stars 9 forks source link

BXL to kicad for BGA exporting wrong pin pad numbers #8

Closed samarjit closed 6 years ago

samarjit commented 6 years ago

I tried converting AM3352_ZCE_298.bxl to kicad lib but the pin numbering is not retained. Pin pad numbers became numbers. These should be letters followed by numbers.

X AIN0 1 0 0 300 R 50 50 1 1 P
X AIN1 2 0 -100 300 R 50 50 1 1 P
X AIN2 3 0 -200 300 R 50 50 1 1 P
X AIN3 4 0 -300 300 R 50 50 1 1 P
X AIN4 5 0 -400 300 R 50 50 1 1 P
X AIN5 6 0 -500 300 R 50 50 1 1 P
X AIN6 7 0 -600 300 R 50 50 1 1 P

Instead these should be like

X AIN0 B8 0 0 300 R 100 100 2 0 U 
X AIN1 A11 0 -100 300 R 100 100 2 0 U 
X AIN2 A8 0 -200 300 R 100 100 2 0 U 
X AIN3 B11 0 -300 300 R 100 100 2 0 U 
X AIN4 C8 0 -400 300 R 100 100 2 0 U 
X AIN5 B12 0 -500 300 R 100 100 2 0 U 
X AIN6 A10 0 -600 300 R 100 100 2 0 U 
X AIN7 A12 0 -700 300 R 100 100 2 0 U 

I am attaching the bxl file and the converted lib file.

AM3352ZCE.zip

erichVK5 commented 6 years ago

I modified the kicad export code

we now get output along the lines of:

X AIN0 B8 0 0 300 R 50 50 1 1 P X AIN1 A11 0 -100 300 R 50 50 1 1 P X AIN2 A8 0 -200 300 R 50 50 1 1 P X AIN3 B11 0 -300 300 R 50 50 1 1 P X AIN4 C8 0 -400 300 R 50 50 1 1 P X AIN5 B12 0 -500 300 R 50 50 1 1 P X AIN6 A10 0 -600 300 R 50 50 1 1 P X AIN7 A12 0 -700 300 R 50 50 1 1 P X DDR_A0 F3 0 -900 300 R 50 50 1 1 P X DDR_A1 J2 0 -1000 300 R 50 50 1 1 P X DDR_A2 D1 0 -1100 300 R 50 50 1 1 P X DDR_A3 B3 0 -1200 300 R 50 50 1 1 P

Let me know if it does not behave.

Cheers,

Erich

samarjit commented 6 years ago

Awesome, it works now. I am able to import it in kicad4.0.7 and it looks perfect. I will try in the kicad nightly once I have that installed.

Don't worry too much about this below violations, they appear for other libs too. Previously this was throwing errors and exiting prematurely. Now it is executing completely and then exiting.

c:\kicad-library-utils\schlib
> checklib.py ..\..\BXL2text\AM3352_ZCE_298.lib
DCM file 'C:\BXL2text\AM3352_ZCE_298.dcm' does not exist
Checking symbol 'AM3352_ZCE_298_B':
  Violating S3.1
  Violating S5.2
  Violating S6.2
  Violating S6.3
Checking symbol 'AM3352_ZCE_298_A':
  Violating S3.1
  Violating S5.2
  Violating S6.2
  Violating S6.3
Checking symbol 'AM3352_ZCE_298_C':
  Violating S3.1
  Violating S5.2
  Violating S6.2
  Violating S6.3
Checking symbol 'AM3352_ZCE_298':
  Violating S3.1
  Violating S5.2
  Violating S6.2
  Violating S6.3
Checking symbol 'AM3352_ZCE_298_00':
  Violating S3.1
  Violating S5.2
  Violating S6.2
  Violating S6.3
Checking symbol 'AM3352_ZCE_298_01':
  Violating S3.1
  Violating S4.2
  Violating S4.4
  Violating S5.2
  Violating S6.2
  Violating S6.3