Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
File renamed without changes.
6 changes: 4 additions & 2 deletions win/nxt-tools/compile.bat → compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ set B=%~dp0\mingw64\bin\bash.exe
%B% -c "echo OK" > NUL || goto ERROR_NOBASH
for %%I in (%B%) do set X=%%~dpI
set PATH=%X%;%PATH%
bash -c "source ./compile.sh '%1' '%2' '%cd%'"
COPY "%cd%\kernel_id.h" "%2"
COPY "%cd%\kernel_cfg.c" "%2"
bash -c "source ./compile.sh '%1' '%2' '%cd%' GNUARM_ROOT='%3'"
goto NOERROR
:ERROR_NOBASH
echo bash interpreter not found
:NOERROR
:NOERROR
16 changes: 16 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -x
mkdir -p /tmp # for mingw32/MSys
SCRIPTDIR="$PWD" # $(dirname $(realpath ${BASH_SOURCE[0]}))
cygpath --help >/dev/null 2>&1 && SCRIPTDIR=$(cygpath -m $SCRIPTDIR) ||:
SRCDIR="$2"

# make -C "$SRCDIR" SHELL=bash NXT_TOOLS_DIR_POSIX="$SCRIPTDIR" EnvironmentMessage
cp kernel_cfg.c "$SRCDIR"
cp kernel_id.h "$SRCDIR"
make -C "$SRCDIR" SHELL=bash NXT_TOOLS_DIR_POSIX="$SCRIPTDIR" clean
# make -C "$SRCDIR" SHELL=bash NXT_TOOLS_DIR_POSIX="$SCRIPTDIR" LIBS_ROOT=$(pwd)/gnuarm/arm-none-eabi all "$@"
# make -C "$SRCDIR" SHELL=bash NXT_TOOLS_DIR_POSIX="$SCRIPTDIR" SYSROOT=/home/maria/Code/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi all "$@"
make -C "$SRCDIR" SHELL=bash NXT_TOOLS_DIR_POSIX="$SCRIPTDIR" all "$@"

echo "Finished compiling NXT program"
62 changes: 62 additions & 0 deletions download-arm-none-eabi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/sh

help()
{
echo "Usage: download-arm-none-eabi.sh [ -p | --path ] /path/to/dir
[ -h | --help ]"
exit 0
}

PATH_TO_INSTALL="/home/$USER"


install_arm()
{
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -C "$PATH_TO_INSTALL"
echo "arm-none-eabi installed at $PATH_TO_INSTALL"
}




if [ $# -eq 0 ]
then
printf "Do you want to install arm-none-eabi at $PATH_TO_INSTALL? [y/N] "
read response
if [ "$response" != "${response#[Yy]}" ] ;
then
install_arm
else
help
fi
exit 0
fi



case "$1" in
-p | --path )
PATH_TO_INSTALL=$2
if [[ ! -d "$PATH_TO_INSTALL" ]]
then
echo "$PATH_TO_INSTALL doesn't exists on your filesystem."
else
install_arm
fi
;;

-h | --help)
help
;;

*)
echo "Unexpected option: $1"
help
;;
esac





File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading