reesems
Reged: May 05 2004
Posts: 9
|
|
I am trying to test my wireless stack for CC2430 that is compatible with the IAR51 compiler with the C51 demo compiler, and am having some problems.
a. I running C51 from the console (Windows XP), and cannot get it to find include files correctly unless I have all of the source files (.h, .c) in the same directory. The same Makefile that works fine with the Hi-tech PICC18 compiler in terms of directory structure, -I<dir> paths, etc. does not work with the C51 compiler. Is this a limitation of the C51 demo compiler?
b. The C51 is adding an extra 4K bytes of space to the XDATA requirements over what the IAR51 compiler does (or for that matter, the PICC18 compiler for the same code). I can't look at the .map file to see where this extra 4K bytes of space is coming from, since the .map file option is disabled in the demo compiler. Is this a 'feature' of the demo compiler to discourage its use for production code?
I know that the CC2430 is not officially supported by this compiler (I had to create my own header files for it), so these may be moot questions. I did eventually get it compile, but the code is acting very strange. When I run a node as a coodinator using the C51 code, it does work for bit, ie, let a node join its network, but then it seems to go into a mode where it *slooooowwwwssssss* down (as evidenced by status messages being printed to the screen), causing all sorts of timeout havoc with packets, and I can't explain why this is happening. I am about ready to call it a lost cause. Maybe the demo compiler is not the right thing to be trying this with.
|
reesems
Reged: May 05 2004
Posts: 9
|
|
I fixed the functional problem with the stack (a union was being interpreted differently by the C51 compiler than with the IAR compiler), so it is working now.
But I am giving up on the demo compiler finding #include files, I guess this is not supported in demo mode as shown below:
####output from Console
C:\msstatePAN\obj\compiletest\hitech_cc2430\coord>c51 -Ic:\msstatePAN\src\stack -Ic:\msstatePAN\src\stack\target\iar51\cc2430_31 c:\msstatePAN\src\stack\aps.c --chip=CC2430 HI-TECH 8051-C COMPILER V9.01 Copyright (C) 1984-2004 HI-TECH SOFTWARE
This compiler will expire in 19 days Compiler operating as demo version. Some command line options are disabled.
c:\msstatePAN\src\stack\aps.c: 50: #include "compiler.h" ^ Cannot open include file "compiler.h" Exit status = 1
#### The "compiler.h" file that it says it cannot find is in the c:\msstatePAN\src\stack\target\iar51\cc2430_31 directory.
I also have not figured out where the extra 4K bytes is coming from, I will chalk this up to demo mode as well.
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 3387
Loc: Boulder, Colorado U.S.A.
|
|
Quote:
...-I<dir> paths, etc. does not work with the C51 compiler. Is this a limitation of the C51 demo compiler?
FWIW, I seem to recall that being a limitation of the PIC demo compilers (I could be wrong), so it would make sense that the 8051 demo does likewise. There should be a list of demo limitations documented (readme?) that I thought was on the website too, but I couldn't quickly find it.
|
reesems
Reged: May 05 2004
Posts: 9
|
|
Thanks for the reply.
I was wondering about the disabled options as well, so I checked them out.
'c51 -help' lists the compile options that are disabled, and the -I<dir> option is not one marked as disabled, but I guess the "-help" could always be wrong.
Just a weirdism I guess; it would make sense for them to disable this option.
|
yogi
Tester
Reged: Aug 16 2007
Posts: 1
|
|
Hello, I was wondering what prompted you to try C51 compiler over IAR for the CC2430? Did you get any better code size from C51?
|