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 AD9B23858D33 for ; Tue, 14 Mar 2023 22:06:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD9B23858D33 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 [10.175.196.145] (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id EA54C120556; Tue, 14 Mar 2023 23:06:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1678831601; bh=P+2fZIvsbYBlYjQA+HUg5VGKijozh8F3l92us1GKj+o=; h=Subject:To:From; b=fukdBIth9LWcBUjEYiVEeaAr2gpCb3T4+Ks3OfaSPus6FgTHBWA6jQbfDETRNt229 gLPE7tt6+A2lxEbHli2laN/0zipVu2r0zzup5ONud1jkvlLfsHqWryBFYCQd5lBU16 pKhTh0Tlm3aTCN8ZZTBOzRISmUKQ2+BvhN7fSFLY= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=[10.175.196.145] Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) Message-ID: <1eb864d2-3693-533f-0136-b6e22d3e5ae6@emagii.com> Date: Tue, 14 Mar 2023 23:06:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1 0/3 CHIP: Support vendor script libraries Content-Language: en-US To: binutils@sourceware.org Cc: nickc@redhat.com References: <20230314220114.1117782-1-binutils@emagii.com> From: Ulf Samuelsson In-Reply-To: <20230314220114.1117782-1-binutils@emagii.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <167883160067.900997.222145506043219314@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: There are no NEWS, ld.texi or testsuite for these patches yet since they are just RFCs at the moment. Need to get the copyright issue sorted out. I finally got reply from FSF on Copyrights, but they think it could take some time to process. Best Regards Ulf Samuelsson On 2023-03-14 23:01, Ulf Samuelsson via Binutils wrote: > 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 >