Author Topic: Newbie's firsttime with uTasker  (Read 40509 times)

Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #15 on: February 27, 2009, 03:10:30 PM »
Ok Now I've gone as far as to extracting the uTasker source files and service pack files from scratch again into a new folder and not touching a single file.
What I've done is add a new file called test.c with some source code in it, maybe about 10 lines of code.

I've compiled it fine but when debugging I get no breakpoints in ONLY that file.

Any clues ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #16 on: February 27, 2009, 03:13:24 PM »
Hi

Yes, me too.

Did you check that the code was really appearing in the map file? (confirming that it is being linked in correctly)

It it possible that the code is there but somehow the attributes for the new file in the project is to generate it without debug information?

Do you have Rowley support to ask them if they known what is happening?

Regards

Mark


Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #17 on: February 27, 2009, 03:20:19 PM »
Yes I can see it in the MAP file and it's being linked in perfectly.

This doesn't make any sense to me why it would do this to me.

Now keep in mind I'm creating test.c and NO test.h so I don't know if that would be the culprit.

Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #18 on: February 27, 2009, 03:25:18 PM »
Ok just created test.h and no diffrence. I just don't understand what the reasoning behind this would be.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #19 on: February 27, 2009, 03:30:09 PM »
Hi

I just did the following.

1) using Rowley Crossworks 1.7 Build 16 I opened the standard uTasker V1.3 project for SAM7X
2) I created a new file called test.c in Rowley. I placed it in the Applications\uTaskerV1.3 folder
3) I added this content:

static int iTest = 0;
extern void fnTest(void)
{
    iTest++;
}

4) In application.c task I added two calls to the new routine fntest()
fntest();
fntest();


5) In test.c I put a break point at the line:
   iTest++;

6) I then downloaded to RAM (using Thumb RAM debug) target) after building the project.

7) The break point was hit twice, as expected and the local variable incremented to2, as expected.
The following is the screen shot. It shows the break point and a second blue arrow.

Can you repeat this step by step to see whether it is really different at your end?

Regards

Mark

PS. Note that this was the SAM7x project. I will repeat with the LPC23XX project and the Olimex board

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #20 on: February 27, 2009, 03:43:13 PM »
Hi

Now I have results from the same test on the LPC2378-STK. This time I worked with the FLASH DEBUG target.

I did get the blue arrows and I could put a break point in the routine. It stopped there correctly and I could step normally.

However, when working from FLASH you have only one HW break point. If you try to set a second, when there is already one somewhere else you will see the question mark. By hovering the mouse over it it will inform that the break point could not be set due to lack of HW break points.

I have attached my Rowley project file (as just tested) as reference.

Regards

Mark


Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #21 on: February 27, 2009, 03:49:03 PM »
I belieave I've located the problem.

For whatever reason crossworks was reporting there was no issues with the build and made it appear as if things compiled perfectly.
It was clearly misleading me as I extracted a fresh copy of uTasker and created a file called test.c then created a task for it in TaskConfig.h then re-compiled and debugged. All the blue arrows were present.

For whatever reason before it would do this but like I said I heavily modified application.c and stripped out ALOT of code and moved all the serial routines from there to serial.c.

I'm gonna try this again but keep a closer eye on it this time.

Thanks and I'll let you know how my progress makes.

BTW if I have to create serial.h cause I have to move code from application.h into would I include serial.h in config.h ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #22 on: February 27, 2009, 04:01:13 PM »
Hi

If you need only serial.h in the single file you can just add it there.

If you find that you need to share it between several files it is simplest to add it in your config.h - there is already a list of includes in it, so add it to the list.

Note that all files should include config.h so that they all have everything needed for the uTasker resources. Generally this single include is all that is needed.

Good luck

regards

Mark


Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #23 on: February 27, 2009, 05:10:17 PM »
Ok the problem is back again but this time I've not modified application.c and only touched TaskConfig.h to add my task in then created a new file and added the following code:

Code: [Select]
#include "config.h"

#define OWN_TASK             TASK_IKS_CLIENT

#define INITIALISATION       0
#define ACTIVE               1

QUEUE_HANDLE SerialPortID;
static unsigned char ucSerialInput[RX_BUFFER_SIZE];                  // static buffer for collecting UART data

