]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Merge with c40862b2536786becf4172ec2b16eab166952161
authorjcar <devnull@localhost>
Tue, 24 Aug 2010 11:19:28 +0000 (13:19 +0200)
committerjcar <devnull@localhost>
Tue, 24 Aug 2010 11:19:28 +0000 (13:19 +0200)
1  2 
examples/blinker_node/makefile
examples/pwm_node/build_config.mk
examples/pwm_node/makefile
examples/pwm_node2/makefile
examples/simple/build_config.mk
examples/switch_node/makefile
examples/tiny/build_config.mk
include/Os.h
system/EcuM/EcuM.c
system/kernel/makefile

index 7775e8e28476a069b783cab17291dcf734cecef9,a64521f17844ca794f045dcdaf243e54f0b399ba..ee696f67259d6ce9f168e48eb1e7e1cc171802ae
@@@ -1,47 -1,42 +1,42 @@@
 -
 -# Our object files
 -obj-y += blinker_main.o
 -obj-y += Tasks.o
 -obj-y += Hooks.o
 -obj-y += Rte.o
 -
 -# OS object files.
 -obj-y += Os_Cfg.o
 -# Board object files
 -include $(ROOTDIR)/boards/board_common.mk
 -
 -ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
 -
 -# The more precise configuration, the higher preceedance.
 -VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
 -inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -inc-y += $(ROOTDIR)/system/kernel/include
 -
 -#TODO: Remove?, Build other way?
 -VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
 -inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
 -VPATH += $(ROOTDIR)/components/blinker
 -inc-y += $(ROOTDIR)/components/blinker
 -
 -
 -# libs needed by us 
 -#libitem-y +=
 -
 -#linkfile
 -ldcmdfile-y = linkscript_gcc.ldp
 -vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
 -
 -# What I want to build
 -build-exe-y = blinker_node.elf
 -
 -
 -
 -
 -
 +\r
 +# Our object files\r
 +obj-y += blinker_main.o\r
 +obj-y += Tasks.o\r
 +obj-y += Hooks.o\r
 +obj-y += Rte.o\r
 +\r
- VPATH += ..\r
\r
 +# OS object files.\r
 +obj-y += Os_Cfg.o\r
 +# Board object files\r
 +include $(ROOTDIR)/boards/board_common.mk\r
 +\r
 +ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
 +\r
 +# The more precise configuration, the higher preceedance.\r
 +VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
 +inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
 +\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +inc-y += $(ROOTDIR)/system/kernel/include\r
 +\r
 +#TODO: Remove?, Build other way?\r
- VPATH += ../Rte\r
- inc-y += ../Rte\r
++VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
++inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
 +VPATH += $(ROOTDIR)/components/blinker\r
 +inc-y += $(ROOTDIR)/components/blinker\r
 +\r
- $(warning ROOTDIR: $(ROOTDIR))\r
- $(warning SUBDIR: $(SUBDIR))\r
- $(warning VPATH: $(VPATH))\r
 +\r
 +# libs needed by us \r
 +#libitem-y +=\r
 +\r
 +#linkfile\r
 +ldcmdfile-y = linkscript_gcc.ldp\r
 +vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 +\r
 +# What I want to build\r
 +build-exe-y = blinker_node.elf\r
 +\r
 +\r
 +\r
 +\r
 +\r
