Changes include changes to makefiles, new commands for shell (start_load, stop_load), and new convenience script for iterating while working on the gateway.
-SUBDIRS = system_opt cangw
+SUBDIRS = system_opt cangw libs
bin_PROGRAMS = cangw
-#lib_LIBRARIES =
-
-#include_HEADERS =
\r
#I am not entirely sure these two are needed, but according to documentation, they are.\r
CFLAGS_LD += HeapSize=0x80000\r
cangw_SOURCES += init.c gw.c helpers.c
\r
+lib_LOADLIBES += load\r
+\r
+#lib_LIBRARIES\r
+#include_HEADERS\r
* This function implements the main thread loop and enough decision logic so that it knows which device to take messages from and which device to send the messages to.\r
* \r
*/\r
-void* CAN_GW_thread(void* arg){\r
+static void* CAN_GW_thread(void* arg){\r
int fd_in, fd_out;\r
int res;\r
unsigned long int *total, *succ, *err;\r
#ifndef __GW_H_\r
#define __GW_H_\r
\r
+extern unsigned long int total_1, total_2, succ_1, succ_2, err_1, err_2;\r
+\r
int start_GW();\r
int end_GW();\r
\r
#include <bsp/mscan.h>\r
#include <bsp/mscan-base.h>\r
\r
-\r
#include "helpers.h"\r
#include "gw.h"\r
+#include "load.h"\r
\r
#include <rtems/rtems_bsdnet.h>\r
#include "networkconfig.h" \r
\r
\r
-extern unsigned long int total_1, total_2, succ_1, succ_2, err_1, err_2;\r
\r
static rtems_device_major_number mscan_major;\r
static rtems_driver_address_table mscan_driver_table=MSCAN_DRIVER_TABLE_ENTRY;\r
rtems_bsdnet_show_if_stats();\r
rtems_bsdnet_show_ip_stats();\r
rtems_bsdnet_show_icmp_stats();\r
- rtems_bsdnet_show_tcp_stats();\r
- rtems_bsdnet_show_udp_stats();\r
rtems_bsdnet_show_mbuf_stats();\r
rtems_bsdnet_show_inet_routes();\r
return 0;\r
return 1;\r
}\r
printf("Success\n");\r
- printf("About to show routes.\n");\r
+ printf("Found routes.\n");\r
rtems_bsdnet_show_inet_routes (); \r
return 0;\r
-}
\ No newline at end of file
+}\r
+\r
+int start_load(int argc, char** argv){\r
+ return start_thread_load();\r
+}\r
+\r
+int stop_load(int argc, char** argv){\r
+ return end_thread_load();\r
+}\r
int print_can_totals(int argc, char** argv);\r
int start_net(int argc, char** argv);\r
int show_net(int argc, char** argv);\r
+int start_load(int argc, char** argv);\r
+int stop_load(int argc, char** argv);\r
\r
#endif
\ No newline at end of file
rtems_shell_add_cmd("showNET", "app",\r
"prints some diagnostic info from network adapter/driver",\r
show_net);\r
+ \r
+ rtems_shell_add_cmd("start_load", "app",\r
+ "starts loading threads",\r
+ start_load);\r
+ \r
+ rtems_shell_add_cmd("stop_load", "app",\r
+ "stops loading threads",\r
+ stop_load);\r
status = rtems_task_delete( RTEMS_SELF );
# Overrides should be stored in file config.omk
# Config for system_opt
-# Config for libbar
-# Config for appfoo
+# Config for cangw
CONFIG_OC_BUILD4RTEMS=y
CONFIG_OC_GDBSTUB=n
+# Config for libs
# Config for
--- /dev/null
+#!/bin/sh
+
+make && ./mkimg-ppc-cangw && ~/can-benchmark/scripts/restart