static char fnReadIrd(unsigned char * buf)
{
  unsigned char ucInputMessage;                  // reserve space for receiving messages
  int a = 0;

  if (fnRead(SerialPortID, &ucInputMessage, 1) != 0) {
    return -1;
  }

  if (ucInputMessage != 0x21) {
    return -1;
  }
  buf[0] = ucInputMessage;

  while (fnRead(SerialPortID, &ucInputMessage, 1) != 0);
    buf[1] = ucInputMessage;
  while (fnRead(SerialPortID, &ucInputMessage, 1) != 0);
    buf[2] = ucInputMessage;

  for (a = 0; a < buf[2] + 1; ++a)
  {
      while (fnRead(SerialPortID, &ucInputMessage, 1) != 0);
      {
          buf[3 + a] = ucInputMessage;
      }
  }

  return buf[2] + 4;
}

extern void fnIKSClient(TTASKTABLE *ptrTaskTable)
{
  static int iSerialRxLenth = 0;                                       // length of collected UART data
  static int iTaskState = INITIALISATION;

  QUEUE_HANDLE        PortIDInternal = ptrTaskTable->TaskID;           // queue ID for task input
 
  if (INITIALISATION == iTaskState) {                                  // configure interfaces on initialisation
      fnSetNewSerialMode(FOR_I_O);
      iTaskState = ACTIVE;
  }

  // Wait for RX Data from receiver
  while ((iSerialRxLenth = fnReadIrd(ucSerialInput)) == -1);
}

Give it a try and tell me if you get breakpoints or not please ...

Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #24 on: February 27, 2009, 06:57:19 PM »
Mark have you tried and got same issue now as I do ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #25 on: February 27, 2009, 09:21:42 PM »
Hi

I just tried it and it looks good here (see screen shot). I can set break points and step - all the blue arrows are there.

I added four lines to TaskConfig.h:

...
#define TASK_IKS_CLIENT         'I'
...
extern void fnIKSClient(TTASKTABLE *ptrTaskTable);
...
TASK_IKS_CLIENT,
...
  { "I",       fnIKSClient,  MEDIUM_QUE,  (DELAY_LIMIT)(0.20 * SEC), 0, UTASKER_STOP},
...


After the 200ms delay the task started.

However (after doing the first test) I changed the code since it causes problems when data is really received. You need to remember that the uTasker OS is state event driven and you can't wait for characters in a task. I have re-written it and tested it in the simulator so that it does (more of less - maybe there is a length slightly off somewhere) that which you want it to do.

These are the changes:
1. In application.c I added #undef SERIAL_INTERFACE to remove all serial port control from there.
2. I moved the serial interface configuration to your file.
3. I added a simple state-even machine to handle the searching for the sync character 0x21. Then it collects the content and informs that it is ready for further handling when its length corresponds to buf[2] length details. In addition I added a length check to reject frames which have a bad format  so that they don't overrun the input buffer.

Regards

Mark

Code: [Select]
#include "config.h"

#define OWN_TASK             TASK_IKS_CLIENT

#define INITIALISATION       0
#define ACTIVE               1


QUEUE_HANDLE SerialPortID = 0;

static CHAR fnReadIrd(unsigned char * buf)
{
    static int iRxReceived = 0;                                          // the number of byte received (until now)
    static int iExpectedbytes = 0;
    unsigned char ucInputMessage;                                        // reserve space for receiving messages

    while (fnRead(SerialPortID, &ucInputMessage, 1) != 0) {              // read each presently available input byte
      if (iRxReceived == 0) {                                            // searching for sync byte
          if (ucInputMessage != 0x21) {
              continue;                                                  // still not found sync byte
          }
          iRxReceived = 1;                                               // synchronised
          buf[0] = ucInputMessage;
      }
      else {
          if (iRxReceived >= RX_BUFFER_SIZE) {                           // protect buffer overrun on invalid frames
              iRxReceived = iExpectedbytes = 0;                          // go back to sync hunt mode
              continue;
          }
          buf[iRxReceived++] = ucInputMessage;                           // collect message content
          if (iRxReceived == 3) {                                        // the expected length is now known
              iExpectedbytes = (ucInputMessage + 3);                     // note the expected length
          }
          if (iRxReceived == iExpectedbytes) {                           // the complete message has now been collected
              return iExpectedbytes;                                     // inform of the frame length so that it can be processed
          }
      }

    }
    return -1;                                                           // frame not yet ready
}

