The cortexFlash utility is a single executable file available for both Windows and OSX. It is one method of downloading the compiled binary to the cortex. Purdue college has recently released the PROS IDE, if you are using this then it includes a java based cortex flash utility which can be used as an alternative.
cortexFlash can be downloaded from the github project page.
The utility can be placed in any convenient location on the PC, you will need to modify the PATH environment variable if you want to run it from the command line without giving the full executable path.
Usage is as follows.
Usage: cortexflash [-bvngfhc] [-[rw] filename] [comport] -b rate Baud rate (default 115200) -X Enter VEX user program mode -X1 Enter VEX user program mode using C9 commands -X2 Enter VEX user program mode using old style RTS control -r filename Read flash to file -w filename Write flash to file -u Disable the flash write-protection -e n Only erase n pages before writing the flash -v Verify writes -n count Retry failed writes up to count times (default 10) -g address Start execution at specified address (0 = flash start) -f Force binary parser -h Show this help -c Resume the connection (don't send initial INIT) *Baud rate must be kept the same as the first init* This is useful if the reset fails Examples: Get device information: cortexflash -X COM4 Write with verify and then start execution: cortexflash -X -w filename -v -g 0x0 COM4 Read flash to file: cortexflash -X -r filename COM4
The default output file name that ConVEX creates is output.hex. Here is an example of downloading a test project that shows correct operation of the program.
$cortexflash -X -w C:/Projects/convex/cortex/projects/TestProject-Clawbot/bin/output.hex COM4 VEX cortex flash loader Using Parser : Intel HEX Send bootloader start command Serial Config: 115200 8E1 Version : 0x22 Option 1 : 0x00 Option 2 : 0x00 Device ID : 0x0414 (High-density) RAM : 64KiB (512b reserved by bootloader) Flash : 384KiB (sector size: 2x2048) Option RAM : 15b System RAM : 2KiB Wrote address 0x0800b778 (100.00%)
The utility can be added as an external tool if using eclipse. The screen grab below shows how cortexFlash was added for one of the demo projects,