]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Support for case insenstive make. msys make that is
authormahi <devnull@localhost>
Sun, 20 Sep 2009 08:21:20 +0000 (10:21 +0200)
committermahi <devnull@localhost>
Sun, 20 Sep 2009 08:21:20 +0000 (10:21 +0200)
14 files changed:
.hgignore [new file with mode: 0644]
arch/arm/arm_cm3/drivers/misc.c
arch/arm/arm_cm3/kernel/Frt.c
arch/arm/arm_cm3/kernel/arch.c
arch/arm/arm_cm3/kernel/arch_krn.sx [moved from arch/arm/arm_cm3/kernel/arch_krn.S with 83% similarity]
arch/arm/arm_cm3/kernel/int_ctrl.c
arch/ppc/crt0.sx [moved from arch/ppc/crt0.S with 100% similarity]
arch/ppc/mpc55xx/drivers/Mcu_Exceptions.sx [moved from arch/ppc/mpc55xx/drivers/Mcu_Exceptions.S with 100% similarity]
arch/ppc/mpc55xx/kernel/arch_krn.sx [moved from arch/ppc/mpc55xx/kernel/arch_krn.S with 100% similarity]
examples/tiny/makefile
scripts/cc_gcc.mk
scripts/rules.mk
system/kernel/makefile
tools/t32/load.cmm

diff --git a/.hgignore b/.hgignore
new file mode 100644 (file)
index 0000000..31879ae
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,16 @@
+# use glob syntax.\r
+syntax: glob\r
+\r
+*.d\r
+*.o\r
+*.elf\r
+*.map\r
+*.hex\r
+*.bak\r
+*~\r
+\r
+# switch to regexp syntax.\r
+syntax: regexp\r
+^.*obj_.*\.[h|c|s]\r
+\r
+\r
index c662b888e244c648cf7092f0b81444d197b79c43..7dc12955944bbc6d12be01b6e91c4875f683244a 100644 (file)
@@ -43,6 +43,8 @@
 \r
 /* Includes ------------------------------------------------------------------*/\r
 #include "misc.h"\r
