|
|
Fast Downloads Using "make load"
(Autoupdate Utility)
There are 3 ways to download to flash memory on the CFV2-40:
RS-232, TFTP, and Autoupdate. The preferred method, and by far
the fastest and easiest to use, is Autoupdate.
RS-232 Serial Download
- Start MTTTY and connect to the development board
- Enter the debug monitor on the development board (press reset
button and type "A" in MTTTY at the debug monitor prompt)
- Type "fla" for flash download or "dl"
for RAM download
- Send S19 file from MTTTY (shortcut is to press the F5 key)
- If downoading to flash, the board will automatically reboot
when download is complete. If downloading to RAM, type "GO"
to jump to the program.
TFTP Network Download
- Start MTTTY and connect to the development board
- Start the NetBurner TFTP Server, nbtftp.exe. When the dialog
box appears, enter the path for the location of the S19 files.
This would be C:\nburn\bin for the default installation.
- Enter the debug monitor on the development board (press reset
button and type "A" in MTTTY at the debug monitor prompt)
- Type "nfla <file name>" for flash download
or "ndl <file name>" for RAM download. The download
will automatically start.
- If downoading to flash, the board will automatically reboot
when download is complete. If downloading to RAM, type "GO"
to jump to the program.
NetBurner Autoupdate Utility
The autoupdate utility is the fastest of the three methods,
and is very simple to use. In order to use autoupdate, you must:
- Have a static or DHPC assigned IP address and mask on the
NetBurner hardware
- Have a working network connection between the host computer
and the NetBurner hardware
- Have included #include <AutoUpdate.h> in your application
(Warning: autoupdate is included in most, but not all, NetBurner
examples in the \nburn\examples directory).
- Start network services and make the call to EnableAutoupdate()
in your applicaiton
Example of minimul application program using Autoupdate:
#include "predef.h"
#include <stdio.h>
#include <startnet.h>
#include <Autoupdate.h>
void UserMain(void * pd)
{
InitializeStack(); // Init TCP/IP Stack
OSChangePrio(MAIN_PRIO); // Set user thread priority
EnableAutoUpdate(); // Enable code update utility
printf("Application started\n");
while (1)
{
// your application code goes here
}
}
When it's time to run "make" to compile your program,
type "make load" on the command line instead. The first
time autoupdate is run, it will automatically locate all NetBurner
hardware, and provide a list of hardware addresses to select
from. Choose your particular board, and the flash will be updated
with your compiled _APP.s19 program. Subsequent compilations
using "make load" will compile the code and download
in one quick step. You will be amazed at the speed! For debugging,
use "make loaddebug" instead.
|