Blog > Re: Code summary

Home Forums ViewPort Code summary Re: Code summary

#11675

Anonymous

Hi Hanno,

I am using the Beta version 4.6.7.

Hopefully you can re-create the licence issue this way:

1. Edit / Program perfs (PP) / Reset defaults.
2. Close PP windows, and DO NOT immediately open it again… :)
3. Popup window will show licence is 288 days past 30 days limit ! If you had the PP window open here, you would be in trouble!
4. Enter email & licence code, click register. All ok.
5. Try to use Run_Diag,… maximum speed only 115k. Restart program, same. Noticed that even if I change the speed in PP, it always sticks at PP. So I guess my high-speed licence not recognised yet.
6. OK, Help / REgister licence, enter again the email/licence code.
7. OK, 2nd time round its ok. debug speed can be up to 1Mb/s

Another thing.

1. Open PP and change the buffer size from Auto to 1000, click OK
2. Open PP again. Mine is all blank, and I need to do the procedure above!

Finally, the VP switch you mentioned sounds just the ticket! That would be great to leave the VP code intact and just compile a version for production use that ignores all the debug symbols. Anytime in the future I want to go back and debug the code, it will be ready for me!

Would be even better if we could "compile to eeprom image" also! You know, the 32Kb .eeprom file format that proptool produces.

I am having some head-banging moments getting used to a few things at the moment… The overhead of the VP code is an issue for larger programs, especially where timing is an issue and LMM might not be an option. But I can see this is the way forward, and perhaps if the WATCH / BREAK debugging could work later, then that might solve it as I would not need to insert memory-heavy VP_Str statements everywhere!

I also noticed the VP_Str uses all the __paramx variables, so I have implemented a new set of "subtmpx" variables for my own code, so that VP_x does not mangle things. That’s a little gotcha that perhaps should be in the user guide!

One thing I’m not getting yet is how to get the WATCH values to appear in the viewport console. Especially if I have (for example) an rxBuffer byte (100) … should it be possible to see (in viewport) the ascii-string or hex-string contents of this buffer at all times? So say I SERIN "HELLO" to a HUB variable rxBuffer, can I see "HELLO" in viewport?

Maybe that is what the BREAK in the program to pause execution would be need for, to allow viewport to refresh with the latest value and wait until I had a chance to read it? … Actually, sometimes a BREAK might be ideal, but othertimes NOT ideal as it might affect program flow…. maybe a third command is needed "LOG", which would log all the current watch values to the VP_terminal (or some other window) perhaps with date/time prefixed, but not break the program flow. Then this "log" window would show all the history, and that might also solve having loads of individual "memory-consuming" VP_Str statements throughout the code. Perhaps the LOG format would be: date/time, IO integer (representing IO pin states), watched variable values

OK, one more…

I really like the option to just your "WATCH", and thus watch everything. However, if you have a rxBuffer(16384), then an error appears! Something like > 4091 watched values. Is there someway around this… maybe to watch only a selected portion of the buffer? (WATCH rxBuffer 0:1000)

Well, that’s enough for now.. Gotta do some work this morning!

Thanks again!

Max.