Programming Environment



building cross compile environment for SPC-101 series programs

see http://www.netbsd.org/docs/guide/en/chap-build.html#chap-boot-cross-compiling-kernel for datails

The concrete example that you should do

  1. install NetBSD 4-stable or older to your PC for develop.
    gcc version will be gcc4 in NetBSD 5.0, it can't build cross complier of gcc3.
  2. you must check that no error occurred in every command
  3. get NetBSD-2 source
    env CVS_RSH=ssh cvs -d:ext:anoncvs@anoncvs.NetBSD.org:/cvsroot co -r netbsd-2-0 src
    
    It is more better that you use cvs mirror. see http://www.netbsd.org/mirrors/#anoncvs.
  4. 'cd' to directory of source
    cd src
    
  5. build.sh
    ./build.sh -m evbsh3-eb tools
    ./build.sh -u -U -m evbsh3-eb build
    
  6. set environmental variable
    setenv TOOLDIR /where/you/build
    setenv DESTDIR /where/you/build
    
    "/where/you/build" is maybe printed out at end of "./build.sh"
  7. add to command search path
    set path=(${TOOLDIR}/bin ${path})
    
  8. write code
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char **argv){
        printf("Hello, RPU-50 cross develop world!!\n");
        return EXIT_SUCCESS;
    }
    
  9. write Makefile
    MAKEOBJDIR=.
    PROG=hello
    MAN=
    SRCS=   hello.c
    
    .include <bsd.prog.mk>
    
  10. use nbmake-evbsh3 to compile your code
    % nbmake-evbsh3
    




sound data format

  • raw data only :
    • 16bit
    • stereo
    • 22050Hz sampling
You can convert data by using sox.
sox coco_15.wav -x -r 22050 -s -w -c2 coco_15.raw
  • Supported Windows wave-format at "nerve R1.0" :
    • PCM/ADPCM
    • mono/stereo
    • 22050Hz sampling
If you don't choose 22050Hz as sampling rate, its convert processing time become very long.
Maybe will be supported ADPCM and some formats, but it is need to convert data format. I don't know that how much time need processing, now. Conversion time of ADPCM is not so long. It become the practical use enough fast in conversion time.