DA14531 CLI Flashing

Hi there,

I have few question about flashing binary file into DA14531.

1) when I am  executing (.\SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd write -offset 0x0000 -file "image_14.bin" -max 0x400000 -firmware "jtag_programmer.bin") this command, It is asking the below question, but flashing is happening fine. Can anyone tell me the meaning of bootable here? 

Do you want SPI Flash memory to be bootable? ([Y / N]?)
N

2) when I am trying to erase the DA14531 flash using (.\SmartSnippetsToolbox.exe -type spi -chip DA14531-01 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify) this command, I am getting Failed configuring SPI ports and pins. Can anyone tell me how to resolve this erase issue?

Launching SmartSnippets Toolbox v5.0.24.4128
Loaded the following properties from C:\Users\vigneshv\SmartSnippetsToolbox\properties.txt
{ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, ENABLE_MP=true, ENABLE_TE=true}
Command line arguments:
-type spi -chip DA14531-01 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase
Found SW-DP with ID 0x0BC11477
DPIDR: 0x0BC11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
BTLE device selected.
Using default max memory size: 0x00200000 bytes.
Using default baudrate: 115200 Bd.
Failed configuring SPI ports and pins.
Started erasing all memory.
SPI Flash memory erasing failed.

  • Hi Nothing,

    Thank you for posting your question online.

    1) when I am  executing (.\SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd write -offset 0x0000 -file "image_14.bin" -max 0x400000 -firmware "jtag_programmer.bin") this command, It is asking the below question, but flashing is happening fine. Can anyone tell me the meaning of bootable here? 

    Do you want SPI Flash memory to be bootable? ([Y / N]?)
    N

    It has to do if you are going to add another FW image for SUOTA.
    It is the same when you try via SmartSnippets Toolbox:

    If you are not going to perform SUOTA you should select the Bootable option as Yes.


    2) when I am trying to erase the DA14531 flash using (.\SmartSnippetsToolbox.exe -type spi -chip DA14531-01 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify) this command, I am getting Failed configuring SPI ports and pins. Can anyone tell me how to resolve this erase issue?

    I believe you got this from the 8. CLI implementation — UM-B-083

    On the example it is for the DA14531-01 which is a variant of the DA14531. Please try to use DA14531.

    Best Regards,
    OV_renesas

  • Hi  ,

    If you are not going to perform SUOTA you should select the Bootable option as Yes.

    I should perform SUOTA also, but I am flashing final .bin(fw1.img & fw2.img & secondary_bootloader.hex) file that I got from SmartsnippetToolBox UI through this CLI tool. will it possible?

    I have checked with (./SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify) command, But still I can't able to erase, Is this command having any issue?

  • Hi Nothing,

    Thank you for the reply.

    I should perform SUOTA also, but I am flashing final .bin(fw1.img & fw2.img & secondary_bootloader.hex) file that I got from SmartsnippetToolBox UI through this CLI tool. will it possible?

    Yes, it will be possible.

    I have checked with (./SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify) command, But still I can't able to erase, Is this command having any issue?

    I tested it on my side with DA14531MOD and the Dev Kit pro and it works:

    C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.26>SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify
    Launching SmartSnippets Toolbox v5.0.26.4228
    Loaded the following properties from C:\Users\ovasinio\SmartSnippetsToolbox\properties.txt
    {Enable_FlashCode_NVParams=true, Enable_FlashCode_ProductHeaderBackup=true, Enable_FlashCode_ConfigurationScript=true, ENABLE_PART=true, Enable_FlashCode_FirmwareImage1=true, ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, Enable_FlashCode_FirmwareImage2=true, Enable_FlashCode_ProductHeader=true, ENABLE_MP=true, ENABLE_TE=true}
    Command line arguments:
    -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -verify
    No JTAG with serial number 483052626 could be found.
    Using default max memory size: 0x00200000 bytes.
    Using default baudrate: 115200 Bd.
    Device "DA14531" selected.
    Found SW-DP with ID 0x0BC11477
    DPIDR: 0x0BC11477
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x04770031)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    Successfully configured SPI ports and pins.
    Started erasing all memory.
    SPI Flash memory erasing completed successfully.
    Reading memory to verify its contents after erase...
    Error: Offset plus length is bigger than memory size (131072 bytes)
    Failed reading memory.


    As you can see from the logs, the erase operation was successful but it could not perform the verify because I did not set an offset. When I set the offset, the verify was successful as well.
    C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.26>SmartSnippetsToolbox.exe -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -offset 0x2000 -verify
    Launching SmartSnippets Toolbox v5.0.26.4228
    Loaded the following properties from C:\Users\ovasinio\SmartSnippetsToolbox\properties.txt
    {Enable_FlashCode_NVParams=true, Enable_FlashCode_ProductHeaderBackup=true, Enable_FlashCode_ConfigurationScript=true, ENABLE_PART=true, Enable_FlashCode_FirmwareImage1=true, ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, Enable_FlashCode_FirmwareImage2=true, Enable_FlashCode_ProductHeader=true, ENABLE_MP=true, ENABLE_TE=true}
    Command line arguments:
    -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 483052626 -cmd erase -offset 0x2000 -verify
    No JTAG with serial number 483052626 could be found.
    Using default max memory size: 0x00200000 bytes.
    Using default baudrate: 115200 Bd.
    Started erasing 1 sectors starting from address 0x2000.
    Device "DA14531" selected.
    Found SW-DP with ID 0x0BC11477
    DPIDR: 0x0BC11477
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x04770031)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    Successfully configured SPI ports and pins.
    Started erasing from 0x2000 to 0x3000 (2 sectors)
    Memory erasing completed successfully.
    SPI Flash memory erasing completed successfully.
    Reading memory to verify its contents after erase...
    Read 4096 bytes from offset 0x2000
    Verification succeeded. 4096 bytes read for verification.
    

    Which SmartSnippets Toolbox version are you working with?

    Best Regards,
    OV_Renesas