Author Topic: Platform Independant Dingoo SDK  (Read 56470 times)

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #60 on: August 24, 2010, 05:51:41 am »
hum, still have the pb ...
Quote
$ make
mipsel-linux-g++ -G0 -O3 -I/cygdrive/c/cygwin/dingoo_sdk/include  -mips32 -mno-abicalls -fno-pic -Wall -Wextra -finline-functions -fomit-frame-pointer -msoft-float -fno-builtin -fno-exceptions -D_DEBUG -DMPU_JZ4740 -c -o src/emu/Booster.o src/emu/Booster.cpp
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstring:87: error: '::strcmp' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstring:88: error: '::strcoll' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstring:90: error: '::strxfrm' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstring:95: error: '::strerror' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstdio:103: error: '::clearerr' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../../../include/c++/4.1.2/cstdio:107: error: '::fflush' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../.

And I modified the files with "string.h" instead of <string.h>.

Also, here is makefile :

Quote
# Define the applications properties here:

APP_NAME = dingoo2600

# Define the compiler settings here:

CPP       = mipsel-linux-g++
CC        = mipsel-linux-gcc
LD        = mipsel-linux-ld

SOURCE    = src/emu src      

#INCLUDE   = -I$(DINGOO_SDK)/include -I../lib -I$(MIPSTOOLS)/mipsel-linux/include -I$
INCLUDE   = -I$(DINGOO_SDK)/include

W_OPTS    = -Wall -Wextra -finline-functions -fomit-frame-pointer -msoft-float -fno-builtin -fno-exceptions
CPP_OPTS  = -G0 -O3 $(INCLUDE) -mips32 -mno-abicalls -fno-pic $(W_OPTS) -D_DEBUG -DMPU_JZ4740 -c
CC_OPTS   = -G0 -O3 $(INCLUDE) -mips32 -mno-abicalls -fno-pic $(W_OPTS) -D_DEBUG -DMPU_JZ4740 -c
CC_OPTS_A = $(CC_OPTS) -D_ASSEMBLER_

LIB_PATH  = $(DINGOO_SDK)/lib
LIBS      = -lfgl -lsml -lm -lc -lgcc

LD_SCRIPT = $(DINGOO_SDK)/lib/dingoo.xn
LD_OPTS   = -nodefaultlibs --script $(LD_SCRIPT) -L$(LIB_PATH) $(LIBS) -o $(APP_NAME).elf

# Find all source files

SRC_CPP = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.cpp))
SRC_C   = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.c))
SRC_S   = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.S))
OBJ_CPP = $(patsubst %.cpp, %.o, $(SRC_CPP))
OBJ_C   = $(patsubst %.c, %.o, $(SRC_C))
OBJ_S   = $(patsubst %.S, %.o, $(SRC_S))
OBJ     = $(OBJ_CPP) $(OBJ_C) $(OBJ_S)

# Compile rules.

.PHONY : all

all : $(APP_NAME).app

$(APP_NAME).app : $(APP_NAME).elf
   $(DINGOO_SDK)/tools/elf2app/elf2app $(APP_NAME)

$(APP_NAME).elf : $(OBJ)
   $(LD) $(OBJ) $(LD_OPTS)

$(OBJ_CPP) : %.o : %.cpp
   $(CPP) $(CPP_OPTS) -o [email protected] $<

$(OBJ_C) : %.o : %.c
   $(CC) $(CC_OPTS) -o [email protected] $<

$(OBJ_S) : %.o : %.S
   $(CC) $(CC_OPTS_A) -o [email protected] $<

# Clean rules

.PHONY : clean

clean :
   rm -f $(OBJ) $(APP_NAME).elf $(APP_NAME).bin $(APP_NAME).app

Any suggestion about that ?

joyrider

  • *
  • Posts: 220
    • Willems Soft
