delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/07/11/15:11:13

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=/DaaamCEv816CRwavxEate5IlfDO3a/414P8HrVOqO4=;
b=lAMyNPciPxgTbb2chIBvAFLqGyqlITLQ0S+U21jWVjDGxOaF9vEDrAALvDQoyg0M9F
wE2tPSJRJuHL01A/BSqgLwHMhsWPREkoZgtm+aQI7WG28BRZjMD+ml5B39dwuxo12tLZ
taKY3zxBCU3hYgl+BWlLOmL2orC7EhDXsZmFPXBn8btOdHaxRho9yhYGOfAjwB957QRa
AgJJY6NLUhi3dAlY1KKqbaaI39otewBQpZgPuzPfT/siNPhvgbL7mAghQIPk4jhmGccS
2lx0AMt2lLpG0Yj9N6EeBFEE5Cf4lxUGmL259C2rVs3KziPamk2HqHZbUwSlw+2gHqsj
VUBA==
MIME-Version: 1.0
X-Received: by 10.52.165.239 with SMTP id zb15mr18975222vdb.44.1373569855752;
Thu, 11 Jul 2013 12:10:55 -0700 (PDT)
In-Reply-To: <51DEFB77.8090905@sonic.net>
References: <CALSZ9gpTm-H5X4X9JNgV66MfwTghY0=rR6fiwAZebDsanqcK6Q AT mail DOT gmail DOT com>
<CAC4O8c9vYvu=NMndEZoaZPT2+L-qxxPmYCzJuexiG2zSApxinA AT mail DOT gmail DOT com>
<CALSZ9gqVdTSF_1XUavdzY8vLKrbxZnRjWc-s6qVH+F1OC2BG=g AT mail DOT gmail DOT com>
<CANqhZFy=zfFNkCrC3wnCqVdY7s7uae5qUBALjCnPp3wY=O1v2g AT mail DOT gmail DOT com>
<CALSZ9gqifzjNpyO3VLpoMo+STObwGfEf1tb7CKypd=ytXOyxVg AT mail DOT gmail DOT com>
<CANqhZFyCzmLCEd3mziyWJCnd7=+2vTsktaJ7u6y+rkQRFns86Q AT mail DOT gmail DOT com>
<CALSZ9go46rXbLT5obRSxjXgC27Xrx-hse-vOEVHrHw7ieJf0bg AT mail DOT gmail DOT com>
<CANqhZFzu_YLUVaeOfrdTW8LQTZmTVLkr46tpOJre4XNeSk6+VA AT mail DOT gmail DOT com>
<CALSZ9gr8xG+60RPj84z90qg7snwZqq=Z1wK+W3TThvzAsECGQA AT mail DOT gmail DOT com>
<51DEFB77 DOT 8090905 AT sonic DOT net>
Date: Thu, 11 Jul 2013 15:10:55 -0400
Message-ID: <CALSZ9grGrmc-T1Z6bUgFwj2z-1GmxwgXm3JfU9T9vD0fJ=DAzw@mail.gmail.com>
Subject: Re: [geda-user] Help storing a 7KB wave file into memory
From: Rob Butts <r DOT butts2 AT gmail DOT com>
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--001a11c24eb053924e04e14127f4
Content-Type: text/plain; charset=ISO-8859-1

BTW -- Now would be a good time to take a quick peek at how many bytes your
audio file is, and how much flash space you have in your microcontroller.

The raw file is 6.8 kB which I would provide eeprom for.

With AVR's, you would typically put just enough linkage dictionary around
the binary blob to create a data section (using a simple tool).

That is quite a mouth full.  Linkage dictionary?

I'm learning a lot just from this question.  I don't use linux much only
for schematic capture and board layout.  From going through the emacs info
I learned that it can be an IDE.  Is this an IDE that most people use to
write c code in?  I should be able to write a short c program to read that
file correct?  I'm currently trying to learn more about emacs.

Thanks for your help.


On Thu, Jul 11, 2013 at 2:37 PM, Dave Curtis <davecurtis AT sonic DOT net> wrote:

>  On 07/11/2013 10:15 AM, Rob Butts wrote:
>
>  All good questions!
>
>  I'm not sure how I'm going to read that file into memory.  At this point
> I'd like to see what is in it and thought it might help me figure out how
> to read it into memory.
>
>  I'll be using a microchip micro.  I've never done anything like this so
> I'm just trying to figure it out.
>
> What you have is a binary data file that you want to flash into the
> microprocessor somehow, in such a way that your program can find it. I know
> how to do this for AVR's... but don't use Microchip processors, so you'll
> need to find the equivalent.
>
> You have two issues to solve:
>
> 1) get the binary data into a format that can be incorporated into the
> binary image of your program, at which point the programmer should be happy
> to stuff it into the chip.
>
> 2) make the address of the binary data available to your program as a
> pointer.
>
> With AVR's, you would typically put just enough linkage dictionary around
> the binary blob to create a data section (using a simple tool). This
> becomes just another .o into the linker.  The C program makes an external
> reference to the beginning of the data section to set a pointer.  Drop the
> whole works into the linker so that it can sew together the external
> references, and from there on its just the normal flow for flashing an
> image.
>
> BTW -- Now would be a good time to take a quick peek at how many bytes
> your audio file is, and how much flash space you have in your
> microcontroller.
>
> -dave
>
>
>
>
>
>
> On Thu, Jul 11, 2013 at 12:37 PM, Gareth Edwards <
> gareth AT edwardsfamily DOT org DOT uk> wrote:
>
>> On 11 July 2013 17:17, Rob Butts <r DOT butts2 AT gmail DOT com> wrote:
>> > That gave me a .raw file but I can't open it to see the data and if I
>> double
>> > click on the file I get an Open With window suggesting a slew of
>> > applications.
>> >
>>
>>  The bytes of that file are the bytes of the audio data. Why do you
>> need to see them? (hexl-mode in Emacs or any other hex editor will let
>> you if you really think you need to)
>>
>> You said you were going to "store it in memory on a board and then
>> DtoA it to a speaker when needed." - how do you intend to get it into
>> the board memory?
>>
>
>
>

