JFlashARM, flashing Freescale Kinetis data flash region

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • JFlashARM, flashing Freescale Kinetis data flash region

    Some Kinetis chips have separate program flash and data flash regions. I made my linker script and code to store some stuff in the data flash region. The resulting ihex contains data for both regions in one file. When I attempt to use JFlashARM to write the ihex, it gives me an error "ERROR: Program (0x10000000 - 0x10001E5B) does not fit into selected flash sectors."

    How can I force JFlashARM into writing this second region? Do I need a second custom jflash file with a custom flash address definition? Ideally I would like to write both regions in one step.

    Thanks

    edit:

    I have tried editing my .jflash file

    Source Code

    1. [FLASH]
    2. NumBanks = 2
    3. [FLASH0]
    4. aSectorSel[96] = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
    5. AutoDetect = 0
    6. BankName = ""
    7. BankSelMode = 1
    8. BaseAddr = 0x00000000
    9. CheckId = 0
    10. CustomRAMCode = ""
    11. DeviceName = "MK10DX64xxx Program Flash"
    12. EndBank = 95
    13. OrgNumBits = 32
    14. OrgNumChips = 1
    15. StartBank = 0
    16. UseCustomRAMCode = 0
    17. [FLASH1]
    18. aSectorSel[32] = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
    19. AutoDetect = 0
    20. BankName = ""
    21. BankSelMode = 1
    22. BaseAddr = 0x10000000
    23. CheckId = 0
    24. CustomRAMCode = ""
    25. DeviceName = "Data Flash"
    26. EndBank = 31
    27. OrgNumBits = 32
    28. OrgNumChips = 1
    29. StartBank = 0
    30. UseCustomRAMCode = 0
    Display All


    but that gave me a error "Read CFI info: unsupported flash type / bus width (10113200), please contact info@segger.com Failed to read CFI info Failed to connect Could not auto program target, not connected"

    The post was edited 2 times, last by frank26080115 ().

  • Hi,

    What Kinetis device (exact device name) do you use?
    In general programming of the data flash region is supported and much easier to achieve than you are trying to do it. :)


    Best regards
    Alex
    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: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Alex

    I am trying to support all of these

    MK10DX64
    MK20DX64
    MK10DX128
    MK20DX128
    MK10DX256
    MK20DX256
    MK10DN64
    MK20DN64
    MK10DN128
    MK20DN128
    MK10DN256
    MK20DN256

    but lets start with

    MK10DX64

    also I am using GCC 4.7.2 and no IDE, I can see that your original jflash file simply extends the flash boundary by a bit but that will not work since the data flash and program flash are not continuous
  • Sorry, I should specify a bit further, apparently there are big differences between MK10DX64xxx7 and MK10DX64xxx5

    I am using MK10DX64xxx7

    I have successfully written the bootloader for it, but J-Flash is still unable to program or even read back in the range beyond 0x10000000. I still require assistance.