[SOLVED] open flash loader ERROR :Algo error: EraseSector algo function has not been implemented No valid device has been selected.

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

  • [SOLVED] open flash loader ERROR :Algo error: EraseSector algo function has not been implemented No valid device has been selected.

    hi
    I want to use ambiq programming spi flash,I get .elf by SES.

    but there is a problem:

    Source Code

    1. Type "connect" to establish a target connection, '?' for help
    2. J-Link>connect
    3. Please specify device / core. <Default>: AMA3B1KK-KBR
    4. Type '?' for selection dialog
    5. Device>?
    6. Please specify target interface:
    7. J) JTAG (Default)
    8. S) SWD
    9. T) cJTAG
    10. TIF>S
    11. Specify target interface speed [kHz]. <Default>: 4000 kHz
    12. Speed>
    13. ****** Error: Error while loading flash algo ELF file: C:\Program Files (x86)\SEGGER\JLink_V644d\Devices/AmbiqMicro/AmbiqMicro_Apollo3_spi.elf
    14. No valid device has been selected.
    15. J-Link>
    Display All

    JLinkDevices.xml:

    Source Code

    1. <Device>
    2. <ChipInfo Vendor="AmbiqMicro" Name="SPIFlashLoader" WorkRAMAddr="0x10000000" WorkRAMSize="0x60000" Core="JLINK_CORE_CORTEX_M4" />
    3. <FlashBankInfo Name="SPI Flash" BaseAddr="0x00000000" MaxSize="0x800000" Loader="Devices/AmbiqMicro/AmbiqMicro_Apollo3_spi.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    4. </Device>
    help,please!
    Bluetooth + NORDIC + SES
  • hi

    Open_Flashloader has a template projects OpenFlashloader_CortexM_Template_EmbeddedStudio.zip,
    but it has an issue:

    it can not include standard libraries
    ==============
    I compile project and it has a problem when I add my code into project

    I modify Placement_release.xml below then compile ok and I can get .elf!

    Source Code

    1. <!DOCTYPE Linker_Placement_File>
    2. <Root name="RAM Section Placement">
    3. <MemorySegment name="RAM">
    4. <ProgramSection alignment="4" load="Yes" name="PrgCode" keep="Yes"/>
    5. <ProgramSection alignment="4" load="Yes" name="PrgData" keep="Yes" inputsections="*(PrgData PrgData.* .data .data.*)"/>
    6. <ProgramSection alignment="4" load="Yes" name="DevDscr" keep="Yes"/>
    7. </MemorySegment>
    8. </Root>
    ==============
    I put *.elf into C:\Program Files (x86)\SEGGER\JLink_V644d\Devices\AmbiqMicro

    =============
    I changed JLinkDevices.xml at C:\Program Files (x86)\SEGGER\JLink_V644d

    =============
    I want to use jlink.exe to connect,but "****** Error: Algo error: EraseSector algo function has not been implemented No valid device has been selected."

    help,please!
    thanks!
    Bluetooth + NORDIC + SES
  • Hello,

    Thank you for your inquiry.
    Please do not bump your threads with meaningless posts. Keep in mind, this is not a support forum. If you are in valid support period please contact our official support channel. See my signature for more information.

    Generally support is not provided for open flashloader but we can give general tips. Alternatively we can create the flash loader for you, in that case NREs would apply.
    Would that be of interest for you?

    What target device are you writing the flash loader for?
    Is that target device already supported by J-Link?
    From your screenshots it seems that you are trying to write a QSPI flash loader for an Apollo3 device from Ambiq. Is that correct?
    If yes make sure that when creating a new entry in the JlinkDevices.xml all target specific connect, reset, init etc. steps that are not ARM standard need to be done e.g. via a JLinkScript file.

    As you can see in the entry for the AMA3B1KK-KBR there is a JLinkScript specified that takes care of some target specific initialization.
    If you are looking to add QSPI support to e.g. that device simply expand the existing entry with your new flash bank.
    This could look as follows:

    Source Code

    1. <Device>
    2. <ChipInfo Vendor="AmbiqMicro" Name="AMA3B1KK-KBR" Core="JLINK_CORE_CORTEX_M4" JLinkScriptFile="Devices/AmbiqMicro/AmbiqMicro_Apollo3.pex" />
    3. <FlashBankInfo Name="QSPI Flash" BaseAddr="0x00000000" MaxSize="0x00800000" Loader="Devices/AmbiqMicro/example.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    4. </Device>
    However we do not recommend using BaseAddr 0x0 as this would effectively overwrite the Flash mapping of the internal Flash of the Apollo3 which would render that Flash unusable in your configuration.
    The external SPI space is at 0x04000000 according to the Apollo3 manual.

    All other questions are answered in the open Flash loader Wiki article.
    wiki.segger.com/Open_Flashloader#Open_Flashloader

    Best regards,
    Nino
    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.