PUB/CON list overflow in Propeller Tool 1.3.2
Larry Martin
Posts: 94
Hello, I am adding features to a propeller design that I have been shipping since 2010. Today I had my first encounter with the error message "PUB/CON list overflow". I added about 50 constants last night, and got this error on my first attempt to compile. It goes away if I remove my last 20 constants, for a total of 255 CON section entries. But if I then add short entries like "kD1=1" to make more symbols, I don't get the error. This file has 166 PUB functions, no PRI functions, and I want to end up with around 325 well named constants. If teh symbol names are a factor, I tend to like long names.
I am using Propeller Tool 1.3.2
Can someone explain what this error message is about, so I don't have to gut my legacy symbols to fit my new ones?
Thanks,
Larry
I am using Propeller Tool 1.3.2
Can someone explain what this error message is about, so I don't have to gut my legacy symbols to fit my new ones?
Thanks,
Larry
Comments
http://forums.parallax.com/showthread.php/137452-OpenSpin-Spin-PASM-compiler-in-C-C
C:\GlueLogix\Development\Products\LineLogix\Propeller>openspin TCU_xxxxx.spin
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2013 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.70 Compiled on Mar 10 2014 23:53:34
Compiling...
TCU_xxxxx.spin
TCU_xxxxx.spin(2287:1) : error : PUB/CON list overflow
Line:
PUB MM_Read | ok
Offending Item:
This is the same line that Propeller Tool fails on. It changes if I delete constants.
Good thing is, now I have source so I can see where things go bad.
Thanks!
I think I just made due with fewer constants. Sorry, not much help.
-Phil
I was just about to say (almost) the same thing. While the limit doesn't effect many of my projects, some of my controller to robot communication protocols can have lots of opcodes I want to list. So far, listing the opcodes in a header file has kept this from being much of a problem but the limit of 255 constants per object seems like it's an unnecessary constraint.
The limit did not seem to be 255, exactly. As I was trimming symbols, things started working at 255, but then I could add trivial symbols so there were more than 255, and it kept compiling.
In any case, since this was a special version, I deleted a bunch of unused code and associated symbols and got running again in an our or two.
BR,
Larry
Duane,
How do you create a header file? I tried a .spin file with just CON but it says "No PUB routines found." Am I missing something?
subObj#ConstantName
The sub Object has to have at least one PUB method (even if empty) or it will not compile.
Enjoy!
Mike
But this isn't so convenient, as all the constants then have to be referred to by header#constant.
I think I'll keep the number of constants below 255.
Another very good reason to get rid of this limit in new Spin compilers. I for one really want to use Kye's Omnia Creator with Spin.
I think the issue is somewhat clouded. I can't duplicate it as purely a CON based issue. Attached is a simple test I created with 600 constants. It compiles fine with both the original Spin compiler and OpenSpin.
There are definitely limitations for things like PUBs/PRIs and others. I don't know of a CON limitation, but I may be forgetting something.
CON Test.spin
CON Test.spin
I can understand that perhaps there are other limits on Spin language constructs imposed by the nature of the Spin bytecodes or the Spin interpreter.
That's what I suspected, it had to do with that symbol buffer; so symbol size is an issue in this case.
Here's an updated test object that causes the error at my 586th constant. Note: it'd be different with different sized symbols and method names / method count.
CON Test.spin
Since it is arbitrary, we can adjust it. We'll look into this.
Things like this were implemented with a reasonable space based on estimates of usage. Remember, the compiler was written in x86 assembly to begin with. Now we have an easier means of handling otherwise arbitrary limitations so they don't become issues.
This probably explains why this has happened to me several times. I often run into the 30 character limit on variable and constant names. Apparently I'm abbreviation intolerant.
OpenSpin allows for symbol names up to 254 characters,
OnTheOtherHandIThinkUsingVeryLongVariableAndMethodNamesIsPerhapsNotSuchAGoodIdea.
The forum software inserts a space after 50 consecutive printable characters thus breaking the entire meaning of my post.
So much for the semantic web idea.