This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about StellarisWare, SW-RDK-S2E, stellarisif.c

stellarisif.c

static err_t
stellarisif_transmit(struct netif *netif, struct pbuf *p)
{
  int iBuf;
  unsigned char *pucBuf;
  unsigned long *pulBuf;
  struct pbuf *q;
  int iGather;
  unsigned long ulGather;
  unsigned char *pucGather;

........................... [omitted]

    /* Initialze a long pointer into the pbuf for 32-bit access. */
    pulBuf = (unsigned long *)&pucBuf[iBuf];

    /**
     * Copy words of pbuf data into the Tx FIFO, but don't go past
     * the end of the pbuf.
     *
     */
    while((iBuf + 4) <= q->len) {
      HWREG(ETH_BASE + MAC_O_DATA) = *pulBuf++;
      iBuf += 4;
    }

The above code is part of the latest version of the TI/Luminary StellarisWare.

I think it is a bug? And I hope to fix it with

  __packed unsigned long *pulBuf;


in the KEIL toolchain. (Tested.)

But due to my very limited C programming skill, I am afraid that, I might be doing something stupid. So I would like to learn something from our experts, please kindly give me some advices.

Is that, the __packed qualifier (in this case) leads to the lower performance?

Parents Reply Children
  • John,

    I'm very sorry to hear that. Per and Andy made a very good point - the low performance processors might play a role in this affair - but I'm afraid that now it is too late - not only because you were fired, but mainly because the transition will be costly in terms of man hours and hardware design and compliance tests etc...My employer made that very same transition (there are still some 8051 products solved, of course, but the future belongs to ARM7 and in particular, CM3/LPC1788 chips) about 2 years ago - they hired me and some others and we just nailed it. Either way, I believe I speak for all of us by wishing you all the best in the future.

  • Many thanks to all. (My English ability is very limited, not able to discuss something non-technique properly and fluently.)

    ==> About the align problem - funny guys. Writing C code where they ignore the C standard and don't make sure themselves that their casts are aligned. And then blame the compiler for their oopses. I think they may have a developer or two who should consider a different way of earning his/her daily food.

    I was confused by the latest response from TI/Luminary. I thought it was due to my lack of programming knowledge.

    But now, I think my confusion is quite reasonable. But I am not sure if I have enough knowledge to deal with TI/Luminary and this issue, and I am running out of time.

    Hi, good morning, I want to go out with my wife and kids for breakfast now. I chose this job, because it gives me an opportunity to accompany my family in southern Taiwan.

  • My supervisor told me that, the lay off is actually a 20% - 40% employee downsizing. So I am not the only one involved.

    It seems that, this downsizing was originally scheduled in next year Q1 or Q2, but brought forward to the end of December, due to the USA Fed is launching its second round of quantitative easing, which leads to sharp appreciation of the Taiwan Dollar exchange rate.

    It seems that, Euro/Great Britain Pound/Swedish Krona are relatively stable? Many countries in Non-Japan Asia will be seriously impacted.

    As Tamir pointed,

    ==> now it is too late - not only because you were fired, but mainly because the transition will be costly in terms of man hours and hardware design and compliance tests etc...

    And the marketing research will also be needed, if we want to do it right.

    Maybe my software development skill is better than the "average" level of our "local" competitors, but one software engineer is not able to do much under such a tough condition.

    Many local small companies here in Taiwan, were just suddenly shutdown; and the owner of company just magically disappeared, left the angry employees and suppliers. Even the famous TSMC, in 2008, they forced their employees to resign, so that they did not need to pay the severance fee. And then, in 2009, when they needed the experienced employees, they said it was a mistake/misunderstanding, they were very sorry, they wanted to re-employ all the laid off employees. So, I believe that, the owner of the company which I am working for, is a good man; he chose to "try to" officially lay off the employees. Though he made a lot of wrong business decisions.

    I don't like northern Taiwan, but I may have to work there once again, since there are more jobs.