### Validate LibrePCB Library with CLI Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Demonstrates how to use the LibrePCB command-line interface (CLI) to validate the integrity and compliance of a library. This involves installing the CLI tool via Docker and running validation commands. The output indicates success or failure, ensuring the library adheres to standards. ```bash # Install LibrePCB CLI tool (Ubuntu/Debian) docker pull librepcb/librepcb-cli:1.0.0-rc1 # Validate entire library for correctness librepcb-cli open-library --all --strict --check --minify-step . # Expected output on success: # Opening library '.'... # Checking 4 components... # Checking 5 devices... # Checking 3 symbols... # Success! Library passed all checks. # Minify library files to remove unnecessary whitespace librepcb-cli open-library --all --minify-step . ``` -------------------------------- ### Search LibrePCB Library Contents Using grep Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Provides examples of how to search for specific components within the LibrePCB library using standard Unix command-line tools like `grep`. It demonstrates searching for all RTC components and finding devices with a specific package type (SOIC16). ```bash # Search for all RTC components grep -r "rtc" cmp/*/component.lp | grep "name" # Output: # cmp/680a7fc2-bc4e-4dc1-b14e-22903ed0b96e/component.lp: (name "DS3231S/M+") # cmp/ea18cbe1-991b-40cd-9be8-863f6b91e319/component.lp: (name "DS3231MZ") # Find all devices with SOIC16 packages grep -r "SOIC16" dev/*/device.lp # Output: ``` -------------------------------- ### Create a Custom Component in LibrePCB with Lisp-like Syntax Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Guides through the process of creating a new custom component, specifically the MAX4372 current sense amplifier, within the LibrePCB library structure. This involves generating UUIDs, setting up directory structure, defining component properties and signals in a `.lp` file, validating the component, and version control operations. ```bash # Step 1: Generate new UUIDs for library elements uuidgen # Component UUID: e.g., 12345678-1234-1234-1234-123456789abc uuidgen # Symbol UUID uuidgen # Device UUID # Step 2: Create component directory structure mkdir -p cmp/12345678-1234-1234-1234-123456789abc touch cmp/12345678-1234-1234-1234-123456789abc/.librepcb-cmp # Step 3: Create component.lp file cat > cmp/12345678-1234-1234-1234-123456789abc/component.lp << 'EOF' (librepcb_component 12345678-1234-1234-1234-123456789abc (name "MAX4372") (description "Current Sense Amplifier, SOT23-5") (keywords "current,sense,amplifier") (author "Your Name") (version "0.1") (created 2025-11-01T12:00:00Z) (deprecated false) (category db02d12f-b838-404a-9c04-2873c8c5a439) (schematic_only false) (default_value "{{MPN or DEVICE or COMPONENT}}") (prefix "U") # Define signals with UUIDs (signal a1a1a1a1-a1a1-a1a1-a1a1-a1a1a1a1a1a1 (name "VCC") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal b2b2b2b2-b2b2-b2b2-b2b2-b2b2b2b2b2b2 (name "RS+") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal c3c3c3c3-c3c3-c3c3-c3c3-c3c3c3c3c3c3 (name "RS-") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal d4d4d4d4-d4d4-d4d4-d4d4-d4d4d4d4d4d4 (name "OUT") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal e5e5e5e5-e5e5-e5e5-e5e5-e5e5e5e5e5e5 (name "GND") (role passive) (required true) (negated false) (clock false) (forced_net "") ) # Map to symbol (create symbol separately) (variant f6f6f6f6-f6f6-f6f6-f6f6-f6f6f6f6f6f6 (norm "") (name "default") (description "") (gate g7g7g7g7-g7g7-g7g7-g7g7-g7g7g7g7g7g7 (symbol symbol-uuid-here) (position 0.0 0.0) (rotation 0.0) (required true) (suffix "") (pin pin1-uuid (signal a1a1a1a1-a1a1-a1a1-a1a1-a1a1a1a1a1a1) (text signal)) (pin pin2-uuid (signal b2b2b2b2-b2b2-b2b2-b2b2-b2b2b2b2b2b2) (text signal)) (pin pin3-uuid (signal c3c3c3c3-c3c3-c3c3-c3c3-c3c3c3c3c3c3) (text signal)) (pin pin4-uuid (signal d4d4d4d4-d4d4-d4d4-d4d4-d4d4d4d4d4d4) (text signal)) (pin pin5-uuid (signal e5e5e5e5-e5e5-e5e5-e5e5-e5e5e5e5e5e5) (text signal)) ) ) ) EOF # Step 4: Validate the new component librepcb-cli open-library --all --strict --check . # Step 5: Increment library version in library.lp sed -i 's/(version "0.1.3")/(version "0.1.4")/' library.lp # Step 6: Commit changes to version control git add cmp/12345678-1234-1234-1234-123456789abc/ library.lp git commit -m "Add MAX4372 current sense amplifier component" ``` -------------------------------- ### Integrate Maxim Library and Generate Outputs with LibrePCB CLI Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Demonstrates the complete workflow for using the Maxim.lplib library, from cloning it into the LibrePCB environment to generating manufacturing files. It covers component placement, BOM export, and Gerber file generation using the `librepcb-cli` tool. ```bash # Step 1: Clone library into LibrePCB libraries directory cd ~/.local/share/librepcb/libraries/git clone https://github.com/LibrePCB-Libraries/Maxim.lplib # Step 2: Open LibrePCB and import library librepcb-cli open-project myproject.lppz # Step 3: Add DS3231S RTC component to schematic # - Component UUID: 680a7fc2-bc4e-4dc1-b14e-22903ed0b96e # - Device UUID: 2f9ba9fa-5845-466a-b2e1-838abf941309 # - Selected Part: "DS3231S#T&R" (±3.5ppm, 0..+70°C, T&R 1000) # Signal connections required: # - VCC → Power supply (1.71V to 5.5V) # - GND → Ground # - VBAT → Backup battery (typically 3V CR2032) # - SCL → I²C clock (pull-up resistor required) # - SDA → I²C data (pull-up resistor required) # Optional connections: # - !INT/SQW → Interrupt or square wave output # - !RST → Manual reset input # - 32KHZ → 32.768 kHz output # Step 4: Generate BOM (Bill of Materials) librepcb-cli export-bom --output bom.csv myproject.lppz # BOM Output Example: # Designator,Quantity,Manufacturer,MPN,Description,Attributes # U1,1,Maxim Integrated,DS3231S#T&R,"RTC, I²C, ±3.5ppm, SOIC16","ACCURACY=±3.5ppm;TEMPERATURE_RANGE=0..+70°C;PACKAGING=T&R 1000" # Step 5: Generate Gerber files for manufacturing librepcb-cli export-gerber --output gerber/ myproject.lppz # Output: # gerber/ # ├── myproject-CopperTop.gbr # ├── myproject-CopperBottom.gbr # ├── myproject-SilkscreenTop.gbr # ├── myproject-SoldermaskTop.gbr # ├── myproject-BoardOutline.gbr # └── myproject-Drills.drl ``` -------------------------------- ### LibrePCB Library Directory Structure Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Illustrates the standard directory layout for a LibrePCB library project. It shows the organization of configuration files, component definitions, device definitions, and symbol definitions, all identified by UUIDs. This structure is essential for managing library elements and their relationships. ```bash # Library root structure . ├── .librepcb-lib # Empty marker file identifying LibrePCB library ├── library.lp # Library configuration and metadata ├── library.png # Library thumbnail/icon ├── cmp/ # Components directory │ └── [component-uuid]/ │ ├── .librepcb-cmp # Component marker file │ └── component.lp # Component definition ├── dev/ # Devices directory │ └── [device-uuid]/ │ ├── .librepcb-dev # Device marker file │ └── device.lp # Device definition └── sym/ # Symbols directory └── [symbol-uuid]/ ├── .librepcb-sym # Symbol marker file └── symbol.lp # Symbol definition # Example: Accessing DS3231S component # Component UUID: 680a7fc2-bc4e-4dc1-b14e-22903ed0b96e cat cmp/680a7fc2-bc4e-4dc1-b14e-22903ed0b96e/component.lp # Example: Listing all devices ls -1 dev/ # 03e0e648-e4a0-4691-8b71-dd11a0a5ccd5/ # DS18B20 Formed Leads ``` -------------------------------- ### LibrePCB Library Configuration (Lisp) Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Defines global metadata, author information, version, and dependencies for the Maxim Integrated LibrePCB library. This configuration is essential for the library's integration and management within LibrePCB. ```lisp (librepcb_library f71c3500-2399-4d74-945e-d6580e432c0d (name "Maxim Integrated") (description "Integrated circuits (unofficial).") (keywords "max,maxim") (author "LibrePCB") (version "0.1.3") (created 2018-11-09T19:13:27Z) (deprecated false) (url "https://github.com/LibrePCB-Libraries/Maxim.lplib") (dependency 326f091b-b715-44bf-b385-b613cd60d9f3) (dependency a9ddf0c6-9b1c-4730-b300-01b4f192ad40) (manufacturer "Maxim Integrated") ) ``` -------------------------------- ### Define DS3231S Device in LibrePCB Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt This Lisp code defines the DS3231S device, including its name, description, keywords, author, version, and category. It also links to the datasheet, specifies the component and package, and maps physical pads to signals for the SOIC16 package. Multiple 'part' definitions follow, specifying variants based on temperature range and packaging. ```lisp (librepcb_device 2f9ba9fa-5845-466a-b2e1-838abf941309 (name "DS3231S") (description "RTC, I²C, ±3.5ppm, SOIC16") (keywords "rtc,i2c") (author "U. Bruhin") (version "0.1") (created 2025-10-02T11:28:29Z) (deprecated false) (category db02d12f-b838-404a-9c04-2873c8c5a439) # Datasheet reference for technical documentation (resource "Datasheet DS3231S" (mediatype "application/pdf") (url "https://www.analog.com/media/en/technical-documentation/data-sheets/DS3231.pdf") ) # References to component and physical package (component 680a7fc2-bc4e-4dc1-b14e-22903ed0b96e) (package 8d5e3359-d26a-4715-89f6-4924211d48a7) # Physical pad-to-signal mappings for SOIC16 package (pad 05c15b4c-14cb-4fda-8291-ac33e9bffe8f (signal ab0091f9-5646-4c8e-80ad-cbc272672211)) # Pin 1 = SCL (pad 5c08d028-d3c5-4aea-8041-dc85e62cc7f7 (signal 3050433b-72d2-4ac0-8dfd-7d59934ce9f8)) # Pin 2 = SDA (pad 23842974-c084-43d2-8040-7274553ec4ab (signal 2348c1e4-7807-49dc-bdd7-8e96e729f471)) # Pin 3 = VBAT (pad 88579c67-17df-48cf-867b-a51577076eae (signal 58599e41-782a-409f-8cb1-aa9b770b041b)) # Pin 4 = GND (pad b044fd47-6454-4bfd-b0e8-264b6862939d (signal 8014a463-ada5-4484-b0d8-29d9083ddcb2)) # Pin 5 = !RST (pad 07d9c70b-744c-4262-b798-df52c800500f (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 6 = N.C. (pad 64c48581-7aa4-401c-8e47-33396c19ca9f (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 7 = N.C. (pad 5bdf257e-e650-4b9d-8f2b-6b15eadb463b (signal 0dde7cbf-190e-47f1-b5b6-b98cade3022b)) # Pin 8 = 32KHZ (pad a8e09d44-829e-4dad-a4ce-5d6e5f2bb527 (signal c09d8566-0b4c-4291-beb3-f582a13011b8)) # Pin 9 = !INT/SQW (pad 2fed4683-847c-46ad-85f7-facf104de6d5 (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 10 = N.C. (pad 7c12f6f1-279b-46f1-9972-76b9067efd45 (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 11 = N.C. (pad a2a18cc5-0066-407c-a34b-22b227006ddc (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 12 = N.C. (pad 9097ece6-28cc-4723-a0a9-f4b4ba5166ed (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 13 = N.C. (pad fee5d108-7cbb-4486-8349-7c4656c35c0a (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 14 = N.C. (pad 92672fd0-8fdb-4084-97fd-626982ddb78e (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54)) # Pin 15 = N.C. (pad b41dc949-993e-44f4-a81e-6caf7e273bc3 (signal 126974d4-de5c-4192-9350-3f28fa6ce7f3)) # Pin 16 = VCC # Commercial temperature range variant (part "DS3231S#" (manufacturer "Maxim Integrated") (attribute "ACCURACY" (type string) (unit none) (value "±3.5ppm")) (attribute "TEMPERATURE_RANGE" (type string) (unit none) (value "0..+70°C")) (attribute "PACKAGING" (type string) (unit none) (value "Tube 46")) ) # Commercial temperature range, tape and reel packaging (part "DS3231S#T&R" (manufacturer "Maxim Integrated") (attribute "ACCURACY" (type string) (unit none) (value "±3.5ppm")) (attribute "TEMPERATURE_RANGE" (type string) (unit none) (value "0..+70°C")) (attribute "PACKAGING" (type string) (unit none) (value "T&R 1000")) ) # Industrial temperature range variant (part "DS3231SN#" (manufacturer "Maxim Integrated") (attribute "ACCURACY" (type string) (unit none) (value "±3.5ppm")) (attribute "TEMPERATURE_RANGE" (type string) (unit none) (value "-45..+85°C")) (attribute "PACKAGING" (type string) (unit none) (value "Tube 46")) ) # Industrial temperature range, tape and reel (part "DS3231SN#T&R" (manufacturer "Maxim Integrated") (attribute "ACCURACY" (type string) (unit none) (value "±3.5ppm")) (attribute "TEMPERATURE_RANGE" (type string) (unit none) (value "-45..+85°C")) (attribute "PACKAGING" (type string) (unit none) (value "T&R 1000")) ) ) ``` -------------------------------- ### List Manufacturer Part Numbers Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt This snippet uses 'grep', 'sed', and 'sort' commands to extract and list unique manufacturer part numbers from device definition files within the library. ```bash grep -r '(part "' dev/*/device.lp | sed 's/.*part "/' | sed 's/".*//' | sort -u ``` -------------------------------- ### Extract Component UUIDs and Names Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt This snippet uses 'grep', 'awk', and 'tr' commands to extract component UUIDs and their corresponding names from component definition files. ```bash grep -A1 "^(librepcb_component" cmp/*/component.lp | grep "name" | awk '{print $2}' | tr -d '"') ``` -------------------------------- ### Define MAX1698 LED Regulator Symbol in Lisp Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Defines the schematic symbol for the MAX1698 LED Regulator using LibrePCB's Lisp-based syntax. This includes pin definitions, their positions, and graphical elements like the component outline and text fields. It is crucial for representing the component accurately in schematic diagrams. ```lisp (librepcb_symbol 588f7977-bf83-4d88-9339-fbab33031ef4 (name "MAX1698") (description "High-Efficiency Step-Up Current Regulator for LEDs.") (keywords "max1698,max1698a,led,step-up") (author "Danilo Bargen") (version "0.1") (created 2018-11-09T19:14:29Z) (deprecated false) (category cda9162b-fa94-4b99-abe0-00fc02c6f5c1) # Pin definitions with absolute positions (in millimeters) # Left side pins - inputs and control (pin d99aa9a7-16be-4d0a-9d97-af03fd40c877 (name "VCC") (position -10.16 7.62) (rotation 0.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin 84258809-e028-483b-a742-2bf55e26c4a1 (name "!SHDN") (position -10.16 2.54) (rotation 0.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin 67577041-1a5e-410a-b8e8-c8ead4adbcf2 (name "REF") (position -10.16 -2.54) (rotation 0.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin 97054d3a-0ef9-4d12-88e9-71bc23055a59 (name "ADJ") (position -10.16 -5.08) (rotation 0.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin ad0e4453-3dd2-4af4-b0a7-2ee7352143de (name "GND") (position -10.16 -7.62) (rotation 0.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) # Right side pins - outputs and feedback (pin dcccf772-6865-4941-a93c-4770fb69038a (name "EXT") (position 10.16 7.62) (rotation 180.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin 694e68ad-2c8e-4c43-919e-51f08dad73f8 (name "CS") (position 10.16 2.54) (rotation 180.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin bfb396a1-087a-4ad3-a63c-d1dd56da0d1a (name "FB") (position 10.16 -2.54) (rotation 180.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) (pin 8a45c99e-25a7-490a-89d8-89dbe0914c17 (name "PGND") (position 10.16 -7.62) (rotation 180.0) (length 2.54) (name_position 3.81 0.0) (name_rotation 0.0) (name_height 2.5) (name_align left center) ) # Graphical elements - IC outline rectangle (polygon 72992bad-21b9-4262-9a5d-54a6746a69ff (layer sym_outlines) (width 0.254) (fill false) (grab_area true) (vertex (position -7.62 10.16) (angle 0.0)) (vertex (position 7.62 10.16) (angle 0.0)) (vertex (position 7.62 -10.16) (angle 0.0)) (vertex (position -7.62 -10.16) (angle 0.0)) (vertex (position -7.62 10.16) (angle 0.0)) ) # Template text fields for component name and value (text e2979c0b-6a4d-4ea2-a021-54767b167d3b (layer sym_names) (value "{{NAME}}") (align left bottom) (height 2.54) (position -7.62 10.16) (rotation 0.0) ) (text 3ee5076c-d937-4a00-b085-6a0477bda23c (layer sym_values) (value "{{VALUE}}") (align left top) (height 2.54) (position -7.62 -10.16) (rotation 0.0) ) ) ``` -------------------------------- ### LibrePCB Component Definition: DS3231S/M+ RTC (Lisp) Source: https://context7.com/librepcb-libraries/maxim.lplib/llms.txt Defines the abstract component for the DS3231S/M+ Real-Time Clock (RTC) IC, including its logical signals, pin requirements, and schematic symbol mapping. This definition is used in LibrePCB for schematic and PCB layout. ```lisp (librepcb_component 680a7fc2-bc4e-4dc1-b14e-22903ed0b96e (name "DS3231S/M+") (description "RTC, I²C, SOIC16") (keywords "rtc,i2c") (author "U. Bruhin") (version "0.1") (created 2025-10-02T08:00:27Z) (deprecated false) (category db02d12f-b838-404a-9c04-2873c8c5a439) (schematic_only false) (default_value "{{MPN or DEVICE or COMPONENT}}") (prefix "U") # Power signals - required for operation (signal 126974d4-de5c-4192-9350-3f28fa6ce7f3 (name "VCC") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal 2348c1e4-7807-49dc-bdd7-8e96e729f471 (name "VBAT") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal 58599e41-782a-409f-8cb1-aa9b770b041b (name "GND") (role passive) (required true) (negated false) (clock false) (forced_net "") ) # I²C communication bus - required for operation (signal ab0091f9-5646-4c8e-80ad-cbc272672211 (name "SCL") (role passive) (required true) (negated false) (clock false) (forced_net "") ) (signal 3050433b-72d2-4ac0-8dfd-7d59934ce9f8 (name "SDA") (role passive) (required true) (negated false) (clock false) (forced_net "") ) # Control and output signals - optional (signal c09d8566-0b4c-4291-beb3-f582a13011b8 (name "!INT/SQW") (role passive) (required false) (negated false) (clock false) (forced_net "") ) (signal 8014a463-ada5-4484-b0d8-29d9083ddcb2 (name "!RST") (role passive) (required false) (negated false) (clock false) (forced_net "") ) (signal 0dde7cbf-190e-47f1-b5b6-b98cade3022b (name "32KHZ") (role passive) (required false) (negated false) (clock false) (forced_net "") ) (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54 (name "N.C.") (role passive) (required true) (negated false) (clock false) (forced_net "") ) # Variant maps signals to symbol pins (variant 43e7a9ef-2484-45b1-9b3b-a84755335c9a (norm "") (name "default") (description "") (gate 5a9c05d3-c85b-41bf-8caf-3e67663240de (symbol 978bae4f-af5a-4a95-8fdf-f3d1e160f277) (position 0.0 0.0) (rotation 0.0) (required true) (suffix "") (pin 3948f2c3-e041-45de-a878-e4f0a61be9d3 (signal 126974d4-de5c-4192-9350-3f28fa6ce7f3) (text signal)) (pin c8a7fb2f-9f3e-49c0-ab7d-2a556fcbb3aa (signal 2348c1e4-7807-49dc-bdd7-8e96e729f471) (text signal)) (pin 8ccc8534-4cc1-46b0-ad89-d0a11f9703d4 (signal 58599e41-782a-409f-8cb1-aa9b770b041b) (text signal)) (pin 97c04e83-f153-4480-8b73-14b6a958de3b (signal ab0091f9-5646-4c8e-80ad-cbc272672211) (text signal)) (pin 94ad24f8-a28d-4b6a-88a5-394a3ba336d8 (signal 3050433b-72d2-4ac0-8dfd-7d59934ce9f8) (text signal)) (pin 3f85b429-6ac6-410e-aa68-9d182fa84e4c (signal c09d8566-0b4c-4291-beb3-f582a13011b8) (text signal)) (pin bf5d332b-a7b4-4852-89ea-c83d6998b090 (signal 8014a463-ada5-4484-b0d8-29d9083ddcb2) (text signal)) (pin 78a32833-aeb6-42dc-be01-b14d03f05eb4 (signal 0dde7cbf-190e-47f1-b5b6-b98cade3022b) (text signal)) (pin 17ca9d8d-105a-4828-a06f-a071fc8e67c7 (signal 8f097fd8-e869-4e79-9ae3-ff4b8ff77e54) (text signal)) ) ) ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.