On Tue, Jun 3, 2014 at 1:10 PM, Mark Rages <markra...@gmail.com> wrote:
> On Tue, Jun 3, 2014 at 11:57 AM, DJ Delorie <d...@redhat.com> wrote:
>
>>
>> > Is there any best way to pass data in / out of the simulator?  I
>> > guess I can use the "run" program and set up a memory region for the
>> > input data, and write a little main() to feed it into through the
>> > algorithm.  But if there's an easier way, I'd like to hear about it
>> > before I do it the hard way.
>>
>> If you link in your input data via a linker script, and write() out
>> the output data to stdout and redirect it, it should be pretty easy to
>> set up.
>>
>
> Wait, a write() syscall made in the msp430 binary can show up on stdout of
> the simulator?  How does that work?  Do I need to link in any special
> function for that?

You need to be using msp430-elf-gcc for that feature, not mspgcc as
described in your first email.  I don't believe msp430-elf is packaged
by debian yet, though you can probably use the precompiled version
available from TI (details elsewhere in the archive).

Peter

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to