A problem of ram and big file

20 Apr 2019

Hello, I use the STM32F446. For my project, I need to read a big json file wich contains around 500,000 caracters. I've did a malloc, but it failed. It's normal because I need 500,000 bytes in memory and the STM32F446 has only 128kb.

So my question is what can I do to solve this problem. I need to place external ram ?

Thank you in advance Simon

12 Nov 2019

The only way is to divide your file in to several peaces, load each part to the mem as needed and put it back after you have processed it. You have the same thing using normal computer .. you cannot load big files in to memory as whole..

google for some code that explain how it works.