Author Topic: First go at a compilation  (Read 5651 times)

Offline ewan

  • Newbie
  • *
  • Posts: 43
    • View Profile
First go at a compilation
« on: October 12, 2008, 09:58:54 PM »
I downloaded the NE64 files then overwrote them with SP1. When I compile using CodeWarrior I get an error in "webinterface.c" which complains at line 56 "UPLOAD_FAILED not declared". If I comment this out it goes on to more errors. Upon searching for this definition I find it is in files for the MCF52233, specifically in "app_hw_m5223x.h", but nowhere to do with the NE64.

What am I doing wrong?

Thanks.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3069
    • View Profile
    • uTasker
Re: First go at a compilation
« Reply #1 on: October 12, 2008, 10:11:21 PM »
Hi Ewan

I also 'sometimes' had a similar problem. It seems as though the compiler(s) sometimes have difficulties with the conditional code #if FILE_SYSTEM_SIZE >= (160*1024)

I suggest you add the following in webInterface.c

#if defined SUPPORT_HTTP_POST && !defined _HW_NE64
...
#endif


around the HTTP post part referring to cSuccessSW_HTML

Since the NE64 project doesn't support SW uploads via Ethernet, the POST code is not required and should be automatically removed by the file system size...(although the compiler seems to have difficulties with this...)

Regards

Mark



Offline ewan

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: First go at a compilation
« Reply #2 on: October 12, 2008, 10:54:02 PM »
I had to do :-

#ifndef _HW_NE64
    #ifdef SUPPORT_HTTP_POST
        #if FILE_SYSTEM_SIZE >= (160*1024)         
            static const CHAR cWarningHTML[]       = C;
            static const CHAR cSuccessSW_HTML[]    = SW_UPLOAD_COMPLETED;
        #endif
    #endif
#endif

I suppose it is something to do with operator precedence. It compiles fine now though.
Thanks.

Offline thamanjd

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: First go at a compilation
« Reply #3 on: October 17, 2008, 03:01:55 AM »
It doesnt sound like this is your problem, but for CW at least.... dont forget to check you have a define in the command line arguments for "compiler for hc12" under the target settings. Including:

-CPUHCS12 -D__NO_FLOAT__ -D_CODE_WARRIOR -D_HW_NE64

JD