Added seperate Build and Upload scripts
This commit is contained in:
parent
75d8ae5d7f
commit
4ae7644a94
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
.vscode
|
.vscode
|
||||||
build
|
build
|
||||||
|
src/tools
|
12
Makefile
12
Makefile
@ -4,13 +4,5 @@
|
|||||||
# ToDo:
|
# ToDo:
|
||||||
# Ignore Upload when no programmer found
|
# Ignore Upload when no programmer found
|
||||||
|
|
||||||
all: compile upload
|
all:
|
||||||
|
@sh build.sh
|
||||||
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
|
|
||||||
|
|
||||||
|
34
build.sh
Normal file
34
build.sh
Normal 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
0
src/bootloader.s
Normal file
@ -3,12 +3,15 @@
|
|||||||
.include "src/kernel/video.s"
|
.include "src/kernel/video.s"
|
||||||
.include "src/kernel/console.s"
|
.include "src/kernel/console.s"
|
||||||
.include "src/kernel/graphics.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/event_handler.s"
|
||||||
.include "src/kernel/memory_manager.s"
|
.include "src/kernel/memory_manager.s"
|
||||||
.include "src/kernel/hardware.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:
|
kernel_init:
|
||||||
|
18
upload.sh
Normal file
18
upload.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user