LIBMEM QSPI Loader

Comments

8 comments

  • Avatar
    Markus

    Hello Marcelo,

    can you step through your loader-application. You can debug the application like any other code (until you reach the call of libmem_rpc_loader_start). Is this working?

    Is your loader-application loaded to your target? You can check this in the target-log.

    0
    Comment actions Permalink
  • Avatar
    Marcelo Richter

    Yes, in debug I can download and step through loader code. But when I use the loader for another code, loader is downloaded (i can see in log, downloaded and verified), but loader code does not execute. I change an GPIO, but it never happens.

     

    0
    Comment actions Permalink
  • Avatar
    Markus

    After downloading the flash loader it should start automatically.

    Did you use the loader from the STM32 CPU Support Package as base for your loader?

    You can also compare the code of my loader for Intel SoC here: https://github.com/Masmiseim36/IntelSoc/blob/master/targets/IntelSoC/init/loader.cpp. It is a completely different architecture, but the basics of how a loader is working should be the same. 

    0
    Comment actions Permalink
  • Avatar
    Marcelo Richter

    This GPIO change I put before libmem_register_driver. It seems that loader code is downloaded, but not started. As code is downloaded to RAM, I suppose that crosstudio download loader and start executing from "_start". Is this correct?

    0
    Comment actions Permalink
  • Avatar
    Marcelo Richter

    "Did you use the loader from the STM32 CPU Support Package as base for your loader?"

    Yes, I use the same project. But I cant compile original loader in STM32 package. 

    I think it's not a problem with LIBMEM API use, because loader code do not run (main is not called).

    0
    Comment actions Permalink
  • Avatar
    Markus

    „Yes, I use the same project. But I cant compile original loader in STM32 package.”

    Why can’t you compile it, which error do you get?
    I get a warning on each project (@Rowley, could you take a look), but otherwise it seems to be okay.
    I Used the STM32 CPU Support Package in Version 3.40 (2022-09-15) and Crossworks 4.9.1

    “I think it's not a problem with LIBMEM API use, because loader code do not run (main is not called).”
    probably true, could you paste the target-log. when trying to use your loader.

    0
    Comment actions Permalink
  • Avatar
    Marcelo Richter

    I solve the 'main' problem. I compile in another PC and start to working.

    Now I can initialize and register QSPI driver. 

    I'm downloading code for RAM (0x30000000 address) and data for QSPI (0x90000000). My loader need to handle both regions or I can register only a 0x90000000 (QSPI) handler?

    I'm not sure of what to put in project properties "Applicable loaders" and "Default loader". If I put "RAM", my erase/write functions are never called. When I put "Flash", they are called, but not work. I can download only one segment (3xxx or 9xxx).

    0
    Comment actions Permalink
  • Avatar
    Markus

    Happy new year.

    You can register multiple drivers for various memory regions in one loader application.

    One could be for the integrated flash, another one for the external QSPI-Flash and a third one for the RAM area. Each one has its own read/write/erase/… functionality.

    The drivers are identified by the libmem library based on the associated memory area

    0
    Comment actions Permalink

Please sign in to leave a comment.