Compile oddities and frustration
Erik Friesen
Posts: 1,071
I have here my complete code, its more than one can really grasp in a few minutes, but here is the gist of my problem.
Adding or removing items to my code renders it unusable or usable, independent of the added code functionality.
In the zip here, notice in the top file, that changing the - text : "s6b0724unv1.0small" - from the top to the bottom of the object series does this. At the bottom the screen outputs gibberish, and modules fail to start. With text at the top everything appears ok, but I have a function (clkmenu) that hangs, and will not return.
I am used to the pic stuff, and the inability to debug this problem is driving me nuts.
Adding or removing items to my code renders it unusable or usable, independent of the added code functionality.
In the zip here, notice in the top file, that changing the - text : "s6b0724unv1.0small" - from the top to the bottom of the object series does this. At the bottom the screen outputs gibberish, and modules fail to start. With text at the top everything appears ok, but I have a function (clkmenu) that hangs, and will not return.
I am used to the pic stuff, and the inability to debug this problem is driving me nuts.
Comments
the problem might be
- a too small stack
- an array that writes to RAM out of its borders
- a pointer that points to the wrong place in RAM
if some more code is added the RAM-overwriting has this effect.
This is only a quick guessing. I haven't looked inside your code
best regards
Stefan
Good catch hein, unfortunately that method isn't being called here, I'll fix, but can't be the issue here.
You are probably scribbling into memory somewhere. If the last object is failing, then it might mean that you're scribling into the area just before the VAR section. Try putting a long dummy array at the beginning of the VAR section of the top object to see if this makes the problem go away. If so, then try reducing the size of the dummy array until the problem happens. The dummy array would be placed as follows: The contents of dummy should always be zero, if it's not zero then you are scribbling into it.
BST/BSTC can create a list file that has all the compiled addresses in it. It seems to give much more info than a map file.
http://obex.parallax.com/objects/30/