flatmush / dingoo-sdk

Automatically exported from code.google.com/p/dingoo-sdk
2 stars 3 forks source link

AstroLander sample does not compile #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install mipseltools-gcc412-glibc261 toolchain
2. Install dingoo_sdk as per instructions in install
3. cd $DINGOO_SDK/samples/AstroLander && make

What is the expected output? What do you see instead?
Expected output: linked AstroLander.app file. Instead, AstroLander.elf seg 
faults. See attached make output.

What version of the product are you using? On what operating system?
GNU/Linux 2.6.32 (simplyMEPIS) with the above toolchain and dingoo_sdk 
1.2.5 from downloads section.

Please provide any additional information below.

Attached are the output from the dingoo_sdk install script and the output 
from AstroLander make.

Original issue reported on code.google.com by russell.bernhardt@gmail.com on 29 Mar 2010 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
OK, the issue seems to be that the version of libgcc.a you are using uses PIC
(Position Independant Code), please try downloading the windows toolchain and 
using
the libgcc.a from there (copy it into $DINGOO_SDK/lib/libgcc.a after running 
install).

Also one of the logs you show seems to indicate that you've been re-installing 
by
re-running the install script, that doesn't properly re-install stuff in version
1.2.5, I've fixed this in the next revision and will be committing it shortly.

I don't think that this issue is specific to astro-lander, it may just be the
first/only sample to illuminate this issue.

Original comment by Flatmush@googlemail.com on 30 Mar 2010 at 7:50

GoogleCodeExporter commented 9 years ago
That was indeed the problem. Here are the steps I used:

1. Remove my existing $DINGOO_SDK to start from scratch.
2. Copy libgcc.a from the Windows-CYGWIN toolchain to
$MIPSTOOLS/lib/gcc/mipsel-linux/4.1.2/
3. Extract your Dingoo SDK and follow the setup instructions.
4. CD to samples/AstroLander and run make

Most of the SML examples were having the same issue, but MineSweeper wasn't. Was
strange as this is the first time I've ever tried cross-compiling.

Thanks!

Original comment by russell.bernhardt@gmail.com on 31 Mar 2010 at 12:08

GoogleCodeExporter commented 9 years ago
Just to get a little familiar with the system and the SDK, I added a few 
features to
the AstroLander code:

- while paused, pressing the left shoulder button quits back to the Dingoo 
software
- while paused, pressing the right shoulder button cycles through the 
difficulties
- implemented the 4 levels of difficulties (easy, normal, hard, ultra) to be 
shown in
available health and fuel
- added a score multiplier to reflect the four difficulties (easy takes a 50% 
point
penalty, normal gets 100%, hard 150%, ultra 200%)
- added an "altitude" printout in the hud, below the score just to give a rough 
feel
of acceleration when no terrain is visible (or if you accidentally hit the 
boost (B)
button)

I attached the diff patch in case anyone else wants to muck with it. Works well 
on my
own Dingoo and so far it's my favorite game (aside from NES and SMS games).

I'm hoping to go through the headers and maybe document them so there's 
something for
others to start with. Maybe roll out some very simple examples for newbies like 
myself.

Thanks again for the SDK! Dingux is great and all, but it's quite glitchy and 
many of
the emulators just don't make me happy, so I'm hoping to do more native 
programming.
Glad someone else (with more expertise) thought it was worth it.

Original comment by russell.bernhardt@gmail.com on 31 Mar 2010 at 7:02

Attachments:

GoogleCodeExporter commented 9 years ago
Nice additions to the game, one little thing I'd advise is that you use the 
fixed
point types rather than doubles since floating point types are very very slow 
on the
dingoo. You seem interested in helping and that patch seems pretty good so I'm 
going
to make you a contributor which means you'll be able to upload changes to the 
code,
just make sure you test everything before you update.

If you could document the headers that'd be awesome, I keep meaning to but 
haven't
had the time.

Original comment by Flatmush@googlemail.com on 31 Mar 2010 at 9:41