___ ___ _ ___ ___ |_ _/ __| /_\ | _ \ __| | | (__ / _ \| / _| |___\___/_/ \_\_|_\___| Intelligent platform management Controller softwARE Copyright (c) 2014-2019, LAPP/CNRS ------ README ------ Fatih Bellachia This file describes how to configure and build the ICARE release, your own project, how to download the firmware with OpenOCD, to start Insight Debugger and to upgrade firmware of master/slave MCU. I) Project directory structure ICARE |-- contrib | |-- CMT <- Software Configuration Management tool | | | (see http://www.cmtsite.net) | | `-- v1r22 | |-- gcc <- GNU toolchain for ARM Cortex-M4 | | `-- 4.7.0 | `-- openocd <- Open On-Chip Debugger tool | | (see http://openocd.sourceforge.net) | |-- share | | `-- data <- Contains OpenOCD target config files | | for IPMC mezzanine (i.e. 'IPMC' and | | 'IOIF' MCUs) | |-- Linux <- 32-bit and 64-bit Linux version (0.9.0) | `-- windows <- 32-bit and 64-bit Windows version (0.9.0) `-- releases <- Release area `-- ICARE-00-03-01 <- current version |-- ICAREPolicy <- Gathers all policies and management | conventions for project |-- ICARERelease <- Enumerate all packages that check-out and | build in the release |-- TPS2459 |-- admin <- Setting up the work environment |-- blinky |-- channel |-- cmc <- Carrier Management Controller |-- cmt <- Project description or specification |-- config <- Default configuration of I/O polarity |-- console |-- cpld |-- dataStorage |-- debug |-- demo <- Example how to build application with modules |-- doc | |-- COPYING <- CeCILL-C Free Software License Agreement | |-- icare_manual <- ICARE User's manual | |-- Prog_IPMC.pdf <- Installation of openOCD and programming of IPMC | |-- README <- This readme file | |-- RELEASE_NOTES <- Release notes | `-- TODO |-- echo |-- ekeying |-- fwUpgrade |-- gpio |-- i2c |-- imc |-- inet <- Demo of InterNET services application (super-server) |-- iopin |-- iperfServer |-- ipmb |-- ipmc <- 'IPMC' master MCU and 'IOIF' slave MCU modules |-- led |-- libopencm3 |-- ltc4222 |-- lwip |-- main <- main function (i.e. entry point) |-- messageDispatcher |-- messageQueue |-- module <- software module management |-- monStateSlvMcu |-- nsBroker |-- otp |-- prom24256 |-- queue |-- rcc |-- resourceBroker |-- sensors |-- spi |-- support <- syscalls stubs for STM32F4xx | scanf, abort and assert functions |-- taskQueue |-- testsuite |-- time |-- tmp102 |-- TPS2459 |-- usart |-- usartListener `-- xvc II) Supported Operating System - Scientific Linux CERN 5 (SLC5) - Scientific Linux CERN 6 (SLC6) III) Supported CMT tags (see ICAREPolicy) 3.1) Linux (CMTCONFIG environment variable) - i686-slc5-gcc41-opt - i686-slc5-gcc41-dbg - x86_64-slc5-gcc41-opt - x86_64-slc5-gcc41-dbg - i686-slc6-gcc44-opt - i686-slc6-gcc44-dbg - x86_64-slc6-gcc44-opt - x86_64-slc6-gcc44-dbg 3.2) ARM target (ICARECONFIG environment variable) - arm-gcc47-opt - arm-gcc47-dbg IV) Configuration !!!! SKIP § 4.1 if contrib area is already installed !!!! SKIP § 4.2 and 4.3 if you have installed latest ICARE software stack 4.1) Re-initialize CMT package % cd /ICARE/contrib/CMT/v1r22/mgr % ./INSTALL % source setup.[c]sh 4.2) Download patch file for insight1.0 4.2.1) From LAPP twiki page Please, follow the web link below: http://lappwiki.in2p3.fr/twiki/bin/view/AtlasLapp/Informatique 4.2.2) From UNIX terminal % cd /contrib/gcc/4.7.0 % wget -O insight1.0.patch "https://lapp-owncloud.in2p3.fr/public.php?service=files&t=1d2572156d324882e1533daa8e8bd8b8&download" 4.3) Applying patch for insight1.0 tcl/tk files % cd /contrib/gcc/4.7.0 % patch -p 1 < insight1.0.patch 4.4) Re-generate CMT setup scripts in admin package % cd /ICARE/releases/ICARE-00-03-01/admin/cmt % cmt relocate 4.4.1) Setting up of ICARE development environment - [DEFAULT] Set native compiler 'gcc version 4.1.2/4.4.7' and ARM compiler 'arm-elf-gcc version 4.7.0' with debugging flag % source setup.[c]sh <- use this default setting up - Set native compiler 'gcc version 4.1.2/4.4.7' and ARM compiler 'arm-elf-gcc version 4.7.0' with optimization flag % source setup.[c]sh -tag_add=opt 4.5) Re-generate CMT setup scripts in ICAREPolicy package % cd ../../../ICAREPolicy/cmt % cmt relocate 4.6) Re-generate CMT setup scripts in ICARERelease package % cd ../../../ICARERelease/cmt % bcmt cmt relocate <- broadcast 'cmt relocate' command to all packages included in the release V) Build 5.1) Build release (...THIS TASK IS EXECUTED ONLY ONCE...) % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd /ICARE/releases/ICARE-00-03-01/ICARERelease/cmt % make release <- broadcast 'make' command to all packages included in the release 5.2) Re-build any package % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd /ICARE/releases/ICARE-00-03-01//cmt % make clean all VI) Running OpenOCD on Windows (i.e. in MS-DOS window) 6.1) Windows 64-bit e: cd \openocd-0.9.0\bin-x64 e: openocd-x64-0.8.0.exe -f interface\ -f target\ipmcv2_1.cfg 6.2) Windows 32-bit e: cd \openocd-0.9.0\bin e: openocd-0.9.0.exe -f interface\ -f target\ipmcv2_1.cfg NOTE: About the USB to JTAG interface see openocd.sourceforge.net/doc/html/Debug-Adapter-Hardware.html Interface tested at LAPP: - Olimex - ARM-USB-OCD-H - NGX technology - NGX ARM USB JTAG 6.3) MS-DOS script openOCD.bat (https://lapp-owncloud.in2p3.fr/index.php/s/JC63kHS6kuuc3fM/download) This script allow to select USB to JTAG interface and to execute openocd (64-bit by default). You need to set the path of openocd distribution (i.e. edit openOCD.bat): e.g.: ... set inst_path=\openocd-0.9.0\bin-x64 ... The usage of this MS-DOS script is: e: openOCD /? "openOCD [/l|/n|/o] [/?]" /l LUMINARY BD-ICDI-B [default] /n NGX TECHNOLOGY /o OLIMEX ARM-USB-OCD-H VII) Create your project 7.1) Create project area and install packages 7.1.1) Create area % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % mkdir / % cd / 7.1.2) Create package script The create_project_area.sh script installs in the current directory two packages. One for configuring I/O polarity and the second to provide template source codes which allows the user to customize the FRU/SDR and some other modules. usage: create_project_area.sh [-hl] -a [-c] -n -p [-v ] Create your package. options: -a name (email address) -c Add Carrier Management Controller. -h Print this help -l List existing package templates -n name to run the OpenOCD server on -p name (e.g. Board name) -v number of package (default: v0r1) There are some pre-defined packages, to list them execute the following command: % create_project_area.sh -l ================= Package templates ================= - ABBA: ATCA test Board for Baseline Acquisition - LAPP/CNRS - FEX_Hub: Feature EXtractor Hub board - Michigan State University - GOLD: Generic Opto Link Demonstrator - Univ. of Mainz/ETAP - ITB: IPMC Test Board - LAPP/CNRS - KIWI: devKit for Ipmc Workshop Initiation - LAPP/CNRS - LArC: LAr Carrier board - Stony Brook University - PULSAR_IIb: A Full Mesh ATCA-based General Purpose Data Processing Board - FNAL 7.1.3) Example: Installing new project % create_project_area.sh -a john.doe@example.org -c -n 192.168.0.10 -p Diretctory structure created by the script: |-- | |-- cmt | | |-- Makefile | | |-- cleanup.csh | | |-- cleanup.sh | | |-- requirements <- Contains modules, Board Management Controller (BMC) | | | and EEPROM programming applications | | |-- setup.csh | | |-- setup.sh | | `-- version.cmt | |-- share | | `-- data | | `-- .m4 <- FRU description | `-- src | |-- cfg_data.h <- Example of defines | |-- p2p_ekeying.c <- Example of module of how to register Link Descriptors (E-Keying) | |-- sdr_data.c <- Template source code with mandatory | | sensor structures and user sensor structures | `-- sensors.c <- Example of module of how to register sensors |-- cmt | `-- project.cmt <- Project description which use ICARE-00-03-01 | |-- config | |-- cmt | | |-- Makefile | | |-- cleanup.csh | | |-- cleanup.sh | | |-- requirements | | |-- setup.csh | | |-- setup.sh | | `-- version.cmt | |-- config | | |-- amcconfig.h <- Mapping between AMC interface and Site number | | |-- appconfig.h <- Applications parameters definition | | |-- boardconfig.h <- Manufacturer, Product and Device IDs | | | and Device revision definition | | |-- config.h | | `-- ioconfig.h <- I/O polarity configuration file | `-- src `-- create_project_area.log <- Output log file VIII) Build your project 8.1) Configure your project 8.1.1) Set I/O pin polarity - Edit and modify ioconfig.h % //config/config/ioconfig.h ... NOTE: Polarity type are: - IO_PIN_ACTIVE_HIGH - IO_PIN_ACTIVE_LOW - IO_PIN_NORMALLY_OPENED - IO_PIN_NORMALLY_CLOSED 8.1.2) Set Board information - Edit and modify boardconfig.h % //config/config/boardconfig.h ... USAGE: MANUFACTURER_ID() PRODUCT_ID() DEVICE_ID() DEVICE_REVISION() NOTE: The Internet Assigned Numbers Authority (IANA) is a department of ICANN, a nonprofit private American corporation that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Internet Protocol-related symbols and numbers. Link to request a Private Enterprise Number (PEN): http://pen.iana.org/pen/PenApplication.page Link of the list of PEN assignments: http://www.iana.org/assignments/enterprise-numbers 8.1.3) Set mapping between AMC interface & Site # - Edit and modify amcconfig.h % //config/config/amcconfig.h ... USAGE: AMC_BLOCK_MAPPING(, ) INFORMATION: Geographical Address, IPMB-L address and AMC Slot ID +----------+---------+---------+-------------------------+ | GA[2..0] | IPMB-L | AMC | Module Physical address | | | address | Slot ID +-------------+-----------+ | | | | Site Number | Site type | +----------+---------+---------+-------------+-----------+ | GGU | 72h | A1 | 1 | AMC (07h) | | GUG | 74h | A2 | 2 | AMC (07h) | | GUU | 76h | A3 | 3 | AMC (07h) | | UGG | 78h | A4 | 4 | AMC (07h) | | UGU | 7Ah | B1 | 5 | AMC (07h) | | UUG | 7Ch | B2 | 6 | AMC (07h) | | UUP | 7Eh | B3 | 7 | AMC (07h) | | UPU | 80h | B4 | 8 | AMC (07h) | +----------+---------+---------+-------------+-----------+ | ... | 82h-A4h | NA | 9-26 | AMC (07h) | +----------+---------+---------+-------------+-----------+ | NA | A6h-FEh | NA | 27-71 | RTM (09h) | +----------+---------+---------+-------------+-----------+ ============================================================ CAUTION: You need to re-compile the release and your project (see below § 8.2) ============================================================ 8.2) Re-build packages and your project % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make rebuild NOTE: This broadcast command re-builds the packages and your project 8.3) Build your project % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make bmc NOTE: This command builds the following binaries: - libeeprom_data_copy.a <- FRU/SDR structures - sensors_IOIF.m.o <- Sensors module - p2p_ekeying_IOIF.m.o <- P2P E-Keying module - eeprom_programmer_IOIF.elf <- EEPROM programmer - bmc_IPMC.elf <- Intelligent Platform Management Controller (master MCU) - bmc_IOIF.elf <- I/O InterFace (slave MCU) 8.4) Get information about versions % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt 8.4.1) Get short information % make version =================================== IPMC - Version =================================== OpenOCD server: localhost Release ver.: ICARE-00-03-01 Compilator : (GNU) gcc 4.7.0 [dbg] Binary image: bmc_IPMC.bin Build ver. : Nov 10 2015, 20:06:37 ----------------------------------- =================================== IOIF - Version =================================== OpenOCD server: localhost Release ver.: ICARE-00-03-01 Compilator : (GNU) gcc 4.7.0 [dbg] Binary image: bmc_IOIF.bin Build ver. : Nov 10 2015, 20:06:37 ----------------------------------- 8.4.2) Get full information % make full_version =================================== IPMC - version =================================== OpenOCD server: lappc-p481 Release ver.: ICARE-00-03-01 Compilator : (GNU) gcc 4.7.0 [dbg] Binary image: bmc_IPMC.bin Build ver. : Nov 10 2015, 20:06:37 Use packages: - resourceBroker v0r1 - queue v0r2 - libopencm3 v0r3p2 - otp v0r1p3 - rcc v0r1p3 - gpio v1r3p4 - usart v0r1p2 - taskQueue v0r2p2 - led v0r1p2 - module v0r2p1 - debug v0r2 - support v0r3 - ekeying v0r1p2 - lwip v1.4.0 - spi v0r4p1 - cpld v0r1 - main v0r1p1 - iopin v0r3 - config v0r2 - i2c v3r2p2 - ltc4222 v0r1 - TPS2459 v0r1p1 - sensors v0r2p2 - dataStorage v0r3 - ipmb v0r4 - messageQueue v1r2 - nsBroker v0r2 - imc v0r6p3 - channel v0r5 - messageDispatcher v0r2p2 - fwUpgrade v0r1p2 - ipmc v0r10 - cmc v0r2 - ITB v0r1 ----------------------------------- =================================== IOIF - version =================================== OpenOCD server: lappc-p481 Release ver.: ICARE-00-03-01 Compilator : (GNU) gcc 4.7.0 [dbg] Binary image: bmc_IOIF.bin Build ver. : Nov 10 2015, 20:06:37 Use packages: - resourceBroker v0r1 - queue v0r2 - libopencm3 v0r3p2 - otp v0r1p3 - rcc v0r1p3 - gpio v1r3p4 - usart v0r1p2 - taskQueue v0r2p2 - led v0r1p2 - module v0r2p1 - debug v0r2 - support v0r3 - ekeying v0r1p2 - lwip v1.4.0 - spi v0r4p1 - cpld v0r1 - main v0r1p1 - iopin v0r3 - config v0r2 - i2c v3r2p2 - ltc4222 v0r1 - TPS2459 v0r1p1 - sensors v0r2p2 - dataStorage v0r3 - ipmb v0r4 - messageQueue v1r2 - nsBroker v0r2 - imc v0r6p3 - channel v0r5 - messageDispatcher v0r2p2 - fwUpgrade v0r1p2 - ipmc v0r10 - cmc v0r2 - ITB v0r1 ----------------------------------- IX) Download/Running firmwares with OpenOCD 9.1) Download firmwares respectively in the MCUs Flash memory % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make flash_bmc NOTE: This command downloads respectively; -> bmc_IPMC.elf in 'IPMC' master MCU -> bmc_IOIF.elf in 'IOIF' slave MCU To individually download the firmware on the target MCU execute the following command: - master MCU (IPMC) target % make bmc_IPMC_flash - slave MCU (IOIF) target % make bmc_IOIF_flash 9.2) Running firmwares % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make run ------------------------- OpenOCD server: localhost IPMC (master MCU) running IOIF (slave MCU) running ------------------------- X) Debugging firmware with Insight Debugger and OpenOCD % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make debug_bmc NOTE: This command starts two 'Source' windows: 1) for 'IPMC' MCU target 2) for 'IOIF' MCU target XI) One-Time Programming (OTP) memory area The STM32F4xx device has 512 Bytes (32B x 16) of OTP memory, used as non-volatile user data storage. One block has been programmed on each MCUs to store some factory information (see below): 11.1) Memory block organisation +----------+----------+----------+----------+----------+ | OFFSET | BYTE-0 | BYTE-1 | BYTE-2 | BYTE-3 | +----------+----------+----------+----------+----------+ | 0 | MCU ID | x | x | +----------+----------+----------+----------+----------+ | 4 | MAC ADDRESS LSB* | +----------+----------+----------+----------+----------+ | 8 | MAC ADDRESS MSB* | x | x | +----------+----------+----------+----------+----------+ | C | PCB VERSION | +----------+----------+----------+----------+----------+ | 10 | SERIAL NUMBER | +----------+----------+----------+----------+----------+ | 14..1C | x | x | x | x | +----------+----------+----------+----------+----------+ (*) Only available on I/O Interface (IOIF) MCU 11.2) Get MCU Information with openOCD % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make info #CMT---> Info: Document mcu_info =========================== IPMC - OTP area information =========================== OpenOCD server: localhost MCU ID: 0x193c PCB version: v2.2 Serial Number: 34 --------------------------- =========================== IOIF - OTP area information =========================== OpenOCD server: localhost MCU ID: 0x101f PCB version: v2.2 Serial Number: 34 MAC address: 00:22:8f:02:40:22 IP address: 192.168.0.178 --------------------------- NOTE: IP address is read from system SRAM. The IP address is valid and displayed if an Ethernet module is present. If IP address is no yet assigned by DHCP then '0.0.0.0' will be displayed. 11.3) About MAC-48 address The most significant 39 bits of MAC address are the fixed part which contains the OUI/LAPP identifier and the less significant 9 bits are used to assign (i.e. in hexadecimal) the serial number of IPMC mezzanine (i.e. S/N [1-511]). E.g.: IPMC Mezzanine #34 +----+----+----+-----------+-----------+-----------+ | 00 | 22 | 8F | 02 | 40 | 22 | |====|====|====|===========|===========|===========| | O U I | 0000 0010 | 0100 0000 | 0010 0010 | +----+----+----+-----------+-----------+-----------+ <---- CNRS ----><-------- LAPP -----><---- S/N ----> XII) Firmware upgrade over Ethernet 12.1) Hardware implementation The CPLD device and external CONFIGURATION Flash memory (2 MB) are the hardware implementation for the firmware upgrade. The Flash memory is organized as 4 blocks, each contains 500 KB (see below). 12.1.1) Flash memory usage 0x001FFFFF +------------------------+ | | | IOIF | | Factory firmware image | 0x00180000 |________________________| | | | IOIF | | Firmware image | 0x00100000 |________________________| | | | IPMC | | Factory firmware image | 0x00080000 |________________________| | | | IPMC | | Firmware image | | | 0x00000000 +------------------------+ 12.1.2) CPLD firmware 12.1.2.1) Download boot_CPLD_V5_2.svf 12.1.2.1.1) From LAPP twiki page Please, follow the web link below: http://lappwiki.in2p3.fr/twiki/bin/view/AtlasLapp/Informatique 12.1.2.1.2) From UNIX terminal % cd /contrib/openocd-0.9.0/bin[-x64] % wget -O boot_CPLD_V5_2.svf "https://lapp-owncloud.in2p3.fr/public.php?service=files&t=dfbf866acb823e2fc6a6904509ea41d8&download" 12.1.2.2) Update CPLD firmware % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % make cpld_update -------------------------------------------------------- svf processing file: "boot_CPLD_V5_2.svf" adapter speed: 6000 kHz Time used: 0m27s267ms svf file programmed successfully for 21814 commands Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... -------------------------------------------------------- 12.2) Firmware implementation The firmware upgrade module implementation consists of TCP/IP server on top of LwIP stack. The fwu utility (TCP/IP client) allow to upload raw binary file without authentication. 12.2.1) Operation overview When the server receives data packets it starts to erase external CONFIGURATION Flash sectors then the command (i.e. bootloader protocol) and data are written into this external Flash memory. At the end, the server signals to the CPLD device to activate and to communicate with bootloader stored in the internal boot ROM memory (system memory) of STM32F4xx device. Once the firmware image has been loaded into the STM32F4xx’s internal Flash memory from the defined base address, the MCU is being reset by the CPLD. NOTE: The upgrade action takes approximately 20 seconds. In case of failure the CPLD device periodically attempt 3 times to reload the firmware image. If this action fails, the CPLD loads the FACTORY firmware image and resets the MCU. 12.3) IP address setting By default the DHCP mode is enabled. To configure DHCP server, please read "DCHP server configuration" document. The IP address is set as dynamic address, assigned by a DHCP server. NOTE: If the application does not find a DHCP server on the network to which it is already connected, the IP address is then automatically set to the static address (192.168.0.10) define in <...>/lwip/v1.4.0/port/STM32F4x7/Standalone/ethernetif.h. 12.4) Download/Upgrage firmware image with fwu utility usage: fwu [-uFh] -t -n [-p ] [-f ] -u Upgrade firmware image. -F Factory firmware image. -h Display this help. -t Specifies the MCU target (IPMC or IOIF). -n Specifies the remote (server) host. -P Specifies the port to connect to on the remote host (default: 5555). -f Specifies firmware image. 12.4.1) Example: Downloading binary to MCU targets 12.4.1.1) Downloading bmc_IPMC.bin to 'IPMC' master MCU target % source /ICARE/releases/ICARE-00-03-01/admin/cmt/setup.[c]sh % cd ///cmt % source setup.sh % fwu -t IPMC -n 192.168.0.178 -f ../arm-gcc47-dbg/bmc_IPMC.bin +------------------------------------------------------+ | ___ ___ _ ___ ___ | | |_ _/ __| /_\ | _ \ __| | | | | (__ / _ \| / _| | | |___\___/_/ \_\_|_\___| | | | | Intelligent plateform management Controller softwARE | | | | Firmware upgrade utility. | | Copyrigth (c) 2014-2015 LAPP/CNRS. | | | +------------------------------------------------------+ Host : 192.168.0.178 Port : 5555 Target MCU : IPMC Upgrade MCU: NO Firmware Upgrade image : ../arm-gcc47-dbg/bmc_IPMC.bin (246.3KB) Firmware image checksum: ba96a6d2 Downloading image 'bmc_IPMC.bin' ...OK Download rate: 22.8KB/s 00:10.788 Programming CONFIGURATION flash memory ...OK Programming 252208 bytes in CONFIGURATION flash memory successful. 12.4.1.2) Downloading bmc_IOIF.bin to 'IOIF' slave MCU target % fwu -t IOIF -n 192.168.0.178 -f ../arm-gcc47-dbg/bmc_IOIF.bin +------------------------------------------------------+ | ___ ___ _ ___ ___ | | |_ _/ __| /_\ | _ \ __| | | | | (__ / _ \| / _| | | |___\___/_/ \_\_|_\___| | | | | Intelligent plateform management Controller softwARE | | | | Firmware upgrade utility. | | Copyrigth (c) 2014-2015 LAPP/CNRS. | | | +------------------------------------------------------+ Host : 192.168.0.178 Port : 5555 Target MCU : IOIF Upgrade MCU: NO Firmware Upgrade image : ../arm-gcc47-dbg/bmc_IOIF.bin (198.4KB) Firmware image checksum: f15f0569 Downloading image 'bmc_IOIF.bin' ...OK Download rate: 21.8KB/s 00:09.088 Programming CONFIGURATION flash memory ...OK Programming 203192 bytes in CONFIGURATION flash memory successful. 12.4.2) Example: Upgrade MCU targets ===================================================== CAUTION: The 'IOIF' slave MCU must be upgraded FIRST. ===================================================== 12.4.2.1) Upgrade 'IOIF' slave MCU target % fwu -t IOIF -n 192.168.0.178 -u +------------------------------------------------------+ | ___ ___ _ ___ ___ | | |_ _/ __| /_\ | _ \ __| | | | | (__ / _ \| / _| | | |___\___/_/ \_\_|_\___| | | | | Intelligent plateform management Controller softwARE | | | | Firmware upgrade utility. | | Copyrigth (c) 2014-2015 LAPP/CNRS. | | | +------------------------------------------------------+ Host : 192.168.0.178 Port : 5555 Target MCU : IOIF Upgrade MCU: YES Send update command ...OK Performing upgrade stage (take approximately 20 seconds). 12.4.2.2) Upgrade 'IPMC' master MCU target % fwu -t IPMC -n 192.168.0.178 -u +------------------------------------------------------+ | ___ ___ _ ___ ___ | | |_ _/ __| /_\ | _ \ __| | | | | (__ / _ \| / _| | | |___\___/_/ \_\_|_\___| | | | | Intelligent plateform management Controller softwARE | | | | Firmware upgrade utility. | | Copyrigth (c) 2014-2015 LAPP/CNRS. | | | +------------------------------------------------------+ Host : 192.168.0.178 Port : 5555 Target MCU : IPMC Upgrade MCU: YES Send update command ...OK Performing upgrade stage (take approximately 20 seconds). XIII) OEM commands The IPMC supports additional IPMI commands that are specific to ICARE. This section provides detailed descriptions of those extensions: +-------------------------------------------------------+ | Command | NetFn | CMD | | | (Request/Response) | | |----------------------------|--------------------|-----| | Get MCU Information | 2Eh/2Fh | 01h | |----------------------------|--------------------|-----| | Get Version Information | 2Eh/2Fh | 02h | |----------------------------|--------------------|-----| | Get Use Package Count | 2Eh/2Fh | 03h | |----------------------------|--------------------|-----| | Get Use Package Name | 2Eh/2Fh | 04h | |----------------------------|--------------------|-----| | Get Use Package Version | 2Eh/2Fh | 05h | |----------------------------|--------------------|-----| | Get Binary Name | 2Eh/2Fh | 06h | |----------------------------|--------------------|-----| | Get IP Configuration | 2Eh/2Fh | 07h | |----------------------------|--------------------|-----| | Get Internet Service Count | 2Eh/2Fh | 08h | |----------------------------|--------------------|-----| | Get Internet Service | 2Eh/2Fh | 09h | |----------------------------|--------------------|-----| | Reset IPMC | 2Eh/2Fh | 0Ah | |----------------------------|--------------------|-----| | Hang IPMC | 2Eh/2Fh | 0Bh | |----------------------------|--------------------|-----| | Get MCU Uptime | 2Eh/2Fh | 0Ch | +-------------------------------------------------------+ 13.1) Get MCU Information The Get MCU Information comnmand is used to retrive information stored in OTP area (i.e. PROM) +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:6 | MCU Identifier | | | | LSB Byte first: | | | | 9C13h = IPMC (139Ch) | | | | 1F10h = IOIF (101Fh) | |---------------|-------|-------------------------------------------| | | 7:10 | PCB version | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 11:14 | Serial Number | | | | LSB Byte first | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 1 2e a1 0 0 ... Response data: 2E A1 00 3C 19 02 00 02 00 24 00 00 00 13.2) Get Version Information The Get Version Information command is used to gets version about ICARE and Firmware application. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5 | Release Major Version | |---------------|-------|-------------------------------------------| | | 6 | Release Minor Version | |---------------|-------|-------------------------------------------| | | 7 | Release Patch Version | |---------------|-------|-------------------------------------------| | | 8 | Compiler Major Version | |---------------|-------|-------------------------------------------| | | 9 | Compiler Minor Version | |---------------|-------|-------------------------------------------| | | 10 | Compiler Patch Version | |---------------|-------|-------------------------------------------| | | 11 | Compiler Option | | | | 00h = Opt (with Optimization flag) | | | | 01h = Dbg (with debugging flag) | |---------------|-------|-------------------------------------------| | | 12 | Build Date (Day) | |---------------|-------|-------------------------------------------| | | 13 | Build Date (Month) | |---------------|-------|-------------------------------------------| | | 14 | Build Date (Year) | |---------------|-------|-------------------------------------------| | | 15 | Build Time (Hour) | |---------------|-------|-------------------------------------------| | | 16 | Build Time (Minute) | |---------------|-------|-------------------------------------------| | | 17 | Build Time (Second) | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 2 2e a1 0 0 ... Response data: 2E A1 00 00 01 00 04 07 00 01 1B 0C 10 12 39 18 13.3) Get Use Package Count The Get Use Package Count command allows to return the number of 'use package' entries. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5 | Number of 'use package' entries | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 3 2e a1 0 0 ... Response data: 2E A1 00 23 13.4) Get Use Package Name The Get Use Package Name command is used to gets name of package according to an index. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |---------------|-------|-------------------------------------------| | | 5 | Index of 'use package' entry | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:26 | Name of package | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 4 2e a1 0 0 0 ... Response data: 2E A1 00 72 65 73 6F 75 72 63 65 42 72 6F 6B 65 72 00 00 00 00 00 00 00 00 13.5) Get Use Package Version The Get Use Package Version command is used to gets version of package according to an index. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |---------------|-------|-------------------------------------------| | | 5 | Index of 'use package' entry | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:26 | Version of package | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 5 2e a1 0 0 0 ... Response data: 2E A1 00 76 30 72 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13.6) Get Binary Name The Get Binary Name command is used to gets the binary image name. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:26 | Binary image name | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 6 2e a1 0 1 ... Response data: 2E A1 00 62 6D 63 5F 49 4F 49 46 2E 62 69 6E 00 00 00 00 00 00 00 00 00 00 13.7) Get IP Configuration The Get IP Configuration command allows to gets IP configuration parameters. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:10 | MAC address | | | | The most significant 39 bits of MAC | | | | address are the fixed part which | | | | contains the OUI/LAPP identifier. | | | | | | | | OUI/LAPP = 00:22:8f:02:40 | | | | | | | | The less significant 9 bits are used to | | | | assign (i.e. in hexadecimal) the serial | | | | number of IPMC mezzanine | | | | (i.e. S/N [1-511]). | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 11:14 | IPv4 Address | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 15:18 | Subnet Mask | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 19:22 | Gateway | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 23 | Link Status | | | | 00h = Down | | | | 01h = Up | |---------------|-------|-------------------------------------------| | | 24 | Duplex Mode | | | | 00h = Half | | | | 01h = Full | |---------------|-------|-------------------------------------------| | | 25 | Link Speed | | | | 10 or 100 Mbps | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 7 2e a1 0 ... Response data: 2E A1 00 00 22 8F 02 40 94 86 9E 62 A1 FF FF FC 00 86 9E 60 01 01 01 64 13.8) Get Internet Service Count The Get Internet Service Count command allows to return the number of 'Internet Service' entries. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5 | Number of 'Internet Service' entries | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 8 2e a1 0 ... Response data: 2E A1 00 01 13.9) Get Internet Service The Get Internet Service command is used to gets internet service information according to an index. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | Index of 'Internet Service' entry | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:17 | Internet Service Name | |---------------|-------|-------------------------------------------| | | 18 | Protocol | | | | 00h = TCP | | | | 01h = UDP | |---------------|-------|-------------------------------------------| | | 19 | Port Number LSB | |---------------|-------|-------------------------------------------| | | 20 | Port Number MSB | |---------------|-------|-------------------------------------------| | | 21:24 | Client IPv4 Address | | | | LSB Byte first | |---------------|-------|-------------------------------------------| | | 25 | Client Port Number LSB | |---------------|-------|-------------------------------------------| | | 26 | Client Port Number MSB | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e 9 2e a1 0 0 ... Response data: 2E A1 00 46 2F 57 20 55 70 67 72 61 64 65 00 00 00 B3 15 00 00 00 00 00 00 13.10) Reset IPMC The Reset IPMC command allows to reset the IPMC/IOIF MCU. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e a 2e a1 0 0 ... Response data: 0x0 (0) 13.11) Hang IPMC The IPMC/IOIF MCU provides a way to test the watchdog timer support by implementing the Hang IPMC command, which simulates firmware hanging by entering an endless loop. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e b 2e a1 0 0 ... Response data: 0x0 (0) 13.12) Get MCU Uptime The Get MCU Uptime comnmand is used to retrieve how long ICARE has been running. +-------------------------------------------------------------------+ | Type | Byte | Data field | |---------------|-------|-------------------------------------------| | Request Data | 1:3 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 1 = 2E, byte 2 = A1, | | | | byte 3 = 00 | |---------------|-------|-------------------------------------------| | | 4 | MCU Type | | | | 00h IPMC MCU | | | | 01h IOIF MCU | |===================================================================| | Response Data | 1 | Completion Code | |---------------|-------|-------------------------------------------| | | 2:4 | IN2P3 IANA Private Enterprise ID | | | | 00A12Eh = 41262 (ICARE) | | | | LSB Byte first: byte 2 = 2E, byte 3 = A1, | | | | byte 4 = 00 | |---------------|-------|-------------------------------------------| | | 5:8 | Uptime in seconds | | | | LSB Byte first | +-------------------------------------------------------------------+ E.g. from Shelf Manager command-line: # clia sendcmd
2e c 2e a1 0 0 ... Response data: 2E A1 00 7A 2A 01 00