On Mon, Sep 30, 2013 at 12:56 PM, Paul Fertser <[email protected]> wrote:
> Hi,
>
> Just for the kicks I decided to try cross-building for arm-none-eabi
> with newlib.
>
> Basically, LIBS="-lc -lnosys" ./configure --host=arm-none-eabi,
> disabling eventloop and file jimtcl modules (and making its final
> linking step manually since it doesn't honour LIBS), adding few stubs,
> I got it built and linking. Neither TCP/IP stack nor USB ACM are
> included but adding lwIP for ethernet version or libopencm3 usb
> library for a USB variant wouldn't be too hard.
>
> The conclusion so far: full OpenOCD seems to be too big to fit
> embedded flash of current commonly used microcontrollers but it also
> provides unmatched functionality. Sacrificing some features it can
> probably be made to work on 1M devices such as STM32F40[57]; an
> STM32F427 (2M) board might be able to run it all.
>
Are you thinking Black Magic Probe on steroids here? :)
Unfortunately, current state of OpenOCD would be awkward to run like this,
because of the separation between configuration and execution phase. It
would require a more dynamic OpenOCD that can be started completely blank
and have targets created and removed at runtime. In fact, that would be
nicer even in the normal use case.
And flash probably won't be the limit, but heap.
> $ arm-none-eabi-size openocd
> text data bss dec hex filename
> 1406588 16384 100480 1523452 173efc openocd
>
Was this at the default -O2 optimization? You could try -Os and also
compile and link with -flto. I think I saw some unusable adapter drivers
enabled as well. If OpenOCD is to run on an embedded host, it probably
makes most sense to write a minidriver instead of a regular JTAG adapter
driver (like the zy1000). Then you would get rid of the entire ugly JTAG
queue layer. As above, this would actually be preferable even for the
desktop version.
/Andreas
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel