A newlib port for the Classpad II (fx-CP400) to be used alongside the hollyhock SDK.
- An SH4 cross-compiler (preferably gcc)
First, set an environment variable $PREFIX
that holds the path to the directory where newlib should be installed to. I would advise to install it next to your hollyhock SDK.
Next, set an environment variable $TARGET
to the value sh4-elf
.
Example:
export PREFIX="$SDK_DIR/newlib"
export TARGET="sh4-elf"
Clone this repository using the following command:
git clone https://github.com/diddyholz/newlib-cp2
Change directory into the cloned repository and create a directory named build
. Cd into this directory.
cd newlib-cp
mkdir build
cd build
To finally build newlib, first configure the build directory as follows:
../configure --target=$TARGET --prefix=$PREFIX
Now run make to build and install newlib into your prefix directory.
make all
make install
To utilize newlib with hollyhock, a template linker file and Makefile are supplied in this repository.