Tested ONLY on SC6530/SC6531DA/SC6531E.
An example of how to read the bootloader and firmware:
sudo ./spd_dump \
fdl nor_fdl1.bin 0x40004000 \
read_flash 0x80000003 0 0x400000 flash.bin \
read_mem 0 0x16000 bootloader.bin
- GCC has been removed since r18, and hasn't updated since r13. But sometimes it makes the smallest code.
NDK=$HOME/android-ndk-r15c
SYSROOT=$NDK/platforms/android-21/arch-arm
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi
make all TOOLCHAIN="$TOOLCHAIN" SYSROOT="$SYSROOT"
- NDK, SYSROOT, TOOLCHAIN as before.
CLANG="$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7-none-linux-androideabi -gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64"
make all TOOLCHAIN="$TOOLCHAIN" SYSROOT="$SYSROOT" CC="$CLANG"
NDK=$HOME/android-ndk-r25b
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm
CLANG=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
make all TOOLCHAIN=$TOOLCHAIN CC=$CLANG
TOOLCHAIN=/usr/bin/arm-linux-gnueabi
make all TOOLCHAIN=$TOOLCHAIN