stellaris.c 27.7 KB
Newer Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
	}
	
	bank = get_flash_bank_by_num(strtoul(args[0], NULL, 0));
	if (!bank)
	{
		command_print(cmd_ctx, "flash bank '#%s' is out of bounds", args[0]);
		return ERROR_OK;
	}
	
1010
	if (stellaris_mass_erase(bank) == ERROR_OK)
1011
	{
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
		/* set all sectors as erased */
		for (i = 0; i < bank->num_sectors; i++)
		{
			bank->sectors[i].is_erased = 1;
		}
		
		command_print(cmd_ctx, "stellaris mass erase complete");
	}
	else
	{
		command_print(cmd_ctx, "stellaris mass erase failed");
1023
1024
1025
1026
	}
	
	return ERROR_OK;
}
For faster browsing, not all history is shown. View entire blame