For discussions about development of TAPs, patches and other software for the Toppy

Moderator: Technical

Post Reply
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

That appears to be the way of modern development for consumer devices. I wouldn't be too bothered by it were it not for 3 points:
1. Using poorly implemented open source (MHEG)
2. Taking well implemented open source, misunderstanding it and tweaking it to be worse (the TAP compiler). On the plus side this has given enough dead opcode padding for R2 to squeeze more into his firmware patches.
3. Perhaps most important: not adhering to the open source license. There's GPL'd code running on the Toppy and Topfield's release of the TAP compiler is also based on GPL code.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

I have the cygwin environment installed and can get the command prompt window.

Do I install the toolchain via

http://tap.berlios.de/cygwin_compiler_install.html

or follow this
http://developer.berlios.de/project/sho ... se_id=7383

or get the compiler from Topfield.

The berlios.de site mentions
While Topfield kindly provide a TAP development toolchain for cygwin under Windows, this is not the ideal environment for many developers.

To remedy this situation, I have created this package which creates a toolchain for Linux, or probably almost any Unix variant including OS X.

(If you do successfully build a toolchain on a non-Linux platform, please let me know)
Should I instead use Topfileds more Windows friendly compiler.

This stuff is not complicated, but theirs no one stop shop from Topfield.org. In fact that link is broken. Its like a sort of puzzle, that Linux developers seem to like having to figure out, with their DOS box type command line stuff.

I would prefer a Windows app, that allows me to open projects, type in code and build taps.

I just need to know which path to take and what to download compiler wise please now I have cygwin installed.
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

There's not really much difference between the 3 different methods. IIRC, I built using wget to fetch the code and make, but it took a while to compile.

The Topfield compiler was withdrawn for a while because of GPL issues. I don't know if it's still available. I prefer the toolchain version, partly because it's open and partly because it encourages the use of makefiles. All the Topfield examples use batch files which is a bit silly. Makefiles are much more suited to building software.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

Thanks SimonC, can I ask if

$ wget http://download.berlios.de/tap/tap_tool ... x86.tar.gz

is the correct up to date version you use.

My TAP Shell is call bash and has the prompt bash - 3.2$ _

not

username@computer ~
$

described in the cygwin install instructions.

So I need to be sure these instructions are up to date.

What editor do you recommend?

After I do this am I good to go, can I just type the compiler followed by the source code etc. Does the batch compile, link and produce the tap, do I type it after the compile statement?
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

That's the correct version. You could also just download using a browser and extract using 7-Zip.

I use Visual Studio 2008, but you can also use VC Express. Just create a makefile project and give it the cygwin make command. Then it'll build using the makefile in your source project.

Unless you like the bash shell, don't bother with it.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

If you want to recompile the Topfield examples then you'll either need their (withdrawn) version of the compiler or you'll need to create your own Makefiles for them.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

simonc wrote:That's the correct version. You could also just download using a browser and extract using 7-Zip.

I use Visual Studio 2008, but you can also use VC Express. Just create a makefile project and give it the cygwin make command. Then it'll build using the makefile in your source project.

Unless you like the bash shell, don't bother with it.
To be honest, I don't even like the name. I tried wget and it said no such command. I guess I need the path setup even on Windows XP. I will look up the help on how to do that.

I like the idea of using visual studio express. I have the C++ version installed as well as C#.

Never used make files before, unless their the same as the old 16 bit project files, that were called .mak files I think.

I will give it a go, thanks.
BlueSky
Regular contributor
Posts: 71
Joined: Sun Nov 29, 2009 12:16 am

Post by BlueSky »

R2-D2 wrote:If you want to recompile the Topfield examples then you'll either need their (withdrawn) version of the compiler or you'll need to create your own Makefiles for them.
Thanks for the info, I will probably just skip them. I was thinking of writing a tap for showing my timers, plus perhaps one to speed up my new 5810, when it arrives. The remote is slow but is some functions can be handled by taps like archive etc then that may make it more responsive.

A really great idea would be a Topfiled simulator on PC. Taps could be designed in the simulator and tested, then the source code generated and built.

I'm quite busy on other projects but it would make an interesting hobby. :)
jumbo
Frequent contributor
Posts: 4731
Joined: Mon Apr 11, 2005 5:25 pm

Post by jumbo »