// This task is started once to initialise the interface and then for each received character
//
extern void fnIKSClient(TTASKTABLE *ptrTaskTable)
{
    static unsigned char ucSerialInput[RX_BUFFER_SIZE];                  // static buffer for collecting UART data
    QUEUE_HANDLE        PortIDInternal = ptrTaskTable->TaskID;           // queue ID for task input
    int iSerialRxLenth = 0;                                              // length of collected UART data

    if (!SerialPortID) {                                                 // configure interfaces on initialisation
        SerialPortID = fnSetNewSerialMode(FOR_I_O);
    }

    while ((iSerialRxLenth = fnReadIrd(ucSerialInput)) != -1) {             // collect the data until ready
        // data ready
        // handle it here
    }
    // else quit - we return on further input
}



// After changes, we set up the new serial configuration
// (moved from application.c to here) - in application.s #undef SERIAL_INTERFACE added to remove its control of the serial interface
extern QUEUE_HANDLE fnSetNewSerialMode(unsigned char ucDriverMode)
{
    TTYTABLE tInterfaceParameters;                                       // table for passing information to driver
    tInterfaceParameters.Channel = DEMO_UART;                            // set UART channel for serial use
    tInterfaceParameters.ucSpeed = temp_pars->temp_parameters.ucSerialSpeed; // baud rate
    tInterfaceParameters.Rx_tx_sizes.RxQueueSize = RX_BUFFER_SIZE;       // input buffer size
    tInterfaceParameters.Rx_tx_sizes.TxQueueSize = TX_BUFFER_SIZE;       // output buffer size
    tInterfaceParameters.Task_to_wake = OWN_TASK;                        // wake self when messages have been received
    #ifdef SUPPORT_FLOW_HIGH_LOW
    tInterfaceParameters.ucFlowHighWater = temp_pars->temp_parameters.ucFlowHigh;// set the flow control high and low water levels in %
    tInterfaceParameters.ucFlowLowWater = temp_pars->temp_parameters.ucFlowLow;
    #endif
    tInterfaceParameters.usConfig = temp_pars->temp_parameters.usSerialMode;
    #ifdef TEST_MSG_MODE
    tInterfaceParameters.usConfig |= (MSG_MODE);
        #if defined (TEST_MSG_CNT_MODE) && defined (SUPPORT_MSG_CNT)
    tInterfaceParameters.usConfig |= (MSG_MODE_RX_CNT);
        #endif
    tInterfaceParameters.usConfig &= ~USE_XON_OFF;
    tInterfaceParameters.ucMessageTerminator = '\r';
    #endif
    #ifdef SERIAL_SUPPORT_DMA
    tInterfaceParameters.ucDMAConfig = UART_TX_DMA;                      // activate DMA on transmission
    #endif
    if ((SerialPortID = fnOpen( TYPE_TTY, ucDriverMode, &tInterfaceParameters )) != 0) { // open or change the channel with defined configurations (initially inactive)
        fnDriver( SerialPortID, ( TX_ON | RX_ON ), 0 );                  // enable rx and tx
        if (tInterfaceParameters.usConfig & RTS_CTS) {                   // {8}
            fnDriver( SerialPortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0 ); // activate CTS interrupt when working with HW flow control (this returns also the present control line states)
            fnDriver( SerialPortID, (MODIFY_CONTROL | SET_RTS), 0 );     // activate RTS line when working with HW flow control
        }
    }
    return SerialPortID;
}




« Last Edit: February 27, 2009, 09:27:41 PM by mark »

Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #26 on: February 28, 2009, 08:36:28 PM »
Ok I've done exactly as you've instructed and here's the outcome.

#1. Function fnReadIRD has no breakpoints and says no code present.
#2. Function fnIKSClient has no breakpoints and says no code present.
#3. Function fnSetNewSerialMode has breakpoints.

I just don't understand whats happening here.

Any idea's ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #27 on: February 28, 2009, 10:02:03 PM »
Hi

This would be consistent with the task content never being called from anywhere else in the code. The routine fnSetNewSerialMode() is called from debug.c so it is (also) getting linked correctly.

Try calling fnIKSClient() directly from application.c or even from within fnSetNewSerialMode() . Just pass a null-pointer as parameter.

If the task code is then present it means that the linker is recognizing that it is needed (being linked in) and would conform that the linker is otherwise leaving it out. [Note that the code will actually crash when fnIKSClient() is called directly  but at least it will allow the test to be made].

Please post you TaskConfig.h file so that I can check that you are really adding in your task correctly to the task table (this is the only logical explanation for it to be otherwise missing).

Regards

Mark