index 53c679dcddd72a61dc2698a56bae6973528e4834,ddc3e4e12fbae34458b3333d57b13d2a3ecd26f1..067f3d9fef689385c2f1b32683f7e67a71c5db86
@@@ -1,7 -1,5 +1,7 @@@
 +-include ../config/*.mk\r
 +-include ../config/$(BOARDDIR)/*.mk\r
  \r
- MOD_USE+=KERNEL MCU PORT PWM\r
+ -include ../config/*.mk\r
+ -include ../config/$(BOARDDIR)/*.mk\r
  \r
- SELECT_CONSOLE = RAMLOG\r
- SELECT_OS_CONSOLE = RAMLOG\r
+ MOD_USE+=KERNEL MCU ECUM NEWLIB COMMON DET PORT PWM RAMLOG\r
index 1135c7f45df4bc4b92d929be8a6ac3fdba9b50b7,2260be0ce3e8efe8c0ba688f25282786ee936811..195b735a66267607ad898fbcf44d812098d9b254
@@@ -1,46 -1,44 +1,44 @@@
 -
 -# Our object files
 -obj-y += pwm_sine_main.o
 -obj-y += Tasks.o
 -obj-y += Hooks.o
 -obj-y += Rte.o
 -
 -# OS object files.
 -obj-y += Os_Cfg.o
 -# Board object files
 -include $(ROOTDIR)/boards/board_common.mk
 -
 -ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
 -
 -# The more precise configuration, the higher preceedance.
 -VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
 -inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
 -
 -
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -inc-y += $(ROOTDIR)/system/kernel/include
 -
 -#TODO: Remove?, Build other way?
 -VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
 -inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
 -VPATH += $(ROOTDIR)/components/pwm_sine
 -inc-y += $(ROOTDIR)/components/pwm_sine
 -
 -
 -# libs needed by us 
 -#libitem-y +=
 -
 -#linkfile
 -ldcmdfile-y = linkscript_gcc.ldp
 -vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
 -
 -# What I want to build
 -build-exe-y = pwm_node.elf
 -
 -
 -
 -
 -
 +\r
 +# Our object files\r
 +obj-y += pwm_sine_main.o\r
 +obj-y += Tasks.o\r
 +obj-y += Hooks.o\r
 +obj-y += Rte.o\r
 +\r
- VPATH += ..\r
\r
 +# OS object files.\r
 +obj-y += Os_Cfg.o\r
 +# Board object files\r
 +include $(ROOTDIR)/boards/board_common.mk\r
 +\r
 +ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
 +\r
 +# The more precise configuration, the higher preceedance.\r
 +VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
 +inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
 +\r
 +\r
 +\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +inc-y += $(ROOTDIR)/system/kernel/include\r
 +\r
 +#TODO: Remove?, Build other way?\r
- VPATH += ../Rte\r
- inc-y += ../Rte\r
++VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
++inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
 +VPATH += $(ROOTDIR)/components/pwm_sine\r
 +inc-y += $(ROOTDIR)/components/pwm_sine\r
 +\r
 +\r
 +# libs needed by us \r
 +#libitem-y +=\r
 +\r
 +#linkfile\r
 +ldcmdfile-y = linkscript_gcc.ldp\r
 +vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 +\r
 +# What I want to build\r
 +build-exe-y = pwm_node.elf\r
 +\r
 +\r
 +\r
 +\r
 +\r
index 64d97b16e1811e1a32afbabb78a456ec302bdc3d,41297f8e9c0adfaa15b8b7ddb413c1a43200373b..9e330df0bf0ab262fa6bf92648edde323fde48cb
@@@ -1,47 -1,45 +1,45 @@@
 -
 -# Our object files
 -obj-y += pwm_node2_helpers.o
 -obj-y += fading_led.o
 -obj-y += Rte.o
 -obj-y += Tasks.o
 -obj-y += Hooks.o
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -inc-y += $(ROOTDIR)/system/kernel/include
 -
 -# OS object files.
 -obj-y += Os_Cfg.o
 -# Board object files
 -include $(ROOTDIR)/boards/board_common.mk
 -
 -ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
 -
 -# The more precise configuration, the higher preceedance.
 -VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
 -inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -
 -#TODO: Remove?, Build other way?
 -VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
 -inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
 -VPATH += $(ROOTDIR)/components/fading_led
 -inc-y += $(ROOTDIR)/components/fading_led
 -
 -
 -# libs needed by us 
 -#libitem-y +=
 -
 -#linkfile
 -ldcmdfile-y = linkscript_gcc.ldp
 -vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
 -
 -# What I want to build
 -build-exe-y = pwm_node2.elf
 -
 -
 -
 -
 -
 +\r
 +# Our object files\r
 +obj-y += pwm_node2_helpers.o\r
 +obj-y += fading_led.o\r
 +obj-y += Rte.o\r
 +obj-y += Tasks.o\r
 +obj-y += Hooks.o\r
 +\r
- VPATH += ..\r
\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +inc-y += $(ROOTDIR)/system/kernel/include\r
 +\r
 +# OS object files.\r
 +obj-y += Os_Cfg.o\r
 +# Board object files\r
 +include $(ROOTDIR)/boards/board_common.mk\r
 +\r
 +ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
 +\r
 +# The more precise configuration, the higher preceedance.\r
 +VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
 +inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
 +\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +\r
 +#TODO: Remove?, Build other way?\r
- VPATH += ../Rte\r
- inc-y += ../Rte\r
++VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
++inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
 +VPATH += $(ROOTDIR)/components/fading_led\r
 +inc-y += $(ROOTDIR)/components/fading_led\r
 +\r
 +\r
 +# libs needed by us \r
 +#libitem-y +=\r
 +\r
 +#linkfile\r
 +ldcmdfile-y = linkscript_gcc.ldp\r
 +vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 +\r
 +# What I want to build\r
 +build-exe-y = pwm_node2.elf\r
 +\r
 +\r
 +\r
 +\r
 +\r
index 3eb8133cc041437349575d8cc9709557bd4bdc0e,a1d32b06ef1550bca4d8f75ac8f8fe40310c2693..34aa9bfe6d95c152aec5f32bc61d460f70233ac5
@@@ -1,10 -1,8 +1,10 @@@
 +-include ../config/*.mk\r
 +-include ../config/$(BOARDDIR)/*.mk\r
  \r
- MOD_USE+=KERNEL MCU\r
+ -include ../config/*.mk\r
+ -include ../config/$(BOARDDIR)/*.mk\r
  \r
- SELECT_CONSOLE = RAMLOG\r
- SELECT_OS_CONSOLE = RAMLOG\r
+ MOD_USE+= COMMON DET ECUM MCU NEWLIB KERNEL RAMLOG \r
  \r
- def-y += CFG_RAMLOG_SIZE=1024\r
- def-y += HEAPSIZE=1400
+ #def-y += NDEBUG\r
#def-y += HEAPSIZE=1400
index b2b6b51d5a5c255d607f7d1cb6594c4ca40a9dc0,d9bf0e99cd9dd69beb9186ebdac08e9727e4c228..8ef59e3702351431fc237db9840af66dbc6ca366
@@@ -1,47 -1,45 +1,45 @@@
 -
 -# Our object files
 -obj-y += switch_node_helpers.o
 -obj-y += switch.o
 -obj-y += Rte.o
 -obj-y += Tasks.o
 -obj-y += Hooks.o
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -inc-y += $(ROOTDIR)/system/kernel/include
 -
 -# OS object files.
 -obj-y += Os_Cfg.o
 -# Board object files
 -include $(ROOTDIR)/boards/board_common.mk
 -
 -ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
 -
 -# The more precise configuration, the higher preceedance.
 -VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
 -inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
 -
 -inc-y += $(ROOTDIR)/system/kernel/$(objdir)
 -
 -#TODO: Remove?, Build other way?
 -VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
 -inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
 -VPATH += $(ROOTDIR)/components/switch
 -inc-y += $(ROOTDIR)/components/switch
 -
 -
 -# libs needed by us 
 -#libitem-y +=
 -
 -#linkfile
 -ldcmdfile-y = linkscript_gcc.ldp
 -vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
 -
 -# What I want to build
 -build-exe-y = switch_node.elf
 -
 -
 -
 -
 -
 +\r
 +# Our object files\r
 +obj-y += switch_node_helpers.o\r
 +obj-y += switch.o\r
 +obj-y += Rte.o\r
 +obj-y += Tasks.o\r
 +obj-y += Hooks.o\r
 +\r
- VPATH += ..\r
\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +inc-y += $(ROOTDIR)/system/kernel/include\r
 +\r
 +# OS object files.\r
 +obj-y += Os_Cfg.o\r
 +# Board object files\r
 +include $(ROOTDIR)/boards/board_common.mk\r
 +\r
 +ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
 +\r
 +# The more precise configuration, the higher preceedance.\r
 +VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
 +inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
 +\r
 +inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
 +\r
 +#TODO: Remove?, Build other way?\r
- VPATH += ../Rte\r
- inc-y += ../Rte\r
++VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
++inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
 +VPATH += $(ROOTDIR)/components/switch\r
 +inc-y += $(ROOTDIR)/components/switch\r
 +\r
 +\r
 +# libs needed by us \r
 +#libitem-y +=\r
 +\r
 +#linkfile\r
 +ldcmdfile-y = linkscript_gcc.ldp\r
 +vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
 +\r
 +# What I want to build\r
 +build-exe-y = switch_node.elf\r
 +\r
 +\r
 +\r
 +\r
 +\r
index 2608ec9f2909c83227fe96ef915597ed98e061a4,82c87f2b742959d52f728c6640bb18b96d9f2ea1..cfacb3920b242372efa1e7943f41e852e90f6f5a
@@@ -1,10 -1,11 +1,13 @@@
 +-include ../config/*.mk\r
 +-include ../config/$(BOARDDIR)/*.mk\r
  \r
- MOD_USE+=KERNEL MCU\r
+ -include ../config/*.mk\r
+ -include ../config/$(BOARDDIR)/*.mk\r
\r
+ MOD_USE+=COMMON DET ECUM MCU NEWLIB KERNEL RAMLOG \r
  \r
  SELECT_CONSOLE = RAMLOG\r
  SELECT_OS_CONSOLE = RAMLOG\r
  \r
  def-y += CFG_RAMLOG_SIZE=1024\r
- def-y += HEAPSIZE=400
+ #def-y += HEAPSIZE=400\r
diff --combined include/Os.h
index 532b2f3eb00797d103059f6a3ebd9d2f685c48e4,55dd70b8eb1de5f32a6bc4dbcd10a75409d7c616..744f4b0bb59724fcb5af55d41163cdd523c38633
@@@ -169,7 -169,7 +169,7 @@@ static inline void DisableAllInterrupts
        Irq_Disable();\r
        Os_IntDisableAllCnt++;\r
        /* No nesting allowed */\r
 -      assert(Os_IntDisableAllCnt>1);\r
 +      assert(Os_IntDisableAllCnt==1);\r
  }\r
  \r
  static inline void EnableAllInterrupts( void ) {\r
@@@ -263,13 -263,7 +263,7 @@@ typedef struct OsDriver_s 
        int     OsGptChannelRef;\r
  } OsDriver;\r
  \r
