[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [OpenOCD-devel] [openocd:tickets] #250 Raw ELF is uploaded
From:       mauro via OpenOCD-devel <openocd-devel () lists ! sourceforge ! net>
Date:       2019-09-30 11:09:18
Message-ID: /p/openocd/tickets/250/8775836a7829d0b8a5c44f08106ad9e1aa3c2338.tickets () openocd ! p ! sourceforge ! net
[Download RAW message or body]

[Attachment #2 (multipart/related)]


--==============‘16321075312015013=MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

adding `-nmagic` to linker parameter fixed the issue; the booloader is not overridden \
and only necessary binary is uploaded.

Interesting I need this option for stm32f1 but not for stm32f4


---

** [tickets:#250] Raw ELF is uploaded**

**Status:** new
**Milestone:** 0.9.0
**Created:** Wed Sep 11, 2019 10:05 AM UTC by mauro
**Last Updated:** Wed Sep 11, 2019 10:05 AM UTC
**Owner:** nobody


Hello, i have an issue with "Open On-Chip Debugger 0.10.0". the following:

~~~
/usr/bin/openocd -c "tcl_port disabled" -s /usr/share/openocd/scripts -c "gdb_port \
3333" -c "telnet_port 4444" -f debugger.cfg -c "program \"compiled.elf\"" -c reset -c \
shutdown ~~~

works fine if the binary start from the beninning of the flash(0x08000000); but if i \
start from 0x08004000 for example, instead of the binary, the raw ELF will be \
uploaded starting from position 0x08000000. Thats it, the file is uploaded 1:1 \
instead of coverted to binary and offested of 0x4000.

My suspicion is that the elf format, despite the extension and correctly starting \
with bytes 0x45 0x4C 0x45 (ELF) is seen as binary and uploaded at the default flash \
address.

Interestingly I have another project that works fine with the exact same command; \
main differences are that start from 0x08040000, and is targeting a stm32F4 instead \
of a stm32F1

debugger.cfg:
~~~
source [find interface/stlink-v2.cfg]
transport select hla_swd
set WORKAREASIZE 0x10000
source [find target/stm32f1x.cfg]
reset_config none separate
~~~


---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is subscribed \
to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at \
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a mailing \
                list, you can unsubscribe from the mailing list.
--==============‘16321075312015013=MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<div class="markdown_content"><p>adding <code>-nmagic</code> to linker parameter \
fixed the issue; the booloader is not overridden and only necessary binary is \
uploaded.</p> <p>Interesting I need this option for stm32f1 but not for stm32f4</p>
<hr/>
<p><strong> <a class="alink" \
href="https://sourceforge.net/p/openocd/tickets/250/">[tickets:#250]</a> Raw ELF is \
uploaded</strong></p> <p><strong>Status:</strong> new<br/>
<strong>Milestone:</strong> 0.9.0<br/>
<strong>Created:</strong> Wed Sep 11, 2019 10:05 AM UTC by mauro<br/>
<strong>Last Updated:</strong> Wed Sep 11, 2019 10:05 AM UTC<br/>
<strong>Owner:</strong> nobody</p>
<p>Hello, i have an issue with "Open On-Chip Debugger 0.10.0". the following:</p>
<div class="codehilite"><pre><span></span><span class="o">/</span><span \
class="n">usr</span><span class="o">/</span><span class="n">bin</span><span \
class="o">/</span><span class="n">openocd</span> <span class="o">-</span><span \
class="k">c</span> <span class="ss">"tcl_port disabled"</span> <span \
class="o">-</span><span class="n">s</span> <span class="o">/</span><span \
class="n">usr</span><span class="o">/</span><span class="k">share</span><span \
class="o">/</span><span class="n">openocd</span><span class="o">/</span><span \
class="n">scripts</span> <span class="o">-</span><span class="k">c</span> <span \
class="ss">"gdb_port 3333"</span> <span class="o">-</span><span class="k">c</span> \
<span class="ss">"telnet_port 4444"</span> <span class="o">-</span><span \
class="n">f</span> <span class="n">debugger</span><span class="p">.</span><span \
class="n">cfg</span> <span class="o">-</span><span class="k">c</span> <span \
class="ss">"program \"</span><span class="n">compiled</span><span \
class="p">.</span><span class="n">elf</span><span class="err">\</span><span \
class="ss">""</span> <span class="o">-</span><span class="k">c</span> <span \
class="k">reset</span> <span class="o">-</span><span class="k">c</span> <span \
class="n">shutdown</span> </pre></div>


<p>works fine if the binary start from the beninning of the flash(0x08000000); but if \
i start from 0x08004000 for example, instead of the binary, the raw ELF will be \
uploaded starting from position 0x08000000. Thats it, the file is uploaded 1:1 \
instead of coverted to binary and offested of 0x4000.</p> <p>My suspicion is that the \
elf format, despite the extension and correctly starting with bytes 0x45 0x4C 0x45 \
(ELF) is seen as binary and uploaded at the default flash address.</p> \
<p>Interestingly I have another project that works fine with the exact same command; \
main differences are that start from 0x08040000, and is targeting a stm32F4 instead \
of a stm32F1</p> <p>debugger.cfg:</p>
<div class="codehilite"><pre><span></span><span class="k">source</span> <span \
class="p">[</span><span class="n">find</span> <span class="n">interface</span><span \
class="o">/</span><span class="n">stlink</span><span class="o">-</span><span \
class="n">v2</span><span class="p">.</span><span class="n">cfg</span><span \
class="p">]</span> <span class="n">transport</span> <span class="k">select</span> \
<span class="n">hla_swd</span> <span class="k">set</span> <span \
class="n">WORKAREASIZE</span> <span class="mi">0</span><span class="n">x10000</span> \
<span class="k">source</span> <span class="p">[</span><span class="n">find</span> \
<span class="n">target</span><span class="o">/</span><span \
class="n">stm32f1x</span><span class="p">.</span><span class="n">cfg</span><span \
class="p">]</span> <span class="n">reset_config</span> <span class="k">none</span> \
<span class="n">separate</span> </pre></div>


<hr/>
<p>Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is \
subscribed to <a href="https://sourceforge.net/p/openocd/tickets/">https://sourceforge.net/p/openocd/tickets/</a></p>
 <p>To unsubscribe from further messages, a project admin can change settings at <a \
href="https://sourceforge.net/p/openocd/admin/tickets/options.">https://sourceforge.net/p/openocd/admin/tickets/options.</a> \
                Or, if this is a mailing list, you can unsubscribe from the mailing \
                list.</p></div>
--==============‘16321075312015013==--





_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic