]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Kernel now built with it's config. examples/simple verified in PPC simulator.
authormahi <devnull@localhost>
Wed, 10 Feb 2010 17:18:34 +0000 (18:18 +0100)
committermahi <devnull@localhost>
Wed, 10 Feb 2010 17:18:34 +0000 (18:18 +0100)
arch/ppc/mpc55xx/scripts/linkscript_gcc.ldf
boards/board_common.mk
examples/simple/config/Os_Cfg.c
examples/tiny/build_config.mk
include/Os.h
include/os_config_macros.h
makefile
scripts/rules.mk
system/kernel/include/pcb.h
system/kernel/makefile
system/kernel/testsystem/config/Os_Cfg.c

index e6f8431fb9e16502a4d071857d0949ed85c424d9..0e37084c24ee8e8657c9ed81fab8507313725f0d 100644 (file)
@@ -86,7 +86,7 @@ SECTIONS
        .t32_outport ALIGN(0x10): { *(.t32_outport); }                  > ram\r
        .got : AT(ALIGN(LOADADDR(.sdata)+SIZEOF(.sdata),4)) { *(.got.plt) *(.got) } > ram\r
        .bss : { *(.bss .bss.* COMMON .gnu.linkonce.b.*);__BSS_END      = .; }  > ram\r
-       .init_stack ALIGN(16) (NOLOAD) : {      __SP_END        = .;. = . + 3000;       __SP_INIT       = .; } > ram\r
+       .init_stack ALIGN(16) (NOLOAD) : {      __SP_END        = .;. = . + 200;        __SP_INIT       = .; } > ram\r
        /* Fls RAM section */\r
        .fls_ram ALIGN(16) (NOLOAD) : {\r
                __FLS_ERASE_RAM__ = .;\r
index 8905c59e3e2278e6de1896f0d9dda0cc3a6cdf8e..d37f717aea1e9ec13822939ffa6ba090226e5613 100644 (file)
@@ -57,6 +57,8 @@ obj-$(USE_PORT) += Port_Cfg.o
 obj-$(USE_ADC) += Adc.o\r
 obj-$(USE_ADC) += Adc_Cfg.o\r
 \r
+# Include the kernel\r
+include $(ROOTDIR)/system/kernel/makefile\r
 \r
 # Spi\r
 obj-$(USE_SPI) += Spi.o\r
@@ -171,8 +173,6 @@ VPATH += $(ROOTDIR)/common
 obj-y += newlib_port.o\r
 obj-y += $(obj-y-y)\r
 \r
-#def-y += CC_KERNEL\r
-\r
 vpath-y += $(ROOTDIR)/$(ARCH_PATH-y)/kernel\r
 vpath-y += $(ROOTDIR)/$(ARCH_PATH-y)/drivers\r
 vpath-y += $(ROOTDIR)/boards/$(BOARDDIR)\r
index e693d0f777499432da92daf72bfc0eed8d9faea5..04ed730a688b123b33dca7d157873857a6034c37 100644 (file)
  * -------------------------------- Arctic Core ------------------------------*/
 
 #include <stdlib.h>\r
-#include <stdint.h>\r
+#include <stdint.h>
+#include "Platform_Types.h"
+#include "Os.h"                                // includes Os_Cfg.h
 #include "os_config_macros.h"\r
-#include "Platform_Types.h"\r
-#include "Os.h"                                // includes Os_Cfg.h\r
 #include "kernel.h"\r
 #include "kernel_offset.h"\r
 #include "alist_i.h"\r
index 7a3691060d53a2089ff5724b7d80e595af2610aa..6b2e24ce47b1a59e462c5e17e88edcb0dff5a579 100644 (file)
@@ -1,5 +1,7 @@
 \r
 \r
-MOD_USE+=KERNEL MCU SIMPLE_PRINTF\r
+#MOD_USE+=KERNEL MCU SIMPLE_PRINTF\r
+MOD_USE+=KERNEL MCU\r
+def-y += HEAPSIZE=400\r
 #RAMLOG\r
 \r
index e0d426907f0d0fe92074db0d0c2170324c20296c..667dbe6389f0262eedae28bf2a19be28b3b84012 100644 (file)
@@ -24,9 +24,7 @@
 
 #include <assert.h>\r
 #include "Std_Types.h"\r
-#if !defined(CC_KERNEL)\r
 #include "Os_Cfg.h"\r
-#endif\r
 #include "MemMap.h"\r
 #include "Cpu.h"\r
 \r
index 097cd37a4ca8314a52f0e7c98453819d4b1b1626..a821232fc38ab1a99286e4ecd6eebc2cae1a0cef 100644 (file)
@@ -27,7 +27,7 @@
 // +1 here.. easy to have a reference..\r
 #define GEN_TRUSTEDFUNCTIONS_LIST trusted_func_t os_cfg_trusted_list[SERVICE_CNT];\r
 \r
-#define GEN_APPLICATION_HEAD OsRomApplicationType rom_app_list[] =\r
+#define GEN_APPLICATION_HEAD const OsRomApplicationType rom_app_list[] =\r
 \r
 #define GEN_APPLICATON(        _id,_name,_trusted,_startuphook,_shutdownhook, \\r
                                                _errorhook,_isr_mask,_scheduletable_mask, _alarm_mask, \\r
        } \\r
 }\r
 
