View previous topic :: View next topic |
Author |
Message |
ep.hobbyiest
Joined: 08 Oct 2014 Posts: 20
|
need help for configure the enc28j60 with 16f8722 |
Posted: Wed Oct 08, 2014 9:24 am |
|
|
hello master,
i m very new to this forum. i need help for configuring ethernet enc28j60 with 16f8722 controller. generate the code and compiler gives much more errors.
I m new to CCS too...
Code: |
#include<18f8722.h>
#include "ethernet.h"
#use delay(internal=32000000)
void IPAddressInit(void)
{
AppConfig.Flags.bIsDHCPEnabled = TRUE;
DHCPEnable(0); //enable nicWide stack support.
//MAC address of this unit
MY_MAC_BYTE1=MY_DEFAULT_MAC_BYTE1;
MY_MAC_BYTE2=MY_DEFAULT_MAC_BYTE2;
MY_MAC_BYTE3=MY_DEFAULT_MAC_BYTE3;
MY_MAC_BYTE4=MY_DEFAULT_MAC_BYTE4;
MY_MAC_BYTE5=MY_DEFAULT_MAC_BYTE5;
MY_MAC_BYTE6=MY_DEFAULT_MAC_BYTE6;
}
void main()
{
IPAddressInit();
TickInit();
enable_interrupts(GLOBAL);
StackInit();
while(TRUE)
{
StackTask();
StackApplications();
//TODO: User Code
}
|
and errors are
CLEAN SUCCESSFUL (total time: 426ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'G:/PGM/Ethernet/test001.X'
make -f nbproject/Makefile-default.mk dist/default/production/test001.X.production.hex
make[2]: Entering directory 'G:/PGM/Ethernet/test001.X'
gnumkdir -p build/default/production
gnumkdir -p dist/default/production
"C:\PROGRA~1\PICC\CCSCON.exe" out="build/default/production" main.c +FH +DF +CC +Y=9 +EA +DF +LN +T +A +M +J +EA +Z -P #__18F8722=1
G:\PGM\Ethernet\test001.X\ethernet.h:9:231: Error#18 File can not be opened
Not in local "tcpip\p18cxxx.h"
Not in local "G:\PGM\Ethernet\test001.X\tcpip\p18cxxx.h"
Not in last "G:\PGM\Ethernet\test001.X\tcpip\p18cxxx.h"
Not in project "G:\PGM\Ethernet\test001.X\tcpip\p18cxxx.h"
Not in "G:\PGM\Ethernet\test001.X\tcpip/p18cxxx.h"
G:\PGM\Ethernet\test001.X\ethernet.h:23:142: Error#18 File can not be opened
Not in ";G:\PGM\Ethernet\test001.X\stdint.h"
Not in local "stdint.h"
Not in local "G:\PGM\Ethernet\test001.X\stdint.h"
Not in last "G:\PGM\Ethernet\test001.X\stdint.h"
Not in project "G:\PGM\Ethernet\test001.X\stdint.h"
G:\PGM\Ethernet\test001.X\ethernet.h:24:161: Error#18 File can not be opened
Not in local "tcpip\StackTsk2.h"
Not in local "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.h"
Not in last "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.h"
Not in project "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.h"
Not in "G:\PGM\Ethernet\test001.X\tcpip/StackTsk2.h"
G:\PGM\Ethernet\test001.X\ethernet.h:25:189: Error#18 File can not be opened
Not in local "tcpip\TCPIP Stack\TCPIPConfig.h"
Not in local "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\TCPIPConfig.h"
Not in last "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\TCPIPConfig.h"
Not in project "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\TCPIPConfig.h"
Not in "G:\PGM\Ethernet\test001.X\tcpip/TCPIP Stack/TCPIPConfig.h"
G:\PGM\Ethernet\test001.X\ethernet.h:26:231: Error#18 File can not be opened
Not in local "tcpip\TCPIP Stack\HardwareProfile.h"
Not in local "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\HardwareProfile.h"
Not in last "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\HardwareProfile.h"
Not in project "G:\PGM\Ethernet\test001.X\tcpip\TCPIP Stack\HardwareProfile.h"
Not in "G:\PGM\Ethernet\test001.X\tcpip/TCPIP Stack/HardwareProfile.h"
G:\PGM\Ethernet\test001.X\ethernet.h:27:21: Error#18 File can not be opened
Not in local "tcpip\StackTsk2.c"
Not in local "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.c"
Not in last "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.c"
Not in project "G:\PGM\Ethernet\test001.X\tcpip\StackTsk2.c"
Not in "G:\PGM\Ethernet\test001.X\tcpip/StackTsk2.c"
G:\PGM\Ethernet\test001.X\ethernet.h:29:40: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:29:54: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:29:55: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:29:62: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:29:73: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:29:74: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:29:75: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:34:104: Error#12 Undefined identifier AppConfig
G:\PGM\Ethernet\test001.X\ethernet.h:35:155: Error#12 Undefined identifier -- DHCPEnable
G:\PGM\Ethernet\test001.X\ethernet.h:38:223: Error#12 Undefined identifier MY_MAC_BYTE1
G:\PGM\Ethernet\test001.X\ethernet.h:39:4: Error#12 Undefined identifier MY_MAC_BYTE2
G:\PGM\Ethernet\test001.X\ethernet.h:40:41: Error#12 Undefined identifier MY_MAC_BYTE3
G:\PGM\Ethernet\test001.X\ethernet.h:41:78: Error#12 Undefined identifier MY_MAC_BYTE4
G:\PGM\Ethernet\test001.X\ethernet.h:42:115: Error#12 Undefined identifier MY_MAC_BYTE5
G:\PGM\Ethernet\test001.X\ethernet.h:43:152: Error#12 Undefined identifier MY_MAC_BYTE6
G:\PGM\Ethernet\test001.X\ethernet.h:46:187: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:46:201: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:46:202: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:46:209: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:46:216: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:46:217: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:46:218: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:51:17: Error#28 Expecting an identifier
G:\PGM\Ethernet\test001.X\ethernet.h:51:24: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:55:40: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:55:54: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:55:55: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:55:62: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:55:69: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:55:70: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:55:72: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:55:84: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:62:133: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:62:147: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:62:159: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:62:165: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:67:221: Error#18 File can not be opened
Not in local "GenericTypeDefs.h"
Not in local "G:\PGM\Ethernet\test001.X\GenericTypeDefs.h"
Not in last "G:\PGM\Ethernet\test001.X\GenericTypeDefs.h"
Not in project "G:\PGM\Ethernet\test001.X\GenericTypeDefs.h"
Not in "G:\PGM\Ethernet\test001.X\GenericTypeDefs.h"
G:\PGM\Ethernet\test001.X\ethernet.h:68:249: Error#18 File can not be opened
Not in local "Compiler.h"
Not in local "G:\PGM\Ethernet\test001.X\Compiler.h"
Not in last "G:\PGM\Ethernet\test001.X\Compiler.h"
Not in project "G:\PGM\Ethernet\test001.X\Compiler.h"
Not in "G:\PGM\Ethernet\test001.X\Compiler.h"
G:\PGM\Ethernet\test001.X\ethernet.h:121:143: Error#34 Unknown type
G:\PGM\Ethernet\test001.X\ethernet.h:121:148: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:122:165: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:122:183: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:123:184: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:123:186: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:141:84: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:141:127: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:141:128: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:141:145: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:141:147: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:142:151: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:158: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:159: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:178: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:180: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:143:193: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:196: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:198: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:143:201: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:144:205: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:144:206: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:156:88: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:156:102: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:156:118: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\ethernet.h:156:124: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\ethernet.h:32:81: Info#300 More info: First Declaration of IPAddressInit
G:\PGM\Ethernet\test001.X\main.c:4:92: Error#31 Identifier is already used in this scope
G:\PGM\Ethernet\test001.X\main.c:6:97: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:6:107: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:6:113: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:6:130: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:6:134: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:7:149: Error#28 Expecting an identifier
G:\PGM\Ethernet\test001.X\main.c:7:151: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:10:216: Error#48 Expecting a (
make[2]: *** [build/default/production/main.o] Error 1
G:\PGM\Ethernet\test001.X\main.c:10:249: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:10:249: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:10:249: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:10:249: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:11:253: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:11:30: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:11:30: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:11:30: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:11:30: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:12:34: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:12:67: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:12:67: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:12:67: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:12:67: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:13:71: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:13:104: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:13:104: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:13:104: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:13:104: Error#43 Expecting a declaration
G:\PGM\Ethernet\test001.X\main.c:14:108: Error#48 Expecting a (
G:\PGM\Ethernet\test001.X\main.c:14:141: Error#43 Expecting a declaration
100 Errors, 0 Warnings.
Build Failed.
nbproject/Makefile-default.mk:99: recipe for target 'build/default/production/main.o' failed
make[2]: Leaving directory 'G:/PGM/Ethernet/test001.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'G:/PGM/Ethernet/test001.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 2s) |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Oct 08, 2014 11:12 am |
|
|
Hi,
With all due respect, your major problem is that you haven't taken the time to try to understand what the compiler expects for file locations, etc., and you've bitten off a huge undertaking for an admitted 'newbie'.... I recommend that you get a 'flashing LED' program working first in real hardware, and then you'll be better suited to take on more complex tasks. Start small, and work from there!
BTW, it may just be a pet peeve of mine, but addressing your post to 'Masters' or 'Experts' is generally a huge red flag that you are simply trolling for working code, rather than being prepared to actually do the work of coding yourself. Ingratiating yourself to us for the most part does not work on this forum....
john |
|
|
ep.hobbyiest
Joined: 08 Oct 2014 Posts: 20
|
|
Posted: Wed Oct 08, 2014 11:19 am |
|
|
ohh yes
i have not worked that much with ccs but i have done work with XC8 that why i start ethernet directly.
sorry and you r right i should start with led blinking.... |
|
|
ep.hobbyiest
Joined: 08 Oct 2014 Posts: 20
|
|
Posted: Wed Oct 08, 2014 12:06 pm |
|
|
i have done led blinking before some days. in this project i didn't found tcpip library problem is only that i think ...
where is tcpip library.? |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Oct 08, 2014 12:59 pm |
|
|
Hi,
Later versions of the compiler may include CCS's implementation of the Microchip TCP/IP stack. If you don't have it, and you are a registered user of the compiler, I believe they will email it to you if you ask them to.
John |
|
|
ep.hobbyiest
Joined: 08 Oct 2014 Posts: 20
|
|
Posted: Thu Oct 09, 2014 8:16 am |
|
|
yes i have done registration and downloaded microchip stack also. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Oct 10, 2014 9:31 pm |
|
|
EZflyer,
From what I understand (based on current knowledge having used the CCS Stack), the CCS TCPIP stack is super super old. (v3.75 of MCHP stack) and MCHP is on like v6 something now.
Which, BTW, XC8 isn't yet supported for the TCPIP Stack (last I looked).. and XC8 is horrible. (I just did a project this year with it. SOOOO MANY BUGS!!!)
Lastly,
Microchip's TCPIP stack (And app libraries) won't compile under CCS without pretty much a complete re-write.
Unless there's something about CCS v5 I don't know...
It's usually not worth trying to port MCHP app libraries into CCS unless you REALLY know what's going on and have a LOT of time.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1346
|
|
Posted: Sat Oct 11, 2014 1:11 pm |
|
|
They literally just updated the wizard to handle the TCP/IP and HTTP clients. I don't know if that means they updated the stack or not, but it might be worth at least looking into. |
|
|
ep.hobbyiest
Joined: 08 Oct 2014 Posts: 20
|
|
Posted: Sun Oct 12, 2014 11:12 pm |
|
|
is there any tutorial?
so it can be helpful for everyone. |
|
|
|