changeset 404:a284749c5729

Improved build scripts
author Windel Bouwman
date Thu, 19 Feb 2015 14:08:17 +0100
parents 1613c9d479bf
children f381cea07fec
files kernel/arch/cortexm3.c3 kernel/arch/qemu_vexpress/start.asm kernel/build.xml kernel/qemutst.sh run.sh user/build.xml
diffstat 6 files changed, 18 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/kernel/arch/cortexm3.c3	Thu Feb 19 12:17:05 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-module arch;
-
-function void init()
-{
-    var int *UART0DR;
-    UART0DR = cast<int*>(0x10009000); // UART0 DR register
-    *UART0DR = 0x65;
-}
-
-function void putc(int c)
-{
-// TODO
-}
-
-function void halt()
-{
-}
-
--- a/kernel/arch/qemu_vexpress/start.asm	Thu Feb 19 12:17:05 2015 +0100
+++ b/kernel/arch/qemu_vexpress/start.asm	Thu Feb 19 14:08:17 2015 +0100
@@ -1,3 +1,6 @@
+
+; This file contains the low level assembly code required for interrupt
+; handling and virtual memory.
 
 section reset
 
@@ -14,6 +17,8 @@
 
 start:
 
+; Setup the memory manager and the stack before entering kernel
+
 ; Setup TTBR1 (translation table base register)
 
 ldr r0, =kernel_table0    ; pseudo instruction which loads the value of the symbol
@@ -40,7 +45,7 @@
 
 ; Setup stack:
 mov sp, 0x30000
-BL kernel_start          ; Branch to main (this is actually in the interrupt vector)
+BL kernel_start  ; Branch to main (this is actually in the interrupt vector)
 local_loop:
 B local_loop
 
--- a/kernel/build.xml	Thu Feb 19 12:17:05 2015 +0100
+++ b/kernel/build.xml	Thu Feb 19 14:08:17 2015 +0100
@@ -21,11 +21,12 @@
         <link output="obj/kernel.elf"
             target="arm"
             layout="arch/qemu_vexpress/layout.mmap"
-            objects="obj/kernel.o;start.o;ramdisk.o" />
+            objects="obj/kernel.o;obj/start.o" />
 
         <objcopy
-            objectfile="kernel.o"
+            objectfile="obj/kernel.elf"
             imagename="image"
+            format="bin"
             output="kernel_arm.bin" />
 
     </target>
--- a/kernel/qemutst.sh	Thu Feb 19 12:17:05 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-# -S means halt at start:
-qemu-system-arm -M vexpress-a9 -m 128M -kernel kernel_arm.bin \
-    -serial stdio -s
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run.sh	Thu Feb 19 14:08:17 2015 +0100
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+set -e
+
+# -S means halt at start:
+qemu-system-arm -M vexpress-a9 -m 128M -kernel kernel_arm.bin \
+    -serial stdio
+
--- a/user/build.xml	Thu Feb 19 12:17:05 2015 +0100
+++ b/user/build.xml	Thu Feb 19 14:08:17 2015 +0100
@@ -4,7 +4,7 @@
     </target>
 
     <target name="hello">
-        <compile sources="hello.c3;lib/*.c3"
+        <compile sources="hello/hello.c3;lib/*.c3"
                  target="arm"
                  output="obj/hello.o"/>
         <link output="obj/hello.elf" layout="app.mmap"