Offline echel0n

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Newbie's firsttime with uTasker
« Reply #28 on: February 28, 2009, 10:24:29 PM »
Ok calling fnIKSClient(0) from application.c fixes the issue so it must be something with TaskConfig.h

Here's the code contained in TaskConfig.h

Code: [Select]
   /********************************************************************
   Mark Butcher      Bsc (Hons) MPhil MIEE

   M.J.Butcher Consulting
   Obere Bahnhofstrasse 13, 5507 Mellingen

   www.uTasker.com      Skype: M_J_Butcher

   ---------------------------------------------------------------------
   File:        TaskConfig.h
   Project:     Single Chip Embedded Internet
   ---------------------------------------------------------------------
   Copyright (C) M.J.Butcher Consulting 2004..2008
   *********************************************************************

   28.04.2007 Add SNMP task
   13.05.2007 Add PPP task

*/


/******************************** The tasks used in the system ********************************************/
/* Warning - each task must use a unique letter equivalent to the start of its task name                  */
#define TASK_WATCHDOG           'W'                                      // watchdog task
#define TASK_ETHERNET           'E'                                      // ethernet task
#define TASK_ARP                'A'                                      // ARP task
#define TASK_TCP                'T'                                      // TCP task
#define TASK_BOOTP              'B'                                      // Bootp task
#define TASK_DHCP               'D'                                      // DHCP task
#define TASK_DNS                'd'                                      // DNS task
#define TASK_POP3               'P'                                      // POP 3 task
#define TASK_PPP                'U'                                      // PPP task
#define TASK_SMTP               'S'                                      // SMTP task
#define TASK_FTP                'F'                                      // FTP task
#define TASK_TFTP               't'                                      // TFTP task
#define TASK_APPLICATION        'a'                                      // application task
#define TASK_CAN_SIM            'c'                                      // CAN simulator task
#define TASK_DEBUG              'm'                                      // debugger (maintenance) task
#define TASK_TIMER              'p'                                      // timer task for global timer use
#define TASK_LCD                'L'                                      // application LCD task
#define TASK_KEY                'K'                                      // keyboard scanning task
#define TASK_NETWORK_INDICATOR  'N'                                      // task displaying network activity
#define TASK_DATA_SOCKET        's'                                      // task handling data socket
#define TASK_ICMP               'i'                                      // this is a pseudotask for sending ping results
#define TASK_LOW_POWER          'l'                                      // Task supporting power saving
#define TASK_SNMP               'M'                                      // snMp protocol task
#define TASK_IKS_CLIENT         'I'

#undef  OWN_TASK

#ifdef LAN_REPORT_ACTIVITY
   #define INTERRUPT_TASK_PHY         TASK_NETWORK_INDICATOR             // This task is woken on PHY changes (set 0 for none)
#endif
#define UNETWORK_MASTER               TASK_APPLICATION                   // This task is worken on uNetwork error events
#define INTERRUPT_TASK_LAN_EXCEPTIONS TASK_NETWORK_INDICATOR             // This task is woken on Ethernet exceptions (set 0 for none)
#define INTERRUPT_TASK_SERIAL_CONTROL TASK_APPLICATION                   // This task is woken on general serial control line changes (set 0 for none)
#define CAN_ERROR_TASK                TASK_APPLICATION                   // This task is woken on CAN errors

extern void fnTaskWatchdog(TTASKTABLE *);
extern void fnApplication(TTASKTABLE *);
extern void fnDebug(TTASKTABLE *);
extern void fnTaskEthernet(TTASKTABLE *);
extern void fnTaskArp(TTASKTABLE *);
extern void fnTaskTCP(TTASKTABLE *);
extern void fnDHCP(TTASKTABLE *);
extern void fnBootp(TTASKTABLE *);
extern void fnDNS(TTASKTABLE *);
extern void fnPOP3(TTASKTABLE *);
extern void fnSmtp(TTASKTABLE *);
extern void fnTftp(TTASKTABLE *);
extern void fnLCD(TTASKTABLE *);
extern void fnADC(TTASKTABLE *);
extern void fnKey(TTASKTABLE *);
extern void fnTimer(TTASKTABLE *);
extern void fnNetworkIndicator(TTASKTABLE *);
extern void fnLowPower(TTASKTABLE *);
extern void fnSNMP(TTASKTABLE *);
extern void fnPPP(TTASKTABLE *);
extern void fnIKSClient(TTASKTABLE *ptrTaskTable);


/************ uTasker task table is defined here but only used by the hardware module initiates the system ***********/

