raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.63k stars 902 forks source link

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

Open AndrewCapon opened 1 month ago

AndrewCapon commented 1 month 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 1 month ago

not currently

AndrewCapon commented 1 month ago

Thanks for the info.

sfe-SparkFro commented 3 weeks 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 3 weeks ago

Thanks for the info.

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