flash/nor/nrf5: check protection before flash erase/write on nRF51
[fw/openocd] / src / flash / nor / xcf.c
index ded5e5e34429d6552f66115cd3d9b77375915599..29eef2dc3371790fd25857d13f77b17ff67f6858 100644 (file)
@@ -624,7 +624,7 @@ static int xcf_probe(struct flash_bank *bank)
                        bank->num_sectors = 4;
                        break;
                default:
-                       LOG_ERROR("Unknown flash device ID 0x%X", id);
+                       LOG_ERROR("Unknown flash device ID 0x%" PRIX32, id);
                        return ERROR_FAIL;
        }
 
@@ -640,7 +640,7 @@ static int xcf_probe(struct flash_bank *bank)
        bank->driver_priv = priv;
 
        LOG_INFO("product name: %s", product_name(bank));
-       LOG_INFO("device id = 0x%X ", bank->target->tap->idcode);
+       LOG_INFO("device id = 0x%" PRIX32, bank->target->tap->idcode);
        LOG_INFO("flash size = %d configuration bits",
                bank->num_sectors * XCF_DATA_SECTOR_SIZE * 8);
        LOG_INFO("number of sectors = %u", bank->num_sectors);