Added seperate Build and Upload scripts

This commit is contained in:
0xMAC8205 2023-11-16 12:02:51 +01:00
parent 75d8ae5d7f
commit 4ae7644a94
6 changed files with 62 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.vscode
build
src/tools

View File

@ -4,13 +4,5 @@
# ToDo:
# Ignore Upload when no programmer found
all: compile upload
compile:
@echo "Compiling for 65c02"
@vasm6502_oldstyle -Fbin -dotdir -wdc02 src/main.s -o build/kernel.bin | grep :
upload:
@echo "Uploading"
@minipro -p SST39SF040 -w build/kernel.bin -Sy
all:
@sh build.sh

34
build.sh Normal file
View File

@ -0,0 +1,34 @@
echo "Compiling for 65c02"
# Removing previous build
rm -rf build
mkdir build
bold=$(tput bold)
normal=$(tput sgr0)
build(){
output=$(vasm6502_oldstyle -Fbin -dotdir -wdc02 src/main.s -o build/a.out | grep :)
if `find build/a.out* > /dev/null`;
then
echo -e "\n\e[0;32m${bold}Compiled Succsessfully${normal}"
sh upload.sh
else
echo -e "\n\e[0;31m${bold}Error while Compiling${normal}"
fi
echo ""
echo $output | sed 's/bytes /bytes\n/g'
}
# Checking dependencies
if command -v vasm6502_oldstyle > /dev/null 2<&1;
then
build
else
echo -e "\n\e[0;31m${bold}vasm6502_oldstyle not found${normal}"
echo "Aborting build..."
fi

0
src/bootloader.s Normal file
View File

View File

@ -3,12 +3,15 @@
.include "src/kernel/video.s"
.include "src/kernel/console.s"
.include "src/kernel/graphics.s"
.include "src/kernel/string.s"
.include "src/kernel/int.s"
.include "src/kernel/event_handler.s"
.include "src/kernel/memory_manager.s"
.include "src/kernel/hardware.s"
.include "src/kernel/string.s"
.include "src/kernel/int.s"
.include "src/kernel/byte.s"
.include "src/kernel/char.s"
kernel_init:

18
upload.sh Normal file
View File

@ -0,0 +1,18 @@
echo -e "\nUploading..."
bold=$(tput bold)
normal=$(tput sgr0)
upload(){
output=`minipro -p SST39SF040 -w build/a.out -Sy`
}
# Checking dependencies
if command -v minipro > /dev/null 2<&1;
then
upload
else
echo -e "\n\e[0;31m${bold}minipro not found${normal}"
echo "Aborting upload..."
fi