From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id BF7F63858D33 for ; Tue, 14 Mar 2023 22:01:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF7F63858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id A5741120145; Tue, 14 Mar 2023 23:01:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1678831284; bh=GThvsG+LicUilMWQ8N9YF7bQeJE5vG/s3FndOGK+loU=; h=From:To:Subject; b=rlUHrCYdZ+PFTesDORhsoyZp2POywPbGADzwodq6hPKMbsr7NqXQscFn65UpAyFND ul0mL5eyXQ8nccEWyg6zsOJboklpGgpOvpOAFbxN9UGPz3G+FNtixkQPjbfTuVgXKv vFaEnxWpaZc9Xdk4A54qVkvs/6RXfjFxWeZAz7Q0= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com Subject: [PATCH v1 0/3 CHIP: Support vendor script libraries Date: Tue, 14 Mar 2023 23:01:11 +0100 Message-Id: <20230314220114.1117782-1-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167883128431.896576.3700636531047311677@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_FAIL,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Patchset 1 Introduce the CHIP command for non-MRI script files. The motivation is that you want to simplify supporting microcontrollers. You want include files that define the addresses for all peripherals and the memory/bank organisation. CHIP "" will add directories to the include directory list and will then include the ".inc" file. chip "" will add * "$PROJ_DIR" * "$LD_USER_DIR/" * "$LD_VENDOR_DIR/" to the search list for script files. The search order will be: "" "$PROJ_DIR" "$LD_USER_DIR/" "$LD_VENDOR_DIR/" This allows the vendor to supply a directory tree (LD_VENDOR_DIR). with a subdirectory for each chip. The subdirectory contains the ".inc" file which can have the flash sectors using the BANK command (patch posted to the link) as well as symbols for all the peripherals for the chip. Obviously, the vendor can place other files there as well. chip "at91sam7s64" would result in the linker including the file $LD_VENDOR_DIR/at91sam7s64/at91sam7s64.inc Since the vendor might be late with supplying include files for a chip, the user can create a similar directory in LD_USER_DIR. chip "at91sam7s64" This would result in the linker including the file $LD_USER_DIR/atmel/at91sam7s64/at91sam7s64.inc since LD_USER_DIR is before LD_VENDOR_DIR in the search order. If the user wants to simply put the file in their project they can rely on the search order, or put the file in $PROJ_DIR chip "at91sam7s64"; This would result in the linker including the file $PROJ_DIR/at91sam7s64.inc ================================= I am considering a further extension: chip "at91sam7s64", "atmel"; This would result in the linker including the file $LD_VENDOR_DIR/atmel/at91sam7s64/at91sam7s64.inc [PATCH v1 1/3] CHIP: ldlex.l [PATCH v1 2/3] CHIP: ldgram.y [PATCH v1 3/3] CHIP: language additions