]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Fix warnings personal/sojka/tmp
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2015 08:08:04 +0000 (10:08 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2015 08:08:04 +0000 (10:08 +0200)
rpp-test-sw/Makefile.inc
rpp-test-sw/cmdproc/src/cmdproc_freertos.c
rpp-test-sw/commands/cmd_echoserver.c
rpp-test-sw/commands/cmd_nc.c
rpp-test-sw/commands/cmd_sdram.c

index 8437080942f621bc924dbd4f93ed3b116eac1b6f..7a1fe48a882b1e04a387c73b50aefde921eef77e 100644 (file)
@@ -19,6 +19,8 @@ OBJS = $(SOURCES:%.c=%.obj)
 RPP_CFLAGS += -I$(makefile_inc_dir)/cmdproc/include -I$(makefile_inc_dir)
 RPP_CFLAGS += -I. # For version.h
 
+RPP_LDFLAGS += --heap_size=2048        # Assert requires stdio and it requires heap
+
 rpp-test-sw.out: $(OBJS) $(RPP_LIB_DIR)/rpp-lib.lib
        $(LD) $(RPP_CFLAGS) $(RPP_LDFLAGS) $(OBJS) $(RPP_LDLIBS) -o $@
 
index 84fd6e19c2fd31ecf2ee263b5487449e73306a76..536f00712e35506309311be5cdc4ccb674a19fb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Czech Technical University in Prague
+ * Copyright (C) 2012-2015 Czech Technical University in Prague
  *
  * Created on: 1.8.2012
  *
@@ -42,7 +42,7 @@ void initCmdProc(unsigned portBASE_TYPE priority)
 {
        int taskRetVal;
 
-       if ((taskRetVal = xTaskCreate(processCmd, (const signed char *)"processCmd", 1000, NULL, priority, processCmdHandler)) != pdPASS) {
+       if ((taskRetVal = xTaskCreate(processCmd, "processCmd", 1000, NULL, priority, processCmdHandler)) != pdPASS) {
                rpp_sci_printf("FreeRTOS: Creating task processCmd failed. Error code: %d", taskRetVal);
                /* An error occurred, block program */
                while (1)
index eadbc39d951a45cbc931a0d3729d75efd59283c0..c86a12e28e46e48082eccec8d7329d91993da91e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * cmd_echoserver.c -- Simple echoserver
  *
- * Copyright (C) 2014 Czech Technical University in Prague
+ * Copyright (C) 2014, 2015 Czech Technical University in Prague
  *
  * This echoserver is capable of running multiple instances each running
  * in the background thread.
@@ -206,7 +206,7 @@ int cmd_do_init_es(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 {
        struct netif *netif = rpp_eth_get_netif(INTERFACE_INSTANCE_NUMBER);
        struct es_thread_context *thread_context;
-       unsigned char thread_name[5] = "es"; /* thread name, used for debugging only */
+       char thread_name[5] = "es"; /* thread name, used for debugging only */
        err_t err = ERR_OK;
        uint8_t pindex;
        int thread_nr;
index 3ecaffd1e8772af18c9abb9069d97af757f3e84b..0ca5c97de38a81273ba3be3bc1d069a288baf340 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Czech Technical University in Prague
+ * Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
  *
  * Created on: Aug 9, 2013
  *
@@ -547,7 +547,7 @@ int cmd_do_init_nc(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
        buff_index = 0;
        /* initialize arguments and thread name */
 #if !NO_SYS
-       uint8_t name[5] = "nc";
+       char name[5] = "nc";
        name[4] = '\0';
        struct nc_arg nc_arg; /* create space for handing args to nc_run() */
        nc_arg.thread = FALSE;
@@ -665,7 +665,7 @@ int cmd_do_init_nc(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
                rpp_sci_printf("STARTING THREAD: %s\r\n", name);
                taskNameNum++;
                /* start thread */
-               if ((err = xTaskCreate(&run_nc,(const signed char *)name, ncTaskStackSize, &nc_arg, ncTaskPriority, NULL)) == pdPASS) {
+               if ((err = xTaskCreate(&run_nc, name, ncTaskStackSize, &nc_arg, ncTaskPriority, NULL)) == pdPASS) {
                        /* block on semaphore, till new thread copies arg to own stack */
                        xSemaphoreTake( nc_arg.args_coppied, portMAX_DELAY );
                        vSemaphoreDelete(nc_arg.args_coppied);
index 908639bf1191f7442cecde7bb76ab1b37f1c2670..d6f4e5f9b497573b60188f6633e5059da734ed0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Czech Technical University in Prague
+ * Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
  *
  * Created on: 28.2.2013
  *
@@ -119,10 +119,10 @@ void test_sdr()
        // after the noise task could not be created, forcing to close the just
        // opened command processor.
        portBASE_TYPE task_created = xTaskCreate(sdr_test_task,
-                                                                                        (const signed char *)"sdr_test_task",
-                                                                                        TEST_TASK_STACK, NULL, TEST_TASK_PRIORITY,
-                                                                                        &test_task_handle
-                                                                                        );
+                                                "sdr_test_task",
+                                                TEST_TASK_STACK, NULL, TEST_TASK_PRIORITY,
+                                                &test_task_handle
+               );
 
        if (task_created != pdPASS) {