Shop OBEX P1 Docs P2 Docs Learn Events
Incomprehensible behavior on inclusion of an object — Parallax Forums

Incomprehensible behavior on inclusion of an object

Dear all,

My program is written in PASM/SPIN and works the way I want it to.
The OBJ section of the main file looks like this:
OBJ
  debug: "SerialMirror"
  fmt: "Format"
  aescontroller: "HubAES"
  hmaccontroller: "SHA-test"

Now, when I include another object:
OBJ
  debug: "SerialMirror"
  fmt: "Format"
  aescontroller: "HubAES"
  hmaccontroller: "SHA-test"
  demo: "Demo"

The program is no longer working as intended. Please note that the object 'demo' is not used anywhere in the code. It's only listed in the OBJ section. The size of the .binary increases from about 8KB to 13KB after I include this line.
Is the object used/executed in some way only because it's listed in the OBJ section?
Does anybody have an explanation for this given this black box example?

Thanks!

Comments

  • This indicates that your program is reading/writing from memory that it shouldn't be, or you have an uninitialized value. You may have a bad pointer or you are reading/writing beyond the bounds of an array. The only way for us to debug it is for you to post all your code.
  • Dave Hein wrote: »
    This indicates that your program is reading/writing from memory that it shouldn't be, or you have an uninitialized value. You may have a bad pointer or you are reading/writing beyond the bounds of an array. The only way for us to debug it is for you to post all your code.

    After reading your reply I've double-checked all PASM loops and it turned out that there were a couple of memory-related mistakes. Apart from that, I forgot to clear some "res" memory.
    The problem is solved. Thank you!
Sign In or Register to comment.