#define DEFAULT_NODE_NUMBER    1                                         // we use one fixed node in the system

#ifdef SUPPORT_DISTRIBUTED_NODES
    extern const unsigned char ucNodeMac[MAX_NETWORK_NODES][MAC_LENGTH];
#endif

#ifdef OPSYS_CONFIG                                                      // this is only set in the hardware module

CONFIG_LIMIT OurConfigNr = DEFAULT_NODE_NUMBER;                          // in single node system this can be initialised with a fixed value

#ifdef SUPPORT_DISTRIBUTED_NODES
    NETWORK_LIMIT OurNetworkNumber = 0;                                  // this value must be set (to non-zero) on startup individually for each node in the network

    const unsigned char ucNodeMac[MAX_NETWORK_NODES][MAC_LENGTH] = {
        {0,0,0,0,0,1},                                                   // MAC address of nodes in the system
        {0,0,0,0,0,2}
    };
#endif

const HEAP_NEEDS ctOurHeap[] = {
    {DEFAULT_NODE_NUMBER, OUR_HEAP_SIZE},                                // our node requires this amount of heap space
    {0}                                                                  // end
};


const UTASK_TASK ctNodes[] = {                                           // we use a single fixed configuration (single node)
  DEFAULT_NODE_NUMBER,                                                   // configuration our single node

  TASK_WATCHDOG,                                                         // watchdog task
#ifdef USE_IP
  TASK_ARP,                                                              // ARP task
#endif
#ifdef ETH_INTERFACE
  TASK_ETHERNET,                                                         // ethernet task
#endif
#ifdef USE_TCP
  TASK_TCP,                                                              // TCP task
#endif
  TASK_APPLICATION,                                                      // application task
  TASK_DEBUG,                                                            // maintenance task
#ifdef USE_BOOTP
  TASK_BOOTP,                                                            // Bootp task
#endif
#ifdef USE_DHCP
  TASK_DHCP,                                                             // DHCP task
#endif
#ifdef USE_DNS
  TASK_DNS,                                                              // DNS task
#endif
#ifdef USE_POP3
  TASK_POP3,                                                             // POP 3 task
#endif
#ifdef USE_SMTP
  TASK_SMTP,                                                             // POP 3 task
#endif
#ifdef USE_FTP
  TASK_FTP,                                                              // FTP task
#endif
#ifdef USE_TFTP
  TASK_TFTP,                                                             // TFTP task
#endif
#ifdef SUPPORT_LCD
  TASK_LCD,                                                              // LCD task
#endif
#ifdef USE_SNMP
  TASK_SNMP,                                                             // SNMP task
#endif
#ifdef SUPPORT_ADC
  TASK_ADC,                                                              // ADC task
#endif
#ifdef USE_PPP
  TASK_PPP,                                                              // PPP task
#endif
#ifdef SUPPORT_KEY_SCAN
  TASK_KEY,                                                              // Key scan task
#endif
#ifdef GLOBAL_TIMER_TASK
  TASK_TIMER,                                                            // Gobal Timer Task
#endif
  TASK_NETWORK_INDICATOR,                                                // network activity indicator task
  TASK_DATA_SOCKET,                                                      // data socket task
#ifdef SUPPORT_LOW_POWER
  TASK_LOW_POWER,                                                        // Low power task
#endif
  TASK_IKS_CLIENT,
  0,                                                                     // end of single configuration

  // insert more node configurations here if required
  0                                                                      // end of configuration list
};