-#if (  OS_SC3 == STD_ON) || (  OS_SC4 == STD_ON)\r
+#if (  OS_SC3 == STD_ON) || (  OS_SC4 == STD_ON)
+#error BEPA
 #define GEN_HOOKS( _startup, _protection, _shutdown, _error, _pretask, _posttask ) \\r
 struct OsHooks os_conf_global_hooks = { \\r
                .StartupHook = _startup,                \
index 76a5378389afd1e7f16d694bf85befd7e765242a..250946191401cb9a6afe0700008b71f527405445 100644 (file)
--- a/makefile
+++ b/makefile
@@ -48,7 +48,7 @@ endif
 USE_T32_SIM?=n\r
 export USE_T32_SIM\r
 \r
-override BDIR := system/kernel ${BDIR} \r
+override BDIR := system/kernel ${BDIR} \r
 \r
 # Tools\r
 # Ugly thing to make things work under cmd.exe \r
@@ -63,10 +63,10 @@ export objdir = obj_$(BOARDDIR)
 .PHONY: help\r
 help:\r
        @echo "Make kernel and a simple example"\r
-       @echo "  > make BOARDDIR=mpc551xsim CROSS_COMPILE=/opt/powerpc-eabi/bin/powerpc-eabi- BDIR=system/kernel,examples/simple all"\r
+       @echo "  > make BOARDDIR=mpc551xsim CROSS_COMPILE=/opt/powerpc-eabi/bin/powerpc-eabi- BDIR=examples/simple all"\r
        @echo ""\r
        @echo "Save the config (CROSS_COMPILE and BDIR)"\r
-       @echo "  > make BOARDDIR=mpc551xsim CROSS_COMPILE=/opt/powerpc-eabi/bin/powerpc-eabi- BDIR=system/kernel,examples/simple save"\r
+       @echo "  > make BOARDDIR=mpc551xsim CROSS_COMPILE=/opt/powerpc-eabi/bin/powerpc-eabi- BDIR=examples/simple save"\r
        @echo ""\r
        @echo "Clean"\r
        @echo "  > make clean"\r
index 516249205dce00602d47e02dc3ae9b5a5362636e..01643be3c7579e5618831c9e531bf46f05b514f1 100644 (file)
@@ -127,7 +127,7 @@ $(build-hex-y): $(build-exe-y)
        $(Q)$(CROSS_COMPILE)objcopy -O ihex $< $@\r
 \r
 # Could use readelf -S instead of parsing the *.map file.\r
-$(build-exe-y): $(obj-y) $(sim-y) $(libitem-y) $(ldcmdfile-y)\r
+$(build-exe-y): $(dep-y) $(obj-y) $(sim-y) $(libitem-y) $(ldcmdfile-y)\r
        @echo "  >> LD $@"\r
        $(Q)$(LD) $(LDFLAGS) -T $(ldcmdfile-y) -o $@ $(libpath-y) --start-group $(obj-y) $(lib-y) $(libitem-y) --end-group $(LDMAPFILE)\r
        @echo "Image size: (decimal)"\r
index 2b1eba752a3777ce34407793257f28e7dffa9b90..493a26ef09f4f6e625f3c821741d8375b1434cd2 100644 (file)
@@ -78,7 +78,7 @@ typedef sint8 OsPriorityType;
  * */
 
 typedef struct OsHooks {
-#if (  OS_SC2 == STD_ON ) || ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON )
+#if (  OS_SC2 == STD_ON ) || ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON )
        ProtectionHookType      ProtectionHook;
 #endif
        StartupHookType         StartupHook;
@@ -178,13 +178,13 @@ typedef struct OsPcb {
 /*-----------------------------------------------------------------*/
 
 typedef struct OsRomPcb {
-       TaskType                pid;
-       uint8                   prio;
+       OsTaskidType    pid;
+       OsPriorityType  prio;
        uint32                  app_mask;
        void                    (*entry)();
        proc_type_t     proc_type;
        uint8                   autostart;
-       OsStackType             stack;
+       OsStackType     stack;
        int                             vector;                                 // ISR
        ApplicationType application_id;
        char                    name[16];
index 3427d37d788c762801989a6c6c36a85fd9f54209..5a4f73e01dad4364a8588f29c5dcaa5b58eb0aaa 100644 (file)
@@ -32,7 +32,6 @@ obj-y += os_arctest.o
 obj-y += irq.o\r
 \r
 # We are compiling the kernel\r
-def-y+=CC_KERNEL\r
 dep-y += asm_offset.h\r
 dep-y += kernel_offset.h\r
 dep-$(CFG_ARM_CM3) += arch_offset.h\r
@@ -53,7 +52,8 @@ asm_offset.h: asm_offset.c
        @$(SED) -n "/#define/p" $(<:.c=.s) > $@\r
        @rm     $(<:.c=.s)\r
        \r
-VPATH += ..    \r
+#VPATH += ..\r
+VPATH += $(ROOTDIR)/system/kernel\r
 VPATH += $(ROOTDIR)/arch/$(ARCH_FAM)/$(ARCH)/kernel\r
 VPATH += $(ROOTDIR)/arch/$(ARCH_FAM)/$(ARCH)/drivers\r
 \r
index 5a29e0a445546def0b973a66d5bc61a8dcdde821..67fb297ad198494c2c426c935b2c1e0fcc93ca40 100644 (file)
@@ -383,7 +383,7 @@ GEN_SCHEDULETABLE_HEAD {
 \r
 struct OsHooks os_conf_global_hooks = {\r
                .StartupHook = StartupHook,
-#if (  OS_SC2 == STD_ON ) || ( OS_SC1 == STD_ON ) || ( OS_SC4 == STD_ON )\r
+#if (  OS_SC2 == STD_ON ) || ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON )\r
                .ProtectionHook = ProtectionHook,
 #endif\r
                .ShutdownHook = ShutdownHook,\r