from niietcm4.c:941
static const struct command_registration niietcm4_exec_command_handlers[] = {
{
.name = "uflash_read_byte",
.handler = niietcm4_handle_uflash_read_byte_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('main'|'info') address",
.help = "Read byte from main or info userflash region",
},
{
.name = "uflash_write_byte",
.handler = niietcm4_handle_uflash_write_byte_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('main'|'info') address value",
.help = "Write byte to main or info userflash region",
},
{
.name = "uflash_full_erase",
.handler = niietcm4_handle_uflash_full_erase_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Erase all userflash including info region",
},
{
.name = "uflash_erase",
.handler = niietcm4_handle_uflash_erase_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('main'|'info') first_sector_num last_sector_num",
.help = "Erase sectors of main or info userflash region, starting at sector first up to and including last.",
},
{
.name = "uflash_protect_check",
.handler = niietcm4_handle_uflash_protect_check_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('main'|'info')",
.help = "Check sectors protect.",
},
{
.name = "uflash_protect",
.handler = niietcm4_handle_uflash_protect_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('main'|'info') first_sector_num last_sector_num ('on'|'off')",
.help = "Protect sectors of main or info userflash region, starting at sector first up to and including last.",
},
{
.name = "bflash_info_remap",
.handler = niietcm4_handle_bflash_info_remap_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('on'|'off')",
.help = "Enable remapping bootflash info region to 0x00000000 (or 0x40000000 if external memory boot used).",
},
{
.name = "extmem_cfg",
.handler = niietcm4_handle_extmem_cfg_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('gpioa'|'gpiob'|'gpioc'|'gpiod'|'gpioe'|'gpiof'|'gpiog'|'gpioh') pin_num ('func1'|'func3')",
.help = "Configure external memory interface for boot.",
},
{
.name = "extmem_boot",
.handler = niietcm4_handle_extmem_boot_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('on'|'off')",
.help = "Enable boot from external memory.",
},
{
.name = "service_mode_erase",
.handler = niietcm4_handle_service_mode_erase_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Perform emergency erase of all flash (bootflash and userflash).",
},
{
.name = "driver_info",
.handler = niietcm4_handle_driver_info_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Show information about flash driver.",
},
COMMAND_REGISTRATION_DONE
};