[ABANDONED] About the J-Link Devices of v7.86h

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

  • [ABANDONED] About the J-Link Devices of v7.86h

    Is the Device_XML_file changed?
    Using the sam xml but v7.86h seems to get the wrong partition.=, but v7.8 is expected

    Source Code

    1. <Database>
    2. <Device>
    3. <ChipInfo Vendor="Mytest" Name="MyTestDevice" WorkRAMAddr="0x20000000" WorkRAMSize="0x00020000" Core="JLINK_CORE_CORTEX_M33"/>
    4. <FlashBankInfo Name="FL_Test1" BaseAddr="0x00010000" AlwaysPresent="1">
    5. <LoaderInfo Name="FL_Test1" MaxSize="0x00030000" Loader="FL_Test1.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    6. </FlashBankInfo>
    7. <FlashBankInfo Name="FL_Test2" BaseAddr="0x00040000" AlwaysPresent="1">
    8. <LoaderInfo Name="FL_Test2" MaxSize="0x00010000" Loader="FL_Test2.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    9. </FlashBankInfo>
    10. <FlashBankInfo Name="FL_Test3" BaseAddr="0x00200000" AlwaysPresent="1">
    11. <LoaderInfo Name="FL_Test3" MaxSize="0x00100000" Loader="FL_Test3.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    12. </FlashBankInfo>
    13. </Device>
    14. </Database>
    Display All
    Images
    • JLinkDevice_v7.8vsv7.86h.jpg

      227.97 kB, 919×710, viewed 148 times
  • Hi,
    there is no such issue known to us.

    Would it be possible to send us the FL_Test*.FLM files so we can check on our side?
    Could you please send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File

    BR
    Fabian
    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 Fabian,

    I was told that this has been fixed at v7.88. And I've verified the sectorization shows correctly in v7.88.
    But I am confused that if using multi sector size, how to specify start address of the sector size for each sector is correct? Should the offset with base address or not?
    Ony the Ex_3 will be expected as what I want. Thanks.
    Ex_1: Not incldue the base address

    Source Code

    1. #define FL_FLASH_BASE_ADDR 0x10000
    2. #define FL_START_FLASH_ADDR 0x10000
    3. #define FL_FLASH_SIZE 0x80000 // 512 KB
    4. #define FLASH_PAGE_SIZE 0x1000 // 4096 Bytes
    5. #define SJ_DATA_START_ADDR 0x8F800
    6. struct FlashDevice const FlashDevice __attribute__((section("DevDscr"))) = {
    7. 0x0101, // Algo Driver Version, do not modify
    8. DEVICE_NAME,
    9. 1, // Device Type, Set to 1 to get max. compatibility
    10. FL_FLASH_BASE_ADDR,
    11. FL_FLASH_SIZE,
    12. FLASH_PAGE_SIZE,
    13. 0, // Reserved, must be 0
    14. FLASH_ERASED_VAL,
    15. FLASH_TIMEOUT_PROG,
    16. FLASH_TIMEOUT_ERASE,
    17. 0x100, FL_START_FLASH_ADDR - FL_FLASH_BASE_ADDR,
    18. 0x1, SJ_DATA_START_ADDR - FL_FLASH_BASE_ADDR,
    19. 0xFFFFFFFF, 0xFFFFFFFF
    20. };
    Display All


    Ex_2: Both include the base address:



    Source Code

    1. #define FL_FLASH_BASE_ADDR 0x10000
    2. #define FL_START_FLASH_ADDR 0x10000
    3. #define FL_FLASH_SIZE 0x80000 // 512 KB
    4. #define FLASH_PAGE_SIZE 0x1000 // 4096 Bytes
    5. #define SJ_DATA_START_ADDR 0x8F800
    6. struct FlashDevice const FlashDevice __attribute__((section("DevDscr"))) = {
    7. 0x0101, // Algo Driver Version, do not modify
    8. DEVICE_NAME,
    9. 1, // Device Type, Set to 1 to get max. compatibility
    10. FL_FLASH_BASE_ADDR,
    11. FL_FLASH_SIZE,
    12. FLASH_PAGE_SIZE,
    13. 0, // Reserved, must be 0
    14. FLASH_ERASED_VAL,
    15. FLASH_TIMEOUT_PROG,
    16. FLASH_TIMEOUT_ERASE,
    17. 0x100, FL_START_FLASH_ADDR,
    18. 0x1, SJ_DATA_START_ADDR,
    19. 0xFFFFFFFF, 0xFFFFFFFF
    20. };
    Display All


    Ex_3: The First sectors not incldues the base address and the second includes the base address:


    Source Code

    1. #define FL_FLASH_BASE_ADDR 0x10000
    2. #define FL_START_FLASH_ADDR 0x10000
    3. #define FL_FLASH_SIZE 0x80000 // 512 KB
    4. #define FLASH_PAGE_SIZE 0x1000 // 4096 Bytes
    5. #define SJ_DATA_START_ADDR 0x8F800
    6. struct FlashDevice const FlashDevice __attribute__((section("DevDscr"))) = {
    7. 0x0101, // Algo Driver Version, do not modify
    8. DEVICE_NAME,
    9. 1, // Device Type, Set to 1 to get max. compatibility
    10. FL_FLASH_BASE_ADDR,
    11. FL_FLASH_SIZE,
    12. FLASH_PAGE_SIZE,
    13. 0, // Reserved, must be 0
    14. FLASH_ERASED_VAL,
    15. FLASH_TIMEOUT_PROG,
    16. FLASH_TIMEOUT_ERASE,
    17. 0x100, FL_START_FLASH_ADDR - FL_FLASH_BASE_ADDR,
    18. 0x1, SJ_DATA_START_ADDR,
    19. 0xFFFFFFFF, 0xFFFFFFFF
    20. };
    Display All
    Images
    • Ex_1.png

      45.97 kB, 831×566, viewed 76 times
    • Ex_2.png

      107.11 kB, 2,304×1,296, viewed 66 times
    • Ex_3.png

      43.3 kB, 907×560, viewed 72 times
  • Hello,

    Fabian will be out of office for the next weeks, so please allow me to take over.

    Our wiki contains a description that explains the FlashDevice struct ant its SectorInfo array.
    wiki.segger.com/SEGGER_Flash_Loader#FlashDevice_struct

    E.g.:


    // FlashDevice.TotalSize:// 0x40000//// FlashDevice.SectorInfo[]:// {// SectSize StartAddr// { 0x00004000, 0x00000000 }, // 4 * 16 KB = 64 KB// { 0x00010000, 0x00010000 }, // 1 * 64 KB = 64 KB// { 0x00020000, 0x00020000 }, // 1 * 128 KB = 128 KB// { 0xFFFFFFFF, 0xFFFFFFFF } // Indicates the end of the flash sector layout. Must be present.// }

    This SectorInfo array has sectors of size 0x4000 that go from 0x00000000 (relative to the base address of the flash) to 0x00010000. This means that there are four 0x4000 sectors between 0x00000000 and 0x00010000.
    Above 0x00010000 the sector size is 0x10000 and this block of uniform sectors goes from 0x00010000 to 0x00020000. This means that there is one 0x10000 sector between 0x00010000 and 0x00020000.
    Above 0x00020000 the sector size is 0x20000 and this block of uniform sectors goes from 0x00020000 to the end of the flash (in this case 0x00040000). This means that there is one 0x20000 sector between 0x00020000 and 0x00040000.

    I hope this clears it up.

    Best regards,
    Matthias
    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,

    From wiki.segger.com/SEGGER_Flash_Loader#FlashDevice_struct the E.g cannot present this issue that if the base address is no start from 0x00000000.

    // FlashDevice.TotalSize:// 0x40000//// FlashDevice.SectorInfo[]:// {// SectSize StartAddr// { 0x00004000, 0x00000000 }, // 4 * 16 KB = 64 KB// { 0x00010000, 0x00010000 }, // 1 * 64 KB = 64 KB// { 0x00020000, 0x00020000 }, // 1 * 128 KB = 128 KB// { 0xFFFFFFFF, 0xFFFFFFFF } // Indicates the end of the flash sector layout. Must be present.// }

    Take base addess is 0x00010000 for example, the actual address that each size of sectors should be
    sector size 0x4000 should go from 0x00010000 (relative to the base address of the flash) to 0x00020000.
    sector size 0x10000 shoud go from 0x00020000 to 0x00030000.
    sector size 0x10000 shoud go from 0x00030000 to 0x00050000.
    Is my understanding correct?
    If yes, this should be the Ex_1 that I mentioned above. The sectorziation of JFlash seems not expected. Only the Ex_3 could show expectedly.

    Thanks.