tilib: fix DEVICE_ERASE_MAIN.
The address given to the library must be one inside main memory.
This commit is contained in:
parent
c243ed04dc
commit
e6cb2dc51d
|
@ -278,6 +278,9 @@ static int tilib_erase(device_t dev_base, device_erase_type_t type,
|
||||||
{
|
{
|
||||||
struct tilib_device *dev = (struct tilib_device *)dev_base;
|
struct tilib_device *dev = (struct tilib_device *)dev_base;
|
||||||
|
|
||||||
|
if (type == DEVICE_ERASE_MAIN)
|
||||||
|
address = 0xfffe;
|
||||||
|
|
||||||
if (dev->MSP430_Erase(ti_erase_type(type), address, 0) < 0) {
|
if (dev->MSP430_Erase(ti_erase_type(type), address, 0) < 0) {
|
||||||
report_error(dev, "MSP430_Erase");
|
report_error(dev, "MSP430_Erase");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue