F746NG Disco SDRAM DataMemory Example not working

Sysprogs forums Forums VisualGDB F746NG Disco SDRAM DataMemory Example not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12750
    zeroaviation
    Participant

    Hi all,

    I am somewhat new to the embedded development are still.

    I am trying to load and run the FMC_SDRAM_DataMemory for the STM32F746NG Disco board.

    When I load the example and run it without any modification, it fails. From what I can tell, the linker script that VisualGDB is using, is not the correct one for this project.

    I tried the “additional memory” option for VisualGDB but that made the situation worse I think.

    Basically, I want to be able to build large arrays (for example char * pChar = new char[4000000]) in the heap using the additional SDRAM. (ultimately I want to do this on the F429 and F746 Disco boards).

    Any help or guidance would be greatly appreciated!

     

    Thanks in advance

     

    #12755
    support
    Keymaster

    Hi,

    We actually have a detailed tutorial showing this: https://visualgdb.com/tutorials/arm/memories/

    Feel free to follow it and let us know if you have any questions.

    #12757
    zeroaviation
    Participant

    Hi,

    Your example is for the QSPI, I am targeting the SDRAM. (See the attached screenshot)

    I tried to modify the linker script (using the STM one as an example) However, VisuaGDB gives me the following “The memory location used for the stack **** is not writable. Please check the selected device type and the link script. You can disable automatic stack checking via VisualGDB Project Properties”

    Thanks!

     

    Attachments:
    You must be logged in to view attached files.
    #12762
    support
    Keymaster

    Hi,

    Sorry for the confusion. Changing the location of the main memory to SDRAM would not work as your firmware would need to use the memory for the stack before it can initialize the SDRAM controller.

    If you want to make the malloc()/free() functions use SDRAM instead of the regular SRAM, please add an implementation of the _sbrk() function similar to the one described in this tutorial: https://visualgdb.com/tutorials/arm/newlib-nano/

    Instead of returning the area between the _end symbol and the stack pointer, change the implementation so that it will return the memory between the start and end of SDRAM.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.