====== Updating Carnivore2's firmware from command line ====== This document describes updating Carnivore2's firmware from the command line using the [[quartus_ii:quartus_ii#quartusiiweb150|Quartus II Web Edition (Free) 15.0]]. Below you can find the examples for MS Windows and Linux. The updating must be done in the following order: - [[#file_cdf|Create the settings file carnivore2.cdf]] - [[#determine_usb_port_number|Connect the USB Blaster and identify USB port number]] - [[#firmware_upload|Prepare the command line to upload firmware into Carnivore2]] - Supply power to Carnivore2: * Supply 5v to the cartridge board (mind the polarity!) \\ Recommended power cable: \\ {{msx:carnivore2:usb_blaster_5v_01.png?350|}} \\ Connecting power cable to cartridge: \\ {{msx:carnivore2:usb_blaster_5v_02.png?350|}} * Connect the USB Blaster's cable to the ''AS'' connector's placeholder on the cartridge (make sure that the cable is connected correctly!) \\ It's recommended to use the dual-row pin header (%%PLD%% 2×5, 2.54mm spacing), it needs to be inserted into the USB Blaster flat cable's connector: * {{msx:carnivore2:usb_blaster_as_01.png?150|}} * {{msx:carnivore2:usb_blaster_as_02.png?150|}} * {{msx:carnivore2:usb_blaster_as_03.png?150|}} \\ Then the cable with the pin header needs to be connected to the ''AS'' connector's placeholder on the cartridge board and it should be a bit tilted to make sure that it has a good connection to the board: * {{msx:carnivore2:usb_blaster_as_04.png?150|}} * {{msx:carnivore2:usb_blaster_as_05.png?150|}} * {{msx:carnivore2:usb_blaster_as_06.png?150|}} - Issue the firmware upload command [[#firmware_upload|upload command]] and wait for it to finish - After updating the firmware, remove the cables from the cartridge board in this order: * USB Blaster's cable * power cable {{anchor:file_cdf}} ====== carnivore2.cdf file ====== Create the file named ''carnivore2.cdf'', that contains the correct path to the file. |<100%>| ^MS Windows| |Pay attention to the divider in the example: \\ ''E:/MSX/Carnivore2/Firmware/'' \\ {{:msx:carnivore2:carnivore2_windows.cdf|example of carnivore2.cdf}}| ^Linux| |Example path to the file: \\ ''/home/user/MSX/Carnivore2/Firmware/'' \\ {{:msx:carnivore2:carnivore2_linux.cdf|example of carnivore2.cdf}}| {{anchor:determine_usb_port_number}} ====== USB port number ====== Now it's time to connect the USB Blaster and identify the USB port number: |<100%>| ^MS Windows| | C:\altera\15.0\quartus\bin64\quartus_pgm -l output: Info: Command: quartus_pgm -l 1) USB-Blaster [USB-0] | | | ^Linux| | ~/altera/15.0/quartus/bin/quartus_pgm -l output: Info: Command: quartus_pgm -l 1) USB-Blaster [3-2] | {{anchor:firmware_upload}} ====== Uploading the firmware ====== The command line must contain the full path to the application, [[#determine_usb_port_number|USB port number]] and the path to the [[#file_cdf|carnivore2.cdf]] file. ^MS Windows| |C:\altera\15.0\quartus\bin64\quartus_pgm --cable="USB-Blaster [USB-0]" E:\MSX\Carnivore2\carnivore2.cdf| | | ^Linux| |~/altera/15.0/quartus/bin/quartus_pgm --cable="USB-Blaster [3-2]" ~/MSX/Carnivore2/carnivore2.cdf| Info: Command: quartus_pgm --cable="USB-Blaster [USB-0]" E:\MSX\Carnivore2\carnivore2.cdf Info (213045): Using programming cable "USB-Blaster [USB-0]" Info (213011): Using programming file E:/MSX/Carnivore2/Firmware/carnivore2.pof with checksum 0x05E40CB4 for device EPCS4@1 Info (209060): Started Programmer operation at Tue Jan 04 12:08:32 2022 Info (209018): Device 1 silicon ID is 0x12 Info (209044): Erasing ASP configuration device(s) Info (209020): Blank-checking device 1 Info (209024): Programming device 1 Info (209022): Performing verification on device 1 Info (209018): Device 1 silicon ID is 0x12 Info (209011): Successfully performed operation(s) Info (209061): Ended Programmer operation at Tue Jan 04 12:08:40 2022 Info: Quartus II 64-Bit Programmer was successful. 0 errors, 0 warnings Info: Peak virtual memory: 240 megabytes Info: Processing ended: Tue Jan 04 12:08:40 2022 Info: Elapsed time: 00:00:09 Info: Total CPU time (on all processors): 00:00:01 {{tag>RBSC-en}}