- /*-------------------------------------------------------------------\r
-  * Free running timer\r
-  *-----------------------------------------------------------------*/\r
- typedef const uint32 OsTickType;\r
- void Os_SysTickInit( void );\r
- void Os_SysTickStart(uint32_t period_ticks);\r
- uint32_t Os_SysTickGetTimeElapsed( void );\r
\r
  \r
  /*-------------------------------------------------------------------\r
   * Counters\r
@@@ -283,6 -277,16 +277,16 @@@ StatusType IncrementCounter( CounterTyp
  StatusType GetCounterValue( CounterType, TickRefType );\r
  StatusType GetElapsedCounterValue( CounterType, TickRefType val, TickRefType elapsed_val);\r
  \r
\r
+ /*-------------------------------------------------------------------\r
+  * System timer\r
+  *-----------------------------------------------------------------*/\r
+ typedef const uint32 OsTickType;\r
+ void Os_SysTickInit( void );\r
+ void Os_SysTickStart(TickType period_ticks);\r
+ TickType Os_SysTickGetValue( void );\r
+ TickType Os_SysTickGetElapsedValue( TickType preValue );\r
\r
  /*-------------------------------------------------------------------\r
   * Schedule Tables\r
   *-----------------------------------------------------------------*/\r
@@@ -348,21 -352,21 +352,21 @@@ typedef enum 
      OSServiceId_GetTaskState,\r
  } OsServiceIdType;;\r
  \r
