'fxsdk build-fx-as-cg' working and added send command line option

This commit is contained in:
Slyvtt 2023-03-12 16:20:44 +01:00 committed by Lephenixnoir
parent a3aa537e84
commit 45b207b150
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
3 changed files with 30 additions and 2 deletions

4
bld Executable file
View file

@ -0,0 +1,4 @@
 PREFIX=$HOME/.local make -f giteapc.make configure
 make -C build install

View file

@ -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)

View file

@ -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")