Sorry the answer is a bit lengthy.
I don’t want to code against bare metal, I would like to use the TCP/IP stack and all the IO-facilities supllied by the standard C library, like I would do on a command line tool on Linux or something. My problem with that Arduino-like stuff is, it isn’t standard, so you have to reinvent the wheel or maybe search for equivalent from the Arduino world.
A good example is a FAT32 SD card library. Yes, there is one for the spark. But it can only open one file at a time and don’t support long filenames. There are several libraries out there which do the job, but the usually have a connection to the C stream IO system. You cannot simply use in on the spark/Arduino. Not to talk about the source which uses file IO. There is a standard: fopen, fread, fclose, etc. Why does Arduino reinvent it and even fails do standardize it.
So I would prefer standard C file or stream IO, a standard socket interface for IP and so on.
Where should stdout go to? Simle: where you like. At program start define where it should go, UART or USB-Uart or even telnet. It seems to be there in the spark code as I found in that newlib_stubs file, but I don’t know how to use it.
Look at NutOS, that would be my favorite, but it hasn’t been ported to Spark yet.
My project(s) are some simple devices like light controller or Webradio or something which I can control via an integrated web server. It should NOT be connected to the outside world. I don’t want a light switch which isn’t working if there is a missing internet connection. I simply don’t need remote access to my stuff. And I don’t want to run a 7x24 server fot such simple tasks.
Currently I build a talking LED matrix clock which also can play MP3, from SD and later maybe from the Internet. I want to set it up using an internal Webserver or a simple telnet commandline interface. I implemented telnet using the telnet example, but it is extremely slow, it looks like a 2400Bd modem connection. My Ethernut does that 5 times faster … on an AVR mega 128!
I understand, my statements may sound a bit agressive to the Arduino people. If you started programming on Arduino it maybe simple and nice. But if you are an old fashioned C programmer who already have difficulties to understand all that classes stuff, it is very difficult. I like the small footprint and powerfull hardware plattform of the Spark, and I sometimes really asked me if it would be easier for me to start from scratch only using the network stack and nothing more. But I don’t know what I really need to not brick my Spark an not be able to flash it.
So last, I hope I not offended someone. I really do not want this.
Thank you for understanding