diff --git a/bld b/bld new file mode 100755 index 0000000..091127a --- /dev/null +++ b/bld @@ -0,0 +1,4 @@ + PREFIX=$HOME/.local make -f giteapc.make configure + make -C build install + + diff --git a/fxsdk/cmake/FX9860G_AS_CG.cmake b/fxsdk/cmake/FX9860G_AS_CG.cmake index c44f437..777a9b6 100644 --- a/fxsdk/cmake/FX9860G_AS_CG.cmake +++ b/fxsdk/cmake/FX9860G_AS_CG.cmake @@ -18,7 +18,7 @@ set(CMAKE_CXX_COMPILER sh-elf-g++) set(CMAKE_C_FLAGS_INIT "") set(CMAKE_CXX_FLAGS_INIT "") -add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp) +add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp -DFXCG50) add_link_options(-nostdlib -Wl,--no-warn-rwx-segments) link_libraries(-lgcc) add_compile_definitions(TARGET_FXCG50) diff --git a/fxsdk/fxsdk.sh b/fxsdk/fxsdk.sh index ca674bf..6eccdcd 100755 --- a/fxsdk/fxsdk.sh +++ b/fxsdk/fxsdk.sh @@ -161,6 +161,11 @@ fxsdk_build() { echo "$TAG Making into build-cg" fxsdk_build_cg "$@" fi + + if [[ -e build-fx-as-cg || $none_exists == 0 ]]; then + echo "$TAG Making into build-fx-as-cg" + fxsdk_build_fx_as_cg "$@" + fi } fxsdk_build_fx() { @@ -247,8 +252,12 @@ fxsdk_send() { fxsdk_send_cg fi + if [[ -e "build-fx-as-cg" && ! -e "build-fxascg" ]]; then + fxsdk_send_fx_as_cg + fi + echo "either no or several platforms are targeted, use 'fxsdk send-fx' or" - echo "fxsdk 'send-cg' to specify which calculator to send to." + echo "'fxsdk send-cg' or 'fxsdk send-fx-as-cg' to specify which calculator to send to." } fxsdk_send_fx() { @@ -284,6 +293,21 @@ fxsdk_send_cg-push() { fxlink -pw ${bin_files} } +fxsdk_send_fx-as-cg() { + echo "$TAG Installing for fx-CG using fxlink" + if ! command -v fxlink >/dev/null 2>&1; then + echo "error: fxlink is not installed or not available" + return 1 + fi + g3a_files=$(find -maxdepth 1 -name '*.g3a') + echo "$TAG Running: fxlink -sw ${g3a_files}" + fxlink -sw ${g3a_files} +} + +fxsdk_send_fx-as-cg-push() { + fxsdk_send_cg-push +} + fxsdk_path() { case "$1" in "sysroot")