Author Topic: == Building the project ==  (Read 30651 times)

marc

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: == Building the project ==
« Reply #15 on: April 04, 2008, 03:51:15 AM »
to answer  my own question:

Check 'disable COD file generation' in the MPLINK tab on the project settings.

Now it invokes MP2HEX to generate the hex file. Weird.

man123

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: == Building the project ==
« Reply #16 on: August 05, 2008, 12:04:21 AM »
Hi,
For testing my Hi tech picc_18 std V51 PL1  compiler I used this simple program with mplab 8.10:

#include "net\tcp.c"

//Create a TCP socket for receiving and sending data
static TCP_SOCKET tcpSocketUser = INVALID_SOCKET;
 void tcpExample(void)
 {

    BYTE c;
    NODE_INFO tcpServerNode;
    TCPInit();
     //Create a TCP socket that listens on port 54123
    tcpSocketUser = TCPListen(54123);
   
     //An error occurred during the TCPOpen() function
    if (tcpSocketUser == INVALID_SOCKET) {
        //Add user code here to take action if required!
    }

    //Infinite loop. Check if anything is received on TCP port
   while(1)
   {
        //Has a remote node made connection with the port we are listening on
       if (TCPIsConnected(tcpSocketUser)) {
          //Is there any data waiting for us on the TCP socket?
           //Because of the design of the Modtronix TCP/IP stack we have to
           //consume all data sent to us as soon as we detect it.
            if (TCPIsGetReady(tcpSocketUser)) {

                 //We are only interrested in the first byte of the message.
               TCPGet(tcpSocketUser, &c);
           
               if (c == '0') LATB6 = 0;        //Switch system LED off
                else if (c == '1') LATB6 = 1;  //Switch system LED on

                //Discard the socket buffer.
                TCPDiscard(tcpSocketUser);
             }
        }
 
         //This task performs normal stack task including checking for incoming
        //packet, type of packet and calling appropriate stack entity to
         //process it.
        StackTask();
     }
 }


Yet the build is failed and I have the Error  [500] C:\Program Files\HI-TECH Software\PICC-18\STD\9.51\lib\pic82l-c.lib(lincr.obj); 0. undefined symbols

Please help me to resolve this problem



Matt.

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: == Building the project ==
« Reply #17 on: October 27, 2008, 02:59:33 AM »
Hi,

I am having a the same problem as at least on other person.
The compiler error is listed below.

MPLAB C18 v3.22 (demo)
Copyright 2000-2008 Microchip Technology Inc.
Days remaining until demo becomes feature limited:  57
C:\Projects\PIC\websrvr68_v306\src\net\http.c:347:Warning [2066] type qualifier mismatch in assignment
C:\Projects\PIC\websrvr68_v306\src\net\http.c:411:Warning [2066] type qualifier mismatch in assignment
C:\Projects\PIC\websrvr68_v306\src\net\http.c:662:Warning [2066] type qualifier mismatch in assignment
C:\Projects\PIC\websrvr68_v306\src\net\http.c:1218:Error [1300] stack frame too large
C:\Projects\PIC\websrvr68_v306\src\net\http.c:1219:Error [1300] stack frame too large
C:\Projects\PIC\websrvr68_v306\src\net\http.c:1220:Error [1300] stack frame too large
C:\Projects\PIC\websrvr68_v306\src\net\http.c:1221:Error [1300] stack frame too large
C:\Projects\PIC\websrvr68_v306\src\net\http.c:1222:Error [1300] stack frame too large

Any help would be greatly appreciated.

Kind regards

Matt

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Re: == Building the project ==
« Reply #18 on: October 27, 2008, 11:51:31 PM »
Do a search for 2066 in the "MPLABŪ C18 C COMPILER GETTING STARTED" document. You will find the following answer:

Quote
FAQ-4 Why is “Warning [2066] type qualifier mismatch in assignment” being issued?
The libraries distributed with MPLAB C18 are compiled using the large code model (-ml command-line option). By default, MPLAB IDE and the compiler compile applications for the small code model. For example, the printf function distributed with the compiler expects to receive a “const far rom char *”, but the application is actually sending a “const near rom char *” to the printf function when the large code model is not selected for the application. This difference between far and near is causing the “type qualifier mismatch in assignment” warning. To get rid of these
warnings, do one of three things:
  • 1. Recompile the libraries distributed with MPLAB C18 using the small code model
    (only recommended if all applications will be using the small code model);
  • 2. Enable the large code model in the IDE for the particular application (may
    increase code size);
  • 3. Cast the constant character string to a constant far rom character pointer, as in:
    printf ((const far rom char *)”This is a test\n\r”);

