掌機 - Dingoo A320 - Dingoo - Dingoo SDK - 開發環境(Linux)



x64

$ cd
$ wget https://github.com/steward-fu/website/releases/download/a320/mipsel-4.1.2-nopic.tar.bz2
$ wget https://github.com/steward-fu/website/releases/download/a320/sdk.zip

$ tar xvf mipsel-4.1.2-nopic.tar.bz2
$ sudo mv mipsel-4.1.2-nopic /opt
$ unzip sdk.zip
$ cd dingoo_sdk

$ export PATH=/opt/mipsel-4.1.2-nopic/bin/:$PATH
$ export MIPSTOOLS=/opt/mipsel-4.1.2-nopic
$ export DINGOO_SDK=`pwd`
$ chmod a+x ./install
$ ./install

$ cd samples/sdl_hello_world/
$ make
$ file sdl_hello_world*
    sdl_hello_world.app: data
    sdl_hello_world.bin: Adobe Photoshop Color swatch, version 0, 10248 colors; 1st RGB space (0), w 0, x 0x200, y 0x2808, z 0; 2nd RGB space (0), w 0x400, x 0x2808, y 0, z 0
    sdl_hello_world.elf: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped

aarch64

$ sudo apt-get install gcc-mipsel*
$ sudo apt-get install libgcc-12-dev-mips-cross
$ sudo ln -s /usr/bin/mipsel-linux-gnu-ar /usr/bin/mipsel-linux-ar
$ sudo ln -s /usr/bin/mipsel-linux-gnu-gcc /usr/bin/mipsel-linux-gcc
$ sudo ln -s /usr/bin/mipsel-linux-gnu-ld /usr/bin/mipsel-linux-ld
$ sudo ln -s /usr/bin/mipsel-linux-gnu-nm /usr/bin/mipsel-linux-nm
$ sudo ln -s /usr/bin/mipsel-linux-gnu-objcopy /usr/bin/mipsel-linux-objcopy
$ sudo ln -s /usr/bin/mipsel-linux-gnu-objdump /usr/bin/mipsel-linux-objdump

$ cd
$ wget https://github.com/steward-fu/website/releases/download/a320/sdk.zip
$ unzip sdk.zip
$ mv dingoo_sdk Dingoo
$ cd Dingoo
$ vim install +27
    cp /usr/lib/gcc-cross/mipsel-linux-gnu/12/libgcc.a $DINGOO_SDK/lib

$ export MIPSTOOLS=/usr/mipsel-linux-gnu
$ export DINGOO_SDK=`pwd`
$ chmod a+x ./install
$ ./install

$ vim Makefile
    CC_OPTS_A = $(CC_OPTS) -D_ASSEMBLER_ --nodefaultlibs
    LD_OPTS   = --script $(LD_SCRIPT) -L$(LIB_PATH) $(LIBS) -o $(APP_NAME).elf

$ make
$ file sdl_hello_world.app 
    sdl_hello_world.app: data