+
+#define assert_param(expr) ((void)0)
 \r
 /** @addtogroup STM32F10x_StdPeriph_Driver\r
   * @{\r
index 6a65c4352e7c6d3234df8b60cc071798a7afae90..e1322a19000aa57facd14e9fd7d92e883ccd1577 100644 (file)
@@ -54,6 +54,9 @@ void Frt_Start(uint32_t period_ticks) {
 
        SysTick_Config(period_ticks);
 
+        /* Set SysTick Priority to 3 */
+       NVIC_SetPriority(SysTick_IRQn, 0x0C);
+
 #if 0
        // SysTick interrupt each 250ms with counter clock equal to 9MHz
        if (SysTick_Config((SystemFrequency / 8) / 4)) {
index c7d465c3986a758e3ff5652067eab122df1e2c08..6e1b553951c656b71be372fa1773ed051843e605 100644 (file)
@@ -30,6 +30,7 @@
 #include "arch_offset.h"\r
 #include "stm32f10x.h"\r
 #include "core_cm3.h"\r
+#include "arch.h"
 \r
 /**\r
  * Function make sure that we switch to supervisor mode(rfi) before\r
@@ -62,7 +63,8 @@ void os_arch_setup_context( pcb_t *pcb ) {
                context[VGPR_LR_OFF/4] = (uint32_t)os_proc_start_extended;\r
        } else if( pcb->proc_type == PROC_BASIC ) {\r
                context[VGPR_LR_OFF/4] = (uint32_t)os_proc_start_basic;\r
-       }\r
+       }
+       os_arch_stack_set_endmark(pcb);\r
 // os_arch_setup_context_asm(pcb->stack.curr,NULL);\r
 }\r
 \r
similarity index 83%
rename from arch/arm/arm_cm3/kernel/arch_krn.S
rename to arch/arm/arm_cm3/kernel/arch_krn.sx
index 61972757ccc9e53d641b2299741ae15b836d3e17..cd5b90f23a391e486f539c0e014d9d58bb833a21 100644 (file)
@@ -25,9 +25,9 @@
  *\r
  */\r
        .global os_arch_swap_context\r
-       .type   os_arch_swap_context_to, %function\r
+       .type   os_arch_swap_context, %function\r
 os_arch_swap_context:\r
-    mov     r0, sp\r
+//    mov     r2, sp\r
     push    {r4-r8,r10,r11,lr}\r
 \r
     // Store c-frame\r
@@ -35,11 +35,12 @@ os_arch_swap_context:
 \r
     mov.w   r4,#SC_PATTERN\r
     str     r4,[sp,#C_CONTEXT_OFFS]\r
-    str     r0,[sp,#C_SP_OFF]\r
+//    str     r2,[sp,#C_SP_OFF]\r
        // ---> We have saved NVGPR+C\r
 \r
     // store old stack for old task\r
-    str     sp,[r0,#PCB_STACK_CURR_P]\r
+    mov.w      r4,sp\r
+    str     r4,[r0,#PCB_STACK_CURR_P]\r
 \r
 // R1 - new PCB\r
        .global os_arch_swap_context_to\r
@@ -48,7 +49,9 @@ os_arch_swap_context_to:
 \r
     // Get stack for new task\r
     ldr        r2,[r1,#PCB_STACK_CURR_P]\r
-    msr                msp,r2\r
+//    msr              msp,r2\r
+    mov.w      sp,r2\r
+    \r
 \r
 // TODO: Fix this for all arch's..call pre,post hooks. Done here or after?\r
 // Set new current pcb\r
@@ -74,7 +77,7 @@ os_sc_restore:
 \r
 os_lc_restore:\r
     add.w   sp,sp,#C_SIZE\r
-    pop     {lr,r11,r10,r8,r7,r6,r5,r4}\r
+    pop     {r4-r8,r10,r11,lr}\r
     // ehh, we are in handler mode so a bx instruction works here\r
     bx      lr\r
 \r
index 5bd1a45899ab1d3fb754b3057b3198a2089b379b..473ab8c05f6f3fc9410f88c875377f3752daf16c 100644 (file)
@@ -34,6 +34,7 @@
 #include "hooks.h"
 #include "swap.h"
 #include "stm32f10x.h"
+#include "misc.h"
 #include "int_ctrl.h"
 
 extern void * intc_vector_tbl[NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS];
@@ -105,11 +106,19 @@ void IntCtrl_AttachIsr1( void (*entry)(void), void *int_ctrl, uint32_t vector, u
  */
 void IntCtrl_AttachIsr2(TaskType tid,void *int_ctrl,uint32_t vector ) {
        pcb_t *pcb;
+       NVIC_InitTypeDef irqInit;
+
+       NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
+
+       irqInit.NVIC_IRQChannel = vector;
+       irqInit.NVIC_IRQChannelPreemptionPriority = 4;
+       irqInit.NVIC_IRQChannelSubPriority = 4;
+       irqInit.NVIC_IRQChannelCmd = ENABLE;
 
        pcb = os_find_task(tid);
 
        // TODO: Same as for AttachIsr1
-
+       NVIC_Init(&irqInit);
 }
 
 
similarity index 100%
rename from arch/ppc/crt0.S
rename to arch/ppc/crt0.sx
index 5ee5caa499f4baf2548c53b9870511faca0813da..da948dda7d2c3c9e97f0de37a0288c95b14537b4 100644 (file)
@@ -25,7 +25,11 @@ libitem-y += $(ROOTDIR)/libs/libkernel_$(ARCH_MCU).a
 ldcmdfile-y = -T $(ROOTDIR)/$(ARCH_PATH-y)/scripts/linkscript_gcc.ldf\r
 \r
 # What I want to build\r
-build-exe-y = simple.elf\r
+build-exe-y = tiny.elf\r
+build-hex-y = tiny.hex\r
+\r
+\r
+\r
 \r
 \r
 \r
index 0ec3a6e462ad5772cee832f7e95af2ed584426dd..4e34720d51ddc326de75983c5383658e55ee8871 100644 (file)
@@ -55,16 +55,18 @@ CPP =       $(CC) -E
 \r
 comma = ,\r
 empty = \r
-space = $(empty) $(empty)  \r
+space = $(empty) $(empty)\r
 \r
 # Note!\r
 # Libs related to GCC(libgcc.a, libgcov.a) is located under \r
 # lib/gcc/<machine>/<version>/<multilib>\r
 # Libs related to the library (libc.a,libm.a,etc) are under:\r
 # <machine>/lib/<multilib>\r
-gcc_lib_path := "$(subst /libgcc.a,,$(shell $(CC) $(CFLAGS) --print-libgcc-file-name $(conv_path)))"\r
-#$(error $(gcc_lib_path)) \r
-lib_lib_path := "$(subst /libc.a,,$(shell $(CC) $(CFLAGS) --print-file-name\=libc.a $(conv_path)))"\r
+\r
+# It seems some versions of make want "\=" and some "="\r
+# "=" - msys cpmake on windows 7 \r
+gcc_lib_path := "$(subst /libgcc.a,,$(shell $(CC) $(CFLAGS) --print-libgcc-file-name))" \r
+lib_lib_path := "$(subst /libc.a,,$(shell $(CC) $(CFLAGS) --print-file-name=libc.a))"\r
 libpath-y += -L$(lib_lib_path)\r
 libpath-y += -L$(gcc_lib_path)\r
 # ---------------------------------------------------------------------------\r
index a32aff8214b2739fa202ece15007163432a2ea58..557dc719ce9afbc651b1f759a6aa8b76700ee6ad 100644 (file)
@@ -64,7 +64,7 @@ config:
        @echo $(MOD) ${def-y}\r
 \r
 # build- targets are "end" target that the included makefile want's to build\r
-all: $(build-lib-y) $(build-exe-y)\r
+all: $(build-lib-y) $(build-exe-y) $(build-hex-y)\r
 \r
 # Determine what kind of filetype to build from  \r
 VPATH += $(ROOTDIR)/$(SUBDIR)/src\r
@@ -93,11 +93,7 @@ inc-y += ../include
 # PP Assembler \r
 #.SECONDARY %.s:\r
 \r
-%.s: %.S\r
-       @echo "  >> CPP $(notdir $<)"\r
-       $(Q)$(CPP) -o $@ $(addprefix -I ,$(inc-y)) $(addprefix -D,$(def-y)) $<\r
-\r
-%.s: %.ps\r
+%.s: %.sx\r
        @echo "  >> CPP $(notdir $<)"\r
        $(Q)$(CPP) -x assembler-with-cpp -o $@ $(addprefix -I ,$(inc-y)) $(addprefix -D,$(def-y)) $<\r
 \r
@@ -115,6 +111,10 @@ $(build-lib-y): $(dep-y) $(obj-y)
        @echo "  >> AR $@"   \r
        $(Q)$(AR) -r -o $@ $(obj-y) 2> /dev/null\r
 \r
+$(build-hex-y): $(build-exe-y)\r
+       @echo "  >> OBJCOPY $@"   \r
+       $(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) \r
        @echo "  >> LD $@"\r
index d31a2aaf427d6ad3e1ff8bc3770fa52de70e09de..ce2d62906cf98a1d0641b01d52347bd476831459 100644 (file)
@@ -33,6 +33,8 @@ def-y+=CC_KERNEL
 dep-y += asm_offset.h\r
 dep-y += kernel_offset.h\r
 dep-$(CFG_ARM_CM3) += arch_offset.h\r
+obj-$(CFG_ARM_CM3) += misc.o\r
+\r
 \r
 # ARM assembler generates "define STACK_APA $12". The extra '$' we want to go.\r
 # Assembler offsets\r
index 8c4fcebc164c8d3f208e2ef162373c4d91dd7a87..9eaaf6393c8c15780e84f958a0979132e6dbcb42 100644 (file)
@@ -27,7 +27,7 @@ load:
     \r
   do config save   \r
   do flash open\r
-  data.load.elf &cfg_loadfile_g /CYGDRIVE /GNU \r
+  data.load.elf &cfg_loadfile_g /CYGDRIVE /GNU \r
   do flash close\r
   print "&cfg_loadfile_g"\r
 \r
@@ -120,5 +120,6 @@ path:
 \r
 \r
 \r
+\r
 \r
 \r