Re: Platform Independant Dingoo SDK
« Reply #61 on: August 24, 2010, 08:16:56 am »
yes, make sure all header files are included like "header.h" and not <header> or <header.h> but you probably already did that, also if you use new / other libs, make sure to do that with those libs as well. cause it seems to me your still doing include <cstdio.h> or <cstdio> somewhere as well as <cstring.h> or <cstring>. so with my previous post i ment you should do it for all header files you include...

Also certain functions are not availible yet so you have to find another implementations and add those yourselve...

fflush doesn't exist do on native, actually there is an export i thought but parameters are unknown for it so you can leave that, it flushes changes to the filesystem. Not really good to leave it out but no choise atm..

strcmp exists i think not to sure about the other ones though.. It might be still a header / cpp files somewhere that booster.cpp included where the headers are included using "<...>". I missed some as well and kept getting similar errors (always refering to the mipsel-linux directory)

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #62 on: August 24, 2010, 01:25:57 pm »
yes, make sure all header files are included like "header.h" and not <header> or <header.h> but you probably already did that, also if you use new / other libs, make sure to do that with those libs as well. cause it seems to me your still doing include <cstdio.h> or <cstdio> somewhere as well as <cstring.h> or <cstring>. so with my previous post i ment you should do it for all header files you include...
No, i was stupid , i did it only for string.h, also i need to change "string.h" to "cstring.h" ?
I will do that this evening (i'm at work currently)

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #63 on: August 24, 2010, 02:26:55 pm »
error: '::strcmp' has not been declared
We have it but it's a #define to _strcmp, I guess there is or was some kind of conflict

error: '::strcoll' has not been declared
We don't currently have this

error: '::strxfrm' has not been declared
We don't currently have this

error: '::strerror' has not been declared
We don't currently have this

error: '::clearerr' has not been declared
We don't currently have this

error: '::fflush' has not been declared
We don't currently have this, but I think it could be easily implemented with fsys_flush_cache
Please note though that you can not just use fsys_flush_cache directly since we wrap FSYS_FILE* in our own FILE* struct.

EDIT: I just added fflush.
« Last Edit: August 24, 2010, 04:23:52 pm by Harteex »

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #64 on: August 24, 2010, 06:29:16 pm »
ok, thanks also for your reply harteex.
Need to see how to implement such methods in sdk :/

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #65 on: August 25, 2010, 05:27:07 pm »
I can't say very much about the C++ support but try to add this include to the makefile: -I$(DINGOO_SDK)/include/stlport
Then after you've included that feel free to try both with cstring and string.h

Also about strcmp, I will try to fix this problem.

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #66 on: August 26, 2010, 07:38:22 pm »
One more thing to try, alekmaul.
Try to use all the includes and options djdron uses here: http://code.google.com/p/dingoo-sdk/issues/detail?id=46#c9
(look at comment #9)

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #67 on: August 31, 2010, 05:42:23 am »
ok, it's better, i have now a few errors i need to check
Quote
mipsel-linux-g++ -c -G0 -O3 -I/cygdrive/c/cygwin/dingoo_sdk/include -I/cygdrive/c/cygwin/dingoo_sdk/include/SDL -I/cygdrive/c/cygwin/dingoo_sdk/include/stlport -Wall -Wextra -finline-functions -fomit-frame-pointer -msoft-float -fno-builtin
-fno-exceptions -mips32 -mno-abicalls -fno-pic -DMPU_JZ4740 -DNDEBUG -D_DINGOO -fno-rtti -fno-threadsafe-statics -o src/emu/Booster.o src/emu/Booster.cpp
In file included from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/iostream:29,

                 from src/emu/bspf.h:44,
                 from src/emu/Event.h:24,
                 from src/emu/Booster.cpp:19:
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ioserr.h:9:4: error: #error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).
In file included from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_stdexcept_base.h:25,
                 from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ios_base.h:22,
                 from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ios.h:23,
                 from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_istream.h:27,
                 from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/iostream:43,
                 from src/emu/bspf.h:44,
                 from src/emu/Event.h:24,
                 from src/emu/Booster.cpp:19:
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:58:60: error: ../include/exception: No such file or directory
In file included from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/iomanip:29,
                 from src/emu/bspf.h:45,
                 from src/emu/Event.h:24,
                 from src/emu/Booster.cpp:19:
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ioserr.h:9:4: error: #error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/config/_dingoo.h:19: warning:unused parameter 'str'
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_new.h: In function 'void* stlpmtx_std::__stl_new(size_t)':
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_new.h:134: error: 'exit' was not declared in this scope
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h: At global scope:
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:75: error: 'std::exception' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:79: error: 'std::bad_exception' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:122: error: 'std::terminate' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:123: error: 'std::terminate_handler' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:124: error: 'std::set_terminate' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ctime.h:36: error: '::tm' has not been declared
/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_ios_base.h:51: error: expected class-name before '{' token
make: *** [src/emu/Booster.o] Error 1

and the makefile now :
Quote
# Define the applications properties here:

APP_NAME = dingoo2600

# Define the compiler settings here:

CPP       = mipsel-linux-g++
CC        = mipsel-linux-gcc
LD        = mipsel-linux-ld

SOURCE    = src/emu src     

INCLUDE   = -I$(DINGOO_SDK)/include -I$(DINGOO_SDK)/include/SDL -I$(DINGOO_SDK)/include/stlport

STD_OPTS  = -G0 -O3 $(INCLUDE) -Wall -Wextra -finline-functions -fomit-frame-pointer -msoft-float -fno-builtin -fno-exceptions -mips32 -mno-abicalls -fno-pic -DMPU_JZ4740 -DNDEBUG -D_DINGOO
CPP_OPTS  = -c $(STD_OPTS) -fno-rtti -fno-threadsafe-statics
CC_OPTS   = -c $(STD_OPTS)
CC_OPTS_A = $(CC_OPTS) -D_ASSEMBLER_

LIB_PATH  = $(DINGOO_SDK)/lib
LIBS      = -lm -lsml -lc -ljz4740 -lgcc -lstdc++

LD_SCRIPT = $(DINGOO_SDK)/lib/dingoo.xn
LD_OPTS   = -nodefaultlibs --script $(LD_SCRIPT) -L$(LIB_PATH) $(LIBS) -o $(APP_NAME).elf

# Find all source files

SRC_CPP = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.cpp))
SRC_C   = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.c))
SRC_S   = $(foreach dir, $(SOURCE), $(wildcard $(dir)/*.S))
OBJ_CPP = $(patsubst %.cpp, %.o, $(SRC_CPP))
OBJ_C   = $(patsubst %.c, %.o, $(SRC_C))
OBJ_S   = $(patsubst %.S, %.o, $(SRC_S))
OBJ     = $(OBJ_CPP) $(OBJ_C) $(OBJ_S)

# Compile rules.

.PHONY : all

all : $(APP_NAME).app

$(APP_NAME).app : $(APP_NAME).elf
   $(DINGOO_SDK)/tools/elf2app/elf2app $(APP_NAME)

$(APP_NAME).elf : $(OBJ)
   $(LD) $(OBJ) $(LD_OPTS)

$(OBJ_CPP) : %.o : %.cpp
   $(CPP) $(CPP_OPTS) -o [email protected] $<

$(OBJ_C) : %.o : %.c
   $(CC) $(CC_OPTS) -o [email protected] $<

$(OBJ_S) : %.o : %.S
   $(CC) $(CC_OPTS_A) -o [email protected] $<

# Clean rules

.PHONY : clean

clean :
   rm -f $(OBJ) $(APP_NAME).elf $(APP_NAME).bin $(APP_NAME).app
I will check pbs as soon as possible

joyrider

  • *
  • Posts: 220
    • Willems Soft
Re: Platform Independant Dingoo SDK
« Reply #68 on: August 31, 2010, 11:03:11 am »
you should read the errors more closely, it always tells you exactly what is the problem although sometimes in a cryptic manner.

Most of the time i can see what the problem is by just looking at the errors gcc spits out. If i can't i google them, obviously just the error without the your source file and line the error occrured to get an idea of what might be wrong, i always found a solution this way.

the errors you posted do contain some trivial errors that i'd though you'd spotted yoursevlve like :

/cygdrive/c/cygwin/dingoo_sdk/include/stlport/stl/_exception.h:58:60: error: ../include/exception: No such file or directory
In file included from /cygdrive/c/cygwin/dingoo_sdk/include/stlport/iomanip:29,

like erh maybe the file does not exist ??? you forgot some include dirs or your pointing in the headers / sources to wrong files? (at #include statements)

#error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).

this one might be trivial, just dispable the use iostreams in the config file and if it's not that trivial i think google might give you answers cause it seems trivial...

the rest of the errors are probably side effects of the ones above, solve one error and you might have solved many after them. I always try to get the trivial ones sorted and most of the time the rest follows :)

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #69 on: August 31, 2010, 11:35:06 am »
yes, i know joyrider, but it's because Harteex said me to use the makefile from sdlpong to test if all is ok.
So i used the same include part than his makefile and that's the result.
I posted it here to inform him of pbs, and as i said in the beginning of my post, i will check the pb ^^

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #70 on: August 31, 2010, 12:48:05 pm »
Unfortunally, the C++ support does not currently support iostreams and exceptions.

djdron

  • *
  • Posts: 33
Re: Platform Independant Dingoo SDK
« Reply #71 on: September 07, 2010, 10:23:29 am »
stlport & libm appeared in SDK due to Stockfish porting :-)
Yes, this is not full C++, but basic stl (string, vector, map) is working.

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #72 on: November 14, 2010, 07:20:58 pm »
New version released, all users are encouraged to upgrade.
http://code.google.com/p/dingoo-sdk/downloads/detail?name=dingoo_sdk_r285.zip

What's new since r251:
* SDL performance and sound fixes
* SDL samples: SDLPong (C++) & SDL hello world (C)
* fflush added
* fprintf now working
* Various other bug fixes and improvements

clach04

  • *
  • Posts: 256
Re: Platform Independant Dingoo SDK
« Reply #73 on: November 14, 2010, 07:56:53 pm »
New version released, all users are encouraged to upgrade.
http://code.google.com/p/dingoo-sdk/downloads/detail?name=dingoo_sdk_r285.zip

What's new since r251:
* SDL performance and sound fixes
* SDL samples: SDLPong (C++) & SDL hello world (C)
* fflush added
* fprintf now working
* Various other bug fixes and improvements

Great work Harteex, I've been hoping for fflush :-)

javum

  • *
  • Posts: 7
« Last Edit: January 09, 2011, 09:38:26 am by javum »

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #75 on: January 09, 2011, 04:40:19 pm »
Done.

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #76 on: February 12, 2011, 12:28:28 am »
There's been an important update to the SDK, it can be downloaded from googlecode as usual:
Code: [Select]
Added libmad library for MP3 decoding.
Added smlgui library which provided an on-screen virtual keyboard including sample.
Updated AstroLander with 3D and particle effects.
New install/update system.
Implemented getcwd.

Download Here
« Last Edit: February 12, 2011, 10:25:26 am by flatmush »

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #77 on: February 13, 2011, 02:24:03 am »

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #78 on: February 16, 2011, 10:37:51 pm »
The latest SDK version (r324) has been uploaded and is available in the usual place:
http://code.google.com/p/dingoo-sdk/downloads/detail?name=dingoo_sdk_r324.zip

Code: [Select]
Updated fgl to support non-power-of-two texture sizes, this fixes the astrolander bonus build.
Replaced internal print and sprintf functions with more robust/standard versions.
Implemented realpath(), rename(), unlink() and partial stat().

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #79 on: February 24, 2011, 10:58:33 pm »
We now have a wikipedia page, which can be found here:
http://en.wikipedia.org/wiki/Dingoo_SDK

If people can help by keeping it alive and up-to-date then that'd be great.
« Last Edit: February 24, 2011, 11:05:45 pm by flatmush »