summaryrefslogblamecommitdiff
path: root/make_test.sh
blob: 7403f3cf0091979bfd0ba37fe8f9789dfbc2e5b0 (plain) (tree)
1
2
3
4
5
6
7
8
9

                 

                                            

                                
                         
                                            
                                                              
 

                                                                 
                                                           
                                                            

                                                
                                
                   
#!/usr/bin/env sh

echo "Making object files..."
arm-none-eabi-as -obootloader.o bootloader.s
arm-none-eabi-as -otest.o test.s

echo "Making binaries..."
arm-none-eabi-ld -Ttest.ld -otest.elf test.o
arm-none-eabi-ld -Tbootloader.ld -obootloader.elf bootloader.o

echo "Stripping binary..."
arm-none-eabi-strip --strip-debug --strip-unneeded bootloader.elf
arm-none-eabi-strip --strip-debug --strip-unneeded test.elf
arm-none-eabi-objcopy -Obinary bootloader.elf bootloader.bin
arm-none-eabi-objcopy -Obinary test.elf test.agb

echo "Patching header (test)..."
agbsum -psitest.agb