summaryrefslogtreecommitdiff
path: root/ecos
diff options
context:
space:
mode:
authorsave2008-03-31 14:01:30 +0000
committersave2008-03-31 14:01:30 +0000
commit86c9a451538c4a892d136a138d535709777ea969 (patch)
tree08771dfb390aa5078dbbfc3754e046ac66d1ac75 /ecos
parentf86ac7d2da5067745e244925dd3e92647f056753 (diff)
Recoved argc argv given by Maximus to check the current tick during ecos starting up
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1701 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'ecos')
-rw-r--r--ecos/packages/hal/maximus/arch/current/src/maximus_entry.c6
-rw-r--r--ecos/packages/hal/maximus/arch/current/src/maximus_intr.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c b/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
index 350d554b8a..3875ed1b15 100644
--- a/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
+++ b/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
@@ -68,8 +68,10 @@ cyg_hal_invoke_constructors (void)
externC void cyg_start( void );
externC void maximus_hardware_init(void);
-externC void maximus_hardware_init2(void);
+externC void maximus_hardware_init2(int argc, char **argv);
+externC int cyg_hal_sys_argc;
+externC char **cyg_hal_sys_argv;
void _linux_entry( void )
{
void* new_top = (void*) 0;
@@ -121,7 +123,7 @@ void _linux_entry( void )
// I/O auxiliary will have loaded the appropriate support
// scripts, and the auxiliary can now map the window(s) on to
// the display and generally operate normally.
- maximus_hardware_init2();
+ maximus_hardware_init2(cyg_hal_sys_argc, cyg_hal_sys_argv);
// "Call cyg_start()". OK.
cyg_start();
diff --git a/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c b/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
index ad7f7e444e..08ec1d482f 100644
--- a/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
+++ b/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
@@ -34,6 +34,7 @@
#include "common/std.h"
#include "host/station.h"
+#include "lib/atox.h"
// global variable to communicate with SCI Layer
station_ctx_t my_station = {0};
@@ -453,7 +454,12 @@ maximus_hardware_init(void)
// drivers have been initialized and will have performed appropriate
// interactions with the SCI layer.
void
-maximus_hardware_init2(void)
+maximus_hardware_init2(int argc, char **argv)
{
station_init(&my_station);
+ if(argc > 1)
+ {
+ my_station.current_tick_tck = atoll(argv[1]);
+ hal_clock_initialize(TICK_HZ / 100);
+ }
}