const UTASKTABLEINIT ctTaskTable[] = {
  // task name,  task routine,   input queue size, start delay, period, initial task state
#ifdef _HW_SAM7X
  { "Wdog",      fnTaskWatchdog, NO_QUE,   (DELAY_LIMIT)( 0.2 * SEC ), (DELAY_LIMIT)( 0.2 * SEC ),  UTASKER_STOP},    // watchdog task (Note SAM7X is not allowed to start watchdog immediately since it also checks for too fast triggering!!)
#else
  { "Wdog",      fnTaskWatchdog, NO_QUE,   0, (DELAY_LIMIT)( 0.2 * SEC ),  UTASKER_GO},      // watchdog task (runs immediately and then periodically)
#endif
#ifdef USE_IP    // Warning - start ARP task before Ethernet. If Ethernet messages are received before ARP tabelle is ready there would be an error..
  { "ARP",       fnTaskArp,      MEDIUM_QUE, (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP},  // ARP task check periodically state of ARP table
#endif
#ifdef ETH_INTERFACE
  { "Eth",       fnTaskEthernet, (HEADER_LENGTH * 12),  (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP}, // ethernet task - runs automatically
#endif
#ifdef USE_TCP
  { "TCP",       fnTaskTCP,      MEDIUM_QUE,  (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, // TCP task checks periodically state of session timeouts (controlled by task itself)
#endif
  { "app",       fnApplication,  MEDIUM_QUE,  (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, // Application - start after Ethernet to be sure we have Ethernet handle
#ifdef USE_BOOTP
  { "BOOTP",     fnBootp,        SMALL_QUEUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, //
#endif
#ifdef USE_DHCP
  { "DHCP",      fnDHCP,         SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // delay only for timer queue space
#endif
#ifdef USE_DNS
  { "dNS",       fnDNS,          SMALL_QUEUE, (DELAY_LIMIT)(0.05 * SEC), 0, UTASKER_STOP}, // start before application calls a search
#endif
#ifdef USE_POP3
  { "POP",       fnPOP3,         SMALL_QUEUE, (DELAY_LIMIT)(0.10 * SEC), 0, UTASKER_STOP}, //
#endif
#ifdef USE_SMTP
  { "SMTP",      fnSmtp,         SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},  //
#endif
#ifdef USE_TFTP
  { "tFTP",      fnTftp,         SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},  //
#endif
#ifdef USE_SNMP
  { "MsnMp",     fnSNMP,         SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},  //
#endif
#ifdef USE_PPP
  { "Uart_ppp",  fnPPP,          SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},  //
#endif
#ifdef SUPPORT_LCD
  { "LCD",       fnLCD,          MEDIUM_QUE,  (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},  //
#endif
#ifdef SUPPORT_ADC
  { "cDA",       fnADC,          NO_QUE,      (DELAY_LIMIT)(2.0 * SEC), (DELAY_LIMIT)(0.05 * SEC), UTASKER_STOP},  //
#endif
#ifdef SUPPORT_KEY_SCAN
  { "Key",       fnKey,          NO_QUE,      (DELAY_LIMIT)(0.1 * SEC), (DELAY_LIMIT)(0.1 * SEC), UTASKER_STOP},  //
#endif
#ifdef GLOBAL_TIMER_TASK
  { "period",    fnTimer,        SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP},   //
#endif
#ifdef USE_MAINTENANCE
  { "maintenace",fnDebug,        SMALL_QUEUE, (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // Task used for debug messages (started by application)
#endif
#ifdef LAN_REPORT_ACTIVITY
  { "NetInd", fnNetworkIndicator,LARGE_QUE,   (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO), 0, UTASKER_STOP}, // Network activity task
#endif
#ifdef SUPPORT_LOW_POWER
  { "lowPower", fnLowPower,      NO_QUE,      0, 0, UTASKER_GO},         // Low power task
#endif
  { "I",       fnIKSClient,  MEDIUM_QUE,  (DELAY_LIMIT)(0.20 * SEC), 0, UTASKER_STOP},
  { 0 }
};
#endif                                                                   // end of task configuration

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3158
    • View Profile
    • uTasker
Re: Newbie's firsttime with uTasker
« Reply #29 on: February 28, 2009, 11:11:21 PM »
Hi

When I use this TaskConfig.h but don't add the test file with fnIKSClient() in it the code doesn't build since the task fnIKSClient() is missing (this is of course what is expected and verifies that the linker is seeing that fnIKSClient() is required).
I so nothing wrong with your configuration.

Before putting this down to Gremlins in the system I have two (possibly) final ideas:


Last but one thought... your TaskConfig.h is fine and works here. Is it possible that you are editing a TaskConfig.h file which is not actually the one used by the project? This would then indeed be a logical explanation as to why the file is not being linked. Make a small change in the file and see whether the project is rebuilt when compiled (a change in the 'real' TaskConfig.h should cause all files to be rebuilt. If you get no rebuild after a change it would mean that it doesn't see it as a project file with dependency.

Last thought... Also try a project rebuild (rather than just compile - it is also sometimes known as a clean) to ensure that the files actually using the TaskConfig.h content are being compiled with its new content. I have seen cases where object files have (somehow) received newer dates than source files (a data in the future) and the make file never re-compiles because it thinks that the output is newer (nasty problems can arise until it is noticed). A rebuild will cause all object files to be deleted and then everything to be recompiled, resulting in a correction of any such corrupted projects.

Good luck

Regards

Mark