Skip to content

Overwrite _sbrk() to support external SRAM #1819

@ccli8

Description

@ccli8

Hi,
I am porting mbed classic to Nuvoton's Nu-mbed-NUC472 board. There is external SRAM on this board. To locate heap on the external SRAM, I need to overwrite _sbrk(). But I meet 'multiply defined' error on GCC_ARM target. The _sbrk() implementation in retarget.cpp cannot meet my requirement (heap and stack are not contiguous in my case). Could _sbrk() in retarget.cpp declare to be weak to overwrite for like my case?
https://github.com/mbedmicro/mbed/blob/master/hal/common/retarget.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions