raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.74k stars 929 forks source link

Question: PSRAM, is there a way of setting this up as a separate heap? #1815

Open AndrewCapon opened 2 months ago

AndrewCapon commented 2 months ago

Hi Guys,

I have a Pimoroni Pico Plus 2 here, and I have the PSRAM mapped and working

I have had a look through the sdk docs and I am not sure how to set this memory up as some form of secondary heap, is there anything built into the sdk for doing this?

Many thanks

Andy

kilograham commented 2 months ago

not currently

AndrewCapon commented 2 months ago

Thanks for the info.

sfe-SparkFro commented 2 months ago

We at SparkFun have a working solution here, in case that helps: https://github.com/sparkfun/sparkfun-pico?tab=readme-ov-file#replacing-the-integrated-memory-allocator-routines

AndrewCapon commented 2 months ago

Thanks for the info.

I ended up knocking a c++ wrapper up: https://github.com/AndrewCapon/PicoPlusPsram