- typedef struct os_error_s {\r
+ typedef struct OsError {\r
        OsServiceIdType serviceId;\r
        uint32_t param1;\r
        uint32_t param2;\r
        uint32_t param3;\r
- } os_error_t;\r
+ } OsErrorType;\r
  \r
- extern os_error_t os_error;\r
+ extern OsErrorType os_error;\r
  \r
  // TODO: Add the service id to all OS service methods.\r
  static inline OsServiceIdType OSErrorGetServiceId(void)  {\r
        return os_error.serviceId;\r
  }\r
  \r
- extern os_error_t os_error;\r
+ extern OsErrorType os_error;\r
  \r
  #define OSError_ActivateTask_TaskID ((TaskType) os_error.param1)\r
  #define OSError_ChainTask_TaskID ((TaskType) os_error.param1)\r
diff --combined system/EcuM/EcuM.c
index 77a32b1e907b1acc39a1e61e56d61a206d623c11,d4da75a34d54dbc83419490f09d39f90c6211813..935eebc29e7a4946976231bc00cc00676c492b32
   * for more details.\r
   * -------------------------------- Arctic Core ------------------------------*/\r
  \r
\r
\r
\r
\r
\r
\r
\r
  #include "EcuM.h"\r
  #include "Modules.h"\r
  #include "string.h"\r
@@@ -87,18 -80,17 +80,18 @@@ void EcuM_StartupTwo(
  \r
  #if   (ECUM_INCLUDE_NVRAM_MGR == STD_ON)\r
        // Start timer to wait for NVM job to complete\r
-       timer = Os_SysTickGetTimeElapsed();\r
+       timer = Os_SysTickGetValue();\r
  #endif\r
  \r
        // Prepare the system to startup RTE\r
        // TODO EcuM_OnRTEStartup();\r
 -\r
 -      //Rte_Start();\r
 +#if defined(USE_RTE)\r
 +      Rte_Start();\r
 +#endif\r
  \r
  #if   (ECUM_INCLUDE_NVRAM_MGR == STD_ON)\r
        // Wait for the NVM job to terminate\r
-       while(Os_SysTickGetTimeElapsed()-timer < internal_data.config.EcuMNvramReadAllTimeout)\r
+       while(Os_SysTickGetValue()-timer < internal_data.config.EcuMNvramReadAllTimeout)\r
        {\r
                //TODO\r
        }\r
diff --combined system/kernel/makefile
index 78a77f4809f5835e202e2fbbc438a6ba50145daa,88374dfbdd63aa4194cf4e1db70849de717a9851..319217c72519ecc132d79fa620216404595aedb6
@@@ -26,7 -26,6 +26,7 @@@ obj-y += sys_tick.
  #obj-y += stack.o\r
  obj-y += isr.o\r
  obj-y += os_arctest.o\r
 +#obj-y += application.o\r
  \r
  \r
  # These are VERY cpu dependent.. remove\r
@@@ -37,7 -36,6 +37,6 @@@ obj-y += irq.
  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