[SOLVED] JLinkExe flashing PSoC CY8C4247 gives error

  • Hello,
    Trying to flash a Cypress PSoC CY8C4247 device using J-Link. Everything seems to work but I always get an error message when doing loadfile:


    However, after resetting, the system seems to start up just fine. It doesn't matter if I decrease the speed, it always gives the error like above.

    What may cause this error message?

    Thanks, Jacob

  • Hi Jacob,


    thanks for your inquiry.
    Could please provide us with the following information?:

    - Which OS do you use? (macOS / Linux)
    - Which J-Link model do you use? Can you please provide the S/N?
    - Which version of the J-Link software do you use?
    - Does this issue also occur with the most recent version of the J-Link software & documentation pack?


    Best regards,
    Niklas

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hello,
    Linux
    J-Link EDU, S/N 269402077
    SEGGER J-Link Commander V6.14c
    Yes.


    Also, I sometimes get this:

    Code
    Downloading file [program.hex]...
    Comparing flash   [100%] Done.
    Erasing flash     [100%] Done.
    Programming flash [100%] Done.
    Verifying flash   [100%] Done.
    J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
    J-Link: Flash download: Skip optimizations disabled for second try.
    Writing target memory failed.

    Your forum messes up newlines in code..!



    Downloading file [program.hex]...
    Comparing flash [100%] Done.
    Erasing flash [100%] Done.
    Programming flash [100%] Done.
    Verifying flash [100%] Done.
    J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
    J-Link: Flash download: Skip optimizations disabled for second try.
    Writing target memory failed.

    Thanks, Jacob

    Edited 3 times, last by wifijacob (April 6, 2017 at 3:07 PM).

  • Hi Jacob,


    the forum software does not work well with \n line endings in code tags, it needs \r\n .
    It will fix your post accordingly.
    Could you please provide us with a J-Link logfile of a session?

    https://wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File


    Best regards,
    Niklas

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi Jacob,


    the "Writing target memory failed." output is caused by write to memory which is called after the flash programming:

    C
    TF12C5700 021:031 JLINK_WriteMem(0x90400000, 0x0040 Bytes, ...) - Data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... -- CPU_WriteMem(64 bytes @ 0x90400000)  returns 0xFFFFFFFF (1519ms, 1900ms total)


    Does your data file contain data for the address 0x90400000 and / or 0x90300000?

    Best regards,
    Niklas

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • The documentation states:

  • Hi Jacob,


    the data file you provide to "loadfile" must only contain the data to be programmed by J-Link.
    Both Checksum and Flash Protection are not memory mapped at these addresses, the Cypress Tools (?) just know what they should represent.

    Stripping everything higher then 0x8000 from the hex file before programming will resolve the issue.

    Best regards,
    Niklas

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi Jacob,


    thanks for the update.
    /Closed

    Best regards,
    Niklas

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!