BS2 code file size limits?
Otaku1031
Posts: 34
Hi all,
Quick question on BS2 file size limits. The documentation says a limit of 2KB (~500 lines), but I'm currently running a file that's reported by Windows to be 9KB. There's about 350 lines in the program. What's the real file size limit in KB, or is it based on the number of lines only?
Quick question on BS2 file size limits. The documentation says a limit of 2KB (~500 lines), but I'm currently running a file that's reported by Windows to be 9KB. There's about 350 lines in the program. What's the real file size limit in KB, or is it based on the number of lines only?
Comments
You can see how memory on the Stamp is filling up by pressing the Ctrl-M (for Memory) option. There is a display on the left that shows the program space, with your DATA statements working down from the top and the program itself working up from the bottom. A display on the right shows how you are using the RAM memory where your variables are stored.
To attach code to a message, you can use the "+ Reply to Thread" button, but then click on the "Go Advanced" button. You'll get a large, complex window that includes a "Manage Attachments" button. That will let you attach one or more files to your message.
There's no way to increase the 2K compile code size limit. You can break your program up into 2K pieces and, with some Stamp models, have several 2K pieces that work like overlays, but it requires some work on your part and isn't the same as having one large program.
Usually there's a lot of code space to be saved by separating out repeated pieces of code as subroutines so the code isn't duplicated multiple times. Also, strings in I/O statements take a lot of memory (at least the length of the string ... and duplicates are not combined).
Here's the code I'm running. If I go above ~9KB on the file size I get an error msg "EEPROM Full" or something to that effect. Any ideas as to why this is happening? Thanks for all advice!
Gary
You have tons of single PIN commands that could be combined using the dedicated pin registers like IN DIR and OUT.
Run this as an example