I found the simplest solution to just change the memory model of the project to large. For info on doing this, see "MPLABŪ C18 C COMPILER GETTING STARTED".

toroundfile

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: == Building the project ==
« Reply #19 on: January 01, 2009, 09:16:40 PM »
I have not modified any of the source code, and I have configured the project to use the large memory model.  I still get the following errors:

Executing: "C:\MCC18\bin\mcc18.exe" -p=18F6627 /i"c:\mcc18\h" -I".." "appcfg.c" -fo="tmp\appcfg.o" --verbose -sco -DHAS_BOOTLOADER -DBRD_SBC65EC -mL
Errors:    0
Warnings:  0
MPLAB C18 v3.21 (demo)
Copyright 2000-2008 Microchip Technology Inc.
Days remaining until demo becomes feature limited:  50

WARNING:  The procedural abstraction optimization will not be supported when the demo becomes feature limited.

C:\PIC Projects\Modtronix\websrvr65_v306\src\appcfg.c:424:Warning [2066] type qualifier mismatch in assignment
C:\PIC Projects\Modtronix\websrvr65_v306\src\appcfg.c:424:Warning [2066] type qualifier mismatch in assignment
C:\PIC Projects\Modtronix\websrvr65_v306\src\appcfg.c:424:Warning [2066] type qualifier mismatch in assignment
C:\PIC Projects\Modtronix\websrvr65_v306\src\appcfg.c:424:Warning [2066] type qualifier mismatch in assignment
C:\PIC Projects\Modtronix\websrvr65_v306\src\appcfg.c:424:Warning [2066] type qualifier mismatch in assignment
Errors:    0
Warnings:  5

Here's the line it's flagging:

static ROM BYTE* pwmCCPRL[] = {(BYTE *)(&CCPR1L), (BYTE *)(&CCPR2L), (BYTE *)(&CCPR3L), (BYTE *)(&CCPR4L), (BYTE *)(&CCPR5L)};


What is causing this warning? 

Thanks,
John

parotin

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: == Building the project ==
« Reply #20 on: January 12, 2010, 08:15:44 AM »
Hello everybody!

The first is say sorry for my english, for sure I'm going to make a lot of faults because I'm not english speaker and I'm just using it not so usualy things.

In the university I was using a SBC65EC board for practice. I finished my grade hatting computers and programing, and I began working in an other field absolutly diferent. Now, more than 3 years after, I want to make a litle programer for my garden. The first I thought was "it's realy easy to do after my progect in university", and I bought a board to Modtronix.

Well, my problem (the first and not the last, for sure) is that I can't install the compiler. I tried intall it over windows 7  and over windows XP, but the problem is allways the same: the intalation is succesfully, but I can not find the program!!
There is the folder MCC18 and it seems all corect, but I can't execute the program because there isn't any place to execute it. In the folther MCC18 I can find the unistaller and the unistalation works well too!!

The software I tried to install is MPLAB C for PIC18 v3.34 in LITE mode   from the url: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en536656  is it the free student version you speak about on the begining of this foro?


Can anyone help me?

Thanks in advance!


Ah! maybe is usefull know that the file created when I install the software begans like:

***  Installation Started 01/09/2010 17:27  ***
Title: MPLAB C18 Lite Installation
Source: C:\Users\Administrator\Desktop\MPLAB-C18-Lite-v3_34.exe | 01-09-2010 | 17:01:14 | 56819224
Made Dir: C:\MCC18
File Copy: C:\MCC18\UNWISE.EXE | 06-25-1999 | 10:55:30 | | 149504 | 30fdd633
RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\MPLAB C18 v3.34 Lite
RegDB Val: MPLAB C18 v3.34 Lite
RegDB Name: DisplayName
RegDB Root: 2
RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\MPLAB C18 v3.34 Lite
RegDB Val: C:\MCC18\UNWISE.EXE C:\MCC18\install.log
RegDB Name: UninstallString
RegDB Root: 2
Made Dir: C:\MCC18\bin
Made Dir: C:\MCC18\bin\LKR
File Copy: C:\MCC18\bin\LKR\10f200_g.lkr | 03-03-2008 | 14:51:14 | | 502 | d330ff9a


