Skip to content

Commit

Permalink
Update the documentation to add the ipmitool upgrade instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavosr8 committed Jul 3, 2023
1 parent 0095b14 commit 34de589
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,21 @@ Now, you have to upload the bootloader, since the old bootloader is incompatible

./bin/hpm-downloader --ignore-component-check --ip <MCH_IP_address> --slot <slots_to_be_updated> --component 0 <path_to_newboot.bin>

It's also important to mention that you can use the `--help` command in case of doubt about how to use the HPM commands. Run
It's also important to mention that you can use the `--help` command in case of doubt about how to use the HPM commands. Run

./bin/hpm-downloader --help

### ipmitool
After [this commit](https://github.com/lnls-dig/openMMC/commit/563185791c8b51ea026680c98ec0ea9587ea645b), it's possible to program the firmware and the bootloader through [ipmitool](https://codeberg.org/IPMITool/ipmitool). (Before this commit, you have to use HPM-Downloader)). Inorder to use it, you have to install the ipmitoll, and then generate .hpm files from `OpenMMC.bin` and `newboot.bin`. You can do this with [bin2hpm](https://github.com/MicroTCA-Tech-Lab/bin2hpm) (Note: after [this commit](https://github.com/lnls-dig/openMMC/commit/563185791c8b51ea026680c98ec0ea9587ea645b), the Makefile will auto generate the .hpm files if you have bin2hpm installed in the path).
After generate the files, you cans use tge following commands to program the MMC microcontroller.
To upgrade the firmware, use

ipmitool -I lan -H host_name_mch -A none -T 0x82 -m 0x20 -t (112 + num_slot*2 in hexadecimal) hpm upgrade openMMC.hpm

To upgrade the bootloader, use

ipmitool -I lan -H host_name_mch -A none -T 0x82 -m 0x20 -t (112 + num_slot*2 in hexadecimal) hpm upgrade newboot.hpm

## Debugging
It is possible to debug the MMC firmware using OpenOCD and GDB. First, connect OpenOCD with the debug probe using the `out/openocd.cfg` file generated by cmake in the build directory:

Expand All @@ -100,7 +111,7 @@ Then open GDB:
$ arm-none-eabi-gdb out/openMMC.axf
(gdb) target remote localhost:3333

Now you can use the typical GDB commands to inspect the program flow and variables. Some useful commands when interacting with a microcontroller trough OpenOCD are listed below:
Now you can use the typical GDB commands to inspect the program flow and variables. Some useful commands when interacting with a microcontroller trough OpenOCD are listed below:

(gdb) monitor reset halt # Resets the microcontroller and immediately halts
(gdb) monitor reset run # Resets the microcontroller and starts executing
Expand Down

0 comments on commit 34de589

Please sign in to comment.