BlueSky wrote:A really great idea would be a Topfiled simulator on PC. Taps could be designed in the simulator and tested, then the source code generated and built.
You should by now have realised that, probably, almost EVERYTHING you could possibly think of, has already been done :wink: Seek and thou shalt find! Have a look at Tapworld for starters ...
kermit
Frequent contributor
Posts: 972
Joined: Wed Jun 01, 2005 5:21 am
Location: Brisbane, Australia

Post by kermit »

BlueSky wrote:I was thinking of writing a tap for showing my timers
It's been done, UK Timers.
Cheers Simon
>8-]

TF5000PVRt 500GB March '09 f/w
simonc
Frequent contributor
Posts: 5648
Joined: Tue Apr 12, 2005 1:31 pm
Location: Cheltenham
Contact:

Post by simonc »

Oh, and there's a Windows based simulator called Tapulator available on tap.berlios.de.

You'll need Visual Studio with MFC to build it (which rules out the Express version IIRC).
Pete Lambert
Posts: 5
Joined: Mon Apr 18, 2005 12:49 pm

Problems with C++

Post by Pete Lambert »

Hi All,

I'm trying to write my own tap, and would much prefer to use C++ to C (although I'm familiar with both). I've got cygwin installed and have got to the point where I can build a C tap that runs on my Toppy, but I can't build a C++ one. I'm trying to use TAPCommander as inspiration, but it seems incompatible with the Framework library that I have, i.e m_options is referenced but it's not part of the Tapplication class or the TAPCommander class that inherits from it. Any TAP that uses FireBird also fails due to whinges about a print function.

Can anyone please tell me where to get updates for these libraries (or TAPCommander), if they exist, and preferably some documentation for the various libraries that people have written ?

Thanks,

Pete
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

The original Topfield compiler was (AFAIK) just C, even though they hinted at a C++ implementation. The original alternative compiler (on Berlios) was just C, too. There were a couple of pioneers at setting up C++ (simonc and rwg) so they are your best bets for advice on this tricky path.
BobD
MyStuff Team
Posts: 4220
Joined: Wed Aug 03, 2005 12:21 pm
Contact:

Post by BobD »

I have finally had to buy a new laptop, as my old one just stopped working one day. I am struggling to get MyStuff compiling correctly (or indeed at all).

The laptop is running Windows 7 Ultimate. I have copied across the old c:\cygwin folder, and I compile by running a batch file that starts wth

SET PATH=C:\cygwin\bin;C:\cygwin\usr\local\bin;%PATH%
SET C_INCLUDE_PATH=C:\CYGWIN\USR\LOCAL\INCLUDE;C:\CYGWIN\USR\INCLUDE
SET CPLUS_INCLUDE_PATH=C:\CYGWIN\USR\LOCAL\INCLUDE;C:\CYGWIN\USR\INCLUDE
call ..\gcc -O2 mystuff.c firmware.c TapExtensions.c png_graphics.c ShutDownFns.c

mips-ld -o mystuff.elf -T ..\TAP.ld mystuff.o png_graphics.o firmware.o VFDSegmentMap.o ShutDownFns.o TapExtensions.o -l FireBird -L c:\tapdev -l tap -l c -l m -l gcc -l Firebird -Map mystuff.map

mips-objcopy -O binary mystuff.elf MyStuff.tap

The folder that the batch file runs from does have gcc.bat in the parent folder, which contains

mips-gcc.exe -O2 -c -mtap -mlong-calls -msoft-float -I..\ -I ..\include -I c:\cygwin\usr\include -I c:\cygwin\usr\local\include %1 %2 %3 %4 %5 %6 %7 %8 %9

This gives me multiple errors of

mips-gcc: installation problem, cannot exec `cpp0': No such file or directory

I have tried redownloading and installing cygwin but have the same error. Anyone have any ideas? Is there an updated guide to installing the toolchain and cygwin etc under Windows 7 anywhere or should I just follow the guides at the start of this thread?

I am reasonably sure that previously I have just been able to copy the cygwin folders across and have it all work correctly, but perhaps not.
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
ccs
Frequent contributor
Posts: 2689
Joined: Tue Oct 30, 2007 3:19 pm

Post by ccs »

This link has some gcc debugging - search for "cannot exec".
TF5810, F/W: MS6 Recommended F/W 12/9/2009 -FmXl+CtEzIScVdZ
TAPs: EIT Sub v0.6; EPG2MEI v0.96; MPDisplayLITE V1.2; MyInfo B5.6; SecCache (UK) v0.4; Extend v1.7; MyStuff 6.6;
Sig generated by MyInfo on 20/10/14
ccsx
Post Reply