Author Topic: So, what is the development environment like for GCW0?  (Read 3585 times)

relay01 (OP)

  • *
  • Posts: 138
So, what is the development environment like for GCW0?
« on: May 31, 2013, 07:49:32 pm »
I'm completely unfamiliar with development for the dingoo and I haven't worked with sdl since 2008.

When I did, I was using hardware accelerated rendering and various extension libraries for sdl. (SDLGl, SDLimage, and a separate for audio I can't recall).  I know hw rendering is not there yet for the gcw0 but I'm overall curious how dev works on it.

I have Android experience where the toolchain can send your apk compiled and direct to device and then subsequently debug.  I'm assuming this is not the case for the gcw0. 

Are binaries cross compiled then sent to the zero for testing?  Can you reasonably test on your machine before packaging and sending to the gcw0?  Strictly linux or will Windows work?  What's it like developing.

I ask because I'm at a fork between developing for my vita or for the gcw0. 

Edit:
I know the gcw0 and vita development don't compare.  I just know that I'm limited on time, and am looking for a place to scratch my game dev itch.  It would likely be FAR easier on the vita, but if I can do development almost exclusively on my pc and only test on the gcw0 when I feel like it, then that might work well for me too.  Part of the problem I had with android is that I always had to carry my testing device and usb cable with me. 
« Last Edit: May 31, 2013, 07:56:40 pm by relay01 »

Surkow

  • * Administrator
  • Posts: 587
Re: So, what is the development environment like for GCW0?
« Reply #1 on: May 31, 2013, 08:31:28 pm »
A toolchain has been released for cross compilation from within Linux. You can telnet into the GCW to access the shell, for debugging purposes. Eventually a Qemu image will be relased to run the firmware in a simulated MIPS environment. Transferring files can be done via FTP.

zear

  • * Moderator
  • Posts: 2379
Re: So, what is the development environment like for GCW0?
« Reply #2 on: May 31, 2013, 08:50:50 pm »
The GCW toolchain is exactly like a regular Linux toolchain, it just compiles MIPS binaries instead of x86/x64 ones.

In order to test the binary, you have to either copy it onto the real device, or, as Surkow previously mentioned, try it in a Qemu image we prepared (which still requires copying the binary onto the emulated filesystem). The GCW Zero OS (in both real hardware and Qemu) has always an FTP daemon running in the background, so all you need to do to copy the binary to the device is connect to it's IP address using your regular FTP client (ie. I use the FTP from Midnight Commander). You can do this over USB or Wi-Fi (I prefer the latter for no cable juggling involved). If for some reason you can't or don't want to use FTP, you can always just copy the binary onto a microSD card and then plug the card into the GCW's external microSD slot.

There are two ways to test the binaries. One is to prepare the final package (.opk), which will be automatically detected and appear in the GCW's menu system. The second (more preferable) way is to copy a raw binary to the GCW and then telnet inside the system (again, either via USB or Wi-Fi) and execute the binary from the shell. The system comes with tools like gdb and strace, so if you left the debugging symbols on, you can perform all the debugging on the running system.

As for your question about Windows - the toolchain itself requires a Linux x86 machine, however given you already have a compiled binary, you can FTP and telnet to the GCW from any operating system or device ever made that supports these protocols.

You are welcome to join our IRC channel if you need further help/instructions.

DiegoSLTS

  • *
  • Posts: 365
Re: So, what is the development environment like for GCW0?
« Reply #3 on: May 31, 2013, 10:03:48 pm »
When I did, I was using hardware accelerated rendering and various extension libraries for sdl. (SDLGl, SDLimage, and a separate for audio I can't recall).
I don't think SDLGl is supported (OpenGL is not supported yet), but I've used SDLImage, SDLttf, audio and input with no problems with the toolchain for the Dingoo. I'm pretty sure those are also supported on the Zero. It's really important to setup your makefile correctly.

I know hw rendering is not there yet for the gcw0 but I'm overall curious how dev works on it.
Do you mean hardware surfaces? Acording to pcercuei hardware surfaces are supported in the stock firmware: http://boards.dingoonity.org/gcw-releases/opendingux-update-2013-05-18/

I have Android experience where the toolchain can send your apk compiled and direct to device and then subsequently debug.  I'm assuming this is not the case for the gcw0.
It's not that easy by default (the toolchain are just file, it doesn't merge with any IDE like Android does), but I guess with a short script you can call the make command, open the FTP connection and start de application on the Zero. It shouldn't be too hard.

Can you reasonably test on your machine before packaging and sending to the gcw0?
You can build and test on your PC, that's how I do it, but you should test on the actual device every now and then to make sure it's still runing OK. I have ported some applications and I like to do and test everything I can on the PC (like resizing to 320x240 are changing input keys to match de OpenDingux's keys) and then testing it on the Dingoo and debug it. If it runs too slow on the Dingoo I just try to make and test optimizations on the PC and then test again in the Dingoo when I've noticed some improvements.

Strictly linux or will Windows work?
I think d_smagin made a post on how to setup the toolchain in windows through cygwin (and I know it was also done with older Dingux toolchains) so Windows is not impossible but with some extra work.
« Last Edit: June 01, 2013, 04:55:25 pm by DiegoSLTS »

dmitry_smagin

  • *
  • Posts: 421
Re: So, what is the development environment like for GCW0?
« Reply #4 on: June 01, 2013, 11:15:07 am »
Yes, I made a gcw0 toolchain for Windows under Cygwin environment.
http://prizma.bmstu.ru/~exmortis/gcw0-toolchain-cygwin.2012-10-21.tar.gz

It's gcc 4.7.1, not very new but can be used with little or no problems.
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

relay01 (OP)

  • *
  • Posts: 138
Re: So, what is the development environment like for GCW0?
« Reply #5 on: June 05, 2013, 05:06:03 pm »
Yes, I made a gcw0 toolchain for Windows under Cygwin environment.

That's interesting. Once I get my unit, I'll have to try that out and see if I can't port my unfinished game of yore to it.

  This may belong in it's own thread but part of my research of the Playstation Mobile led me into the Mono framework, which I see has a MIPS variant/port.

Assuming Mono could be built for GCW0, then perhaps MonoGame could work as well.  Assuming that is possible, folks familiar with XNA could port/develop their games on the GCW0. 

Thoughts?

dmitry_smagin

  • *
  • Posts: 421
Re: So, what is the development environment like for GCW0?
« Reply #6 on: June 05, 2013, 07:03:28 pm »
One of the devs tried to compile Mono for mips but it spit too many errors. So, currently there's no Mono framework for gcw0 and xna ports are impossible.
While it's highly probable to compile Mono for mips, the performance stays under big question.
« Last Edit: June 05, 2013, 07:08:59 pm by d_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

 

Post a new topic