11.07.2015 Views

BCL Programmers Manual V2.00 (PDF) - Barix

BCL Programmers Manual V2.00 (PDF) - Barix

BCL Programmers Manual V2.00 (PDF) - Barix

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.4 Program uploadThe above mentioned cob file can be uploaded into a flash memory page on the targethardware using the TFTP protocol (Barionet) or via the web interface.A comfortable graphical client or a command-line TFTP tool can be used. For examplea command-line utility called tftp shipped with the Microsoft operating system can be used inthe following way:tftp -i 192.168.0.10 PUT basictest.cob WEB4(In this example COB file basictest.cob is uploaded in the flash page WEB4 of the device withthe IP address 192.168.0.10)There should be a short pause of approximately 3 seconds after each upload in order toallow the <strong>Barix</strong> <strong>BCL</strong> device to store the file internally.WARNING: Incorrect timing may result in corrupted files.Note: Tftp uploading of <strong>BCL</strong> .cob files to certain <strong>Barix</strong> <strong>BCL</strong> devices is possible only whenthese devices are in the bootloader mode (the IP Audio Module is an example of such adevice).2.5 Batch files<strong>Barix</strong> recommends using the supplied batch files (see the next section).To make the tokenizing, web2cob and the tftp upload easier, <strong>Barix</strong> provides the bcl batch filethat should be used in the following way:bcl where is the IP address of your <strong>BCL</strong> device and is a name of asubdirectory containing the <strong>BCL</strong> source files. The source file has to have the same name asthe subdirectory. In the following example program myprog is loaded into flash page 4 of thedevice with IP address 192.168.2.145. The directory myprog contains <strong>BCL</strong> sourcemyprog.bas.bcl myprog 192.168.2.145Content of the bcl.bat follows:cd %1del *.bak..\tokenizer %1.basif errorlevel 1 goto quitcd ..web2cob /o %1.cob /d %1tftp -i %2 put %1.cob WEB4goto endit:quitecho "ERROR - TOKENIZER REPORTS FAILURE"cd ..:endit<strong>Barix</strong> AG | 5/106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!