Vex Robotics Team

Vex Robotics Team

Home Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Memory Status
#62
richard
Fresh Boarder
Posts: 16
graphgraph
User Offline Click here to see the profile of this user
Birthday: 03/14
Memory Status 4 Months, 3 Weeks ago  
Hi
Does anyone know how to check the free memory status in a VEX micro-controller?
This is to check how much space my program is taking up, and how much free space there is.
Any help would be appreciated!
Thanks
 
The administrator has disabled public write access.
#63
admin
Administrator
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Gender: Male flangefrog Free Range Robotics Location: Henderson, Waitakere, New Zealand Birthday: 12/30
Re:Memory Status 4 Months, 3 Weeks ago  
When in the US the person who built RobotC turned on some option so he could see what was in each block of memory (addresses as hex codes). I know it had to be in super user mode but I can't remember how he did it. Look in the "Internal" or possibly "Compiler" tabs in the preferences.
 
Michael David Lawton - Programmer
Team 2921 Free Range Robotics (Homeschoolers)
www.robotics.org.nz

2009 New Zealand Champions
2009 New Zealand Programming Skills Champions
2009 World Semifinalists
2009 World Robot Skills 3rd Place
2009 World Programming Skills Champions
The administrator has disabled public write access.
#64
richard
Fresh Boarder
Posts: 16
graphgraph
User Offline Click here to see the profile of this user
Birthday: 03/14
Re:Memory Status 4 Months, 3 Weeks ago  
ROBOTC is an interpetative system. By that I mean the ROBOTC compiler generates instructions for a "pseudo" virtual machine (VM) and your user user program is compiled into instructions for this VM.

There's 32K of flash memory in the VEX user CPU. 2K is used by the bootloader, 26K for the ROBOTC VM and device drivers and 4K is available for user programs.

4K may not sound like much, but not many user programs exceed this size. The instructions for the VM are very efficient and typical user programs are under 500 bytes in size.

If you set the "User Level" to "Expert" then you can set a check mark in the "Compiler" tab in the "Preferences" on the "View" menu to "Show Compiler Statistics in Error Pane". One of the statistics is the total size of your program.

The ROBOTC firmware has a file system that will allow multiple user programs to be stored in the 4K. This feature is not exposed to end users because of the complexity of explaining how it works to end users and the lack of a decent user input device (i.e. this predates the recent availability of the VEX LCD and three buttons peripheral) so that downloading a program should overwrite the existing program on the controller. But if you managed to accidentally enable the file system this may have caused you to run out of memory.
The simplest way to recover from this is to re-download the firmware and reset all the registry values.
 
The administrator has disabled public write access.
Go to topPage: 1
Moderators: admin
 
Joomla 1.5 Templates by Joomlashack