--001a11c24eb053924e04e14127f4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>BTW -- Now would be a good time to take a q=
uick peek at how many
    bytes your audio file is, and how much flash space you have in your
    microcontroller.<br><br></div>The raw file is 6.8 kB which I would prov=
ide eeprom for.<br><br>With AVR&#39;s, you would typically put just enough =
linkage dictionary
    around the binary blob to create a data section (using a simple
    tool).<br><br></div>That is quite a mouth full.=A0 Linkage dictionary?=
=A0 <br><br>I&#39;m learning a lot just from this question.=A0 I don&#39;t =
use linux much only for schematic capture and board layout.=A0 From going t=
hrough the emacs info I learned that it can be an IDE.=A0 Is this an IDE th=
at most people use to write c code in?=A0 I should be able to write a short=
 c program to read that file correct?=A0 I&#39;m currently trying to learn =
more about emacs.<br>
<br></div>Thanks for your help.<br></div><div class=3D"gmail_extra"><br><br=
><div class=3D"gmail_quote">On Thu, Jul 11, 2013 at 2:37 PM, Dave Curtis <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:davecurtis AT sonic DOT net" target=3D"_blan=
k">davecurtis AT sonic DOT net</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF"><div class=3D"im">
    <div>On 07/11/2013 10:15 AM, Rob Butts
      wrote:<br>
    </div>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div>
          <div>All good questions!<br>
            <br>
          </div>
          I&#39;m not sure how I&#39;m going to read that file into memory.=
=A0 At
          this point I&#39;d like to see what is in it and thought it might
          help me figure out how to read it into memory.<br>
          <br>
        </div>
        I&#39;ll be using a microchip micro.=A0 I&#39;ve never done anythin=
g like
        this so I&#39;m just trying to figure it out.<br>
      </div>
    </blockquote></div>
    What you have is a binary data file that you want to flash into the
    microprocessor somehow, in such a way that your program can find it.
    I know how to do this for AVR&#39;s... but don&#39;t use Microchip
    processors, so you&#39;ll need to find the equivalent.<br>
    <br>
    You have two issues to solve:<br>
    <br>
    1) get the binary data into a format that can be incorporated into
    the binary image of your program, at which point the programmer
    should be happy to stuff it into the chip.<br>
    <br>
    2) make the address of the binary data available to your program as
    a pointer.<br>
    <br>
    With AVR&#39;s, you would typically put just enough linkage dictionary
    around the binary blob to create a data section (using a simple
    tool). This becomes just another .o into the linker.=A0 The C program
    makes an external reference to the beginning of the data section to
    set a pointer.=A0 Drop the whole works into the linker so that it can
    sew together the external references, and from there on its just the
    normal flow for flashing an image.<br>
    <br>
    BTW -- Now would be a good time to take a quick peek at how many
    bytes your audio file is, and how much flash space you have in your
    microcontroller. <br><span class=3D"HOEnZb"><font color=3D"#888888">
    <br>
    -dave</font></span><div class=3D"im"><br>
    <br>
    =A0 <br>
    <blockquote type=3D"cite">
      <div class=3D"gmail_extra"><br>
        <br>
        <div class=3D"gmail_quote">On Thu, Jul 11, 2013 at 12:37 PM,
          Gareth Edwards <span dir=3D"ltr">&lt;<a href=3D"mailto:gareth AT edw=
ardsfamily.org.uk" target=3D"_blank">gareth AT edwardsfamily DOT org DOT uk</a>&gt;</s=
pan>
          wrote:<br>
          <blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>On 11 July 2013 17:17, Rob Butts &lt;<a href=3D"mailto:r.b=
utts2 AT gmail DOT com" target=3D"_blank">r DOT butts2 AT gmail DOT com</a>&gt;
              wrote:<br>
              &gt; That gave me a .raw file but I can&#39;t open it to see
              the data and if I double<br>
              &gt; click on the file I get an Open With window
              suggesting a slew of<br>
              &gt; applications.<br>
              &gt;<br>
              <br>
            </div>
            The bytes of that file are the bytes of the audio data. Why
            do you<br>
            need to see them? (hexl-mode in Emacs or any other hex
            editor will let<br>
            you if you really think you need to)<br>
            <br>
            You said you were going to &quot;store it in memory on a board
            and then<br>
            DtoA it to a speaker when needed.&quot; - how do you intend to
            get it into<br>
            the board memory?<br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div>

</blockquote></div><br></div>

--001a11c24eb053924e04e14127f4--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019