Easy way to divert printf output spin2cpp'd display driver?
Rayman
Posts: 14,665
Maybe this has been asked before...
But, I'd like to try sending output to a display device instead of over a serial connection...
Perhaps I'm supposted to use fprintf and somehow invoke a driver?
Is there a simple example of doing this?
But, I'd like to try sending output to a display device instead of over a serial connection...
Perhaps I'm supposted to use fprintf and somehow invoke a driver?
Is there a simple example of doing this?
Comments
It's not exactly easy, but there is an example in the link below. Look at TvDriver.c
https://code.google.com/p/propgcc/source/browse/#hg%2Fdemos%2Ftvkbfile
Also, It appears that you've rigged it to use either fprintf or printf. If so, that might be nice too, but I'm guessing it's easier and maybe
better to use fprintf and save printf for debugging...
The tvkbfile.c assigns the tv/kbd driver to stdio. TvDemo.c uses the serial port for debug and tv/kbd driver using fprintf and a file handle.
The config file support makes it easy to just choose a platform without modifying code. It's easy if your board.cfg has the right lines in it. I find it much more difficult to modify code than just choose an appropriate board type. The .cfg choice is much simpler than the 100+ lines of code alternative I've seen in other methods. The file demo for example used to require a block for every board and a -D flag; now it comes automatically with the board type. Of course it is still possible to hard code things if that's what you like.