And, after a lot of lines, finish like:


File Copy: C:\MCC18\Readme for MPLINK Linker.htm | 10-03-2009 | 10:41:42 | | 23494 | 70040fff
Delete in-use files: On
User Rights: Admin



shahrul

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: == Building the project ==
« Reply #21 on: February 10, 2010, 10:13:02 PM »
I have SBC65EC and download sample program, that is examples_v248. There are many folder; tcp, tcptpt, tick and others. I tried many samples there, some of that can compile but some have errors. After I download the program, it's not running same as default. Default program, can access the web pages through ip 10.1.0.1. Question
1. why some the project have errors? I usual compile project with 1 file only, not sure where this error.
2. why the project I succeed download, can't be access with default ip?

isandor

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: == Building the project ==
« Reply #22 on: June 13, 2011, 12:48:45 PM »
Hi,

I tried to add some extra processing to the main loop in mxwebsrvr.c for my SBC65EC board. I did the necessary modifications and run a Build all function but it failed on me.
The message was:
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F452 /i"C:\mcc18\h" -l".." "arp.c" -fo="temp\arp.o" -k "-sco -DBRD_SBC65EC -DHAS_BOOTLOADER -mL
C:\websrv65_v310\src\net\compiler.h:106:Error [1099] "Stack can not be compiled for this processor!"

I checked compiler.h and indeed it has a conditional directive that checkes for many PIC processor types, the one (18F452) not being among them, and if there is no match, it drops an error message.
I don't really understand it, as I used the provided project (websrvr65_mc_hw211) which - as of my understanding - should be the suitable for the SBC65EC board.

I would appreciate any help.

Also, if any of you had any success in building the webserver stack using SDCC. I installed MPLAB under wine, but if it is not so much of pain, I would opt for a native, Linux based compiler.

Thanks, in advance,

Imre

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Building the project ==
« Reply #23 on: June 13, 2011, 01:19:28 PM »
-p=18F6627 without checking - I think that's the wrong processor.  Anyway re-read this post about building the 211 project:

http://forum.modtronix.com/index.php?topic=1193.msg3727#msg3727

It is important to use the right compiler and install the products in the right order.  You don't need to uninstall, just re-install the thing that needs installing second (I think the compiler has to be *after* the IDE but I forget - just read above link).  If you do it right it will add another compiler into the IDE.

I had to run the compiler recently on a brand new windows 7 machine and I couldn't get it to work so I installed virtualBox form oracle and installed Windows XP on the virtual box and it all works great.

isandor

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: == Building the project ==
« Reply #24 on: June 14, 2011, 02:53:44 AM »
Well, I figured the 18F452 would be incorrect as the SBC65EC features 18F6627, but I didn't manage to find the option to change that.
I installed the IDE first and then the C18 compiler so that went well. In fact the C18 appears to be integrated nicely into the IDE.

So apart from minor issues with wine, this setup works find for now. Just that I cannot find the option to change the PIC CPU type in the project. Why on earth defaults it to 18F452 when it is not supported there is unknown for me.

Regards,

Imre

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Building the project ==
« Reply #25 on: June 14, 2011, 07:13:59 AM »
I fired up my IDE.  It turns out it *does* work on windows 7.  It was the bootloader I had to run in a virtual machine.

Anyway you did seem to install properly.  You are using the correct project and the correct compiler.  A contiguous sample of build lines:
Quote
Clean: Deleted file "C:\Users\Public\Documents\solar controller\src\websrvr65_mc_hw211.mcs".
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F6627 /i"C:\mcc18\h" -I".." "arp.c" -fo="temp\arp.o" -k -sco -DBRD_SBC65EC -DHAS_BOOTLOADER -mL
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F6627 /i"C:\mcc18\h" -I".." "arptsk.c" -fo="temp\arptsk.o" -k -sco -DBRD_SBC65EC -DHAS_BOOTLOADER -mL

Go to the configure portion of the IDE.  So from the top menus go:
configure/select device

Make sure it says PIC18F6627, device family ALL.

isandor

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: == Building the project ==
« Reply #26 on: June 14, 2011, 01:29:10 PM »
That was it! Thank you very much. I couldn't find it earlier.