-
Notifications
You must be signed in to change notification settings - Fork 1k
malloc hooks #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @rayozzie Basically, I2C buffer allocation should be called the first time to allocate the 32 bytes buffer. It will be called again only if length is higher to 32. malloc()/free() are used for new/delete (new.cpp) Maybe your code could be added to STM32 FreeRTOS instead? |
fpistm
added a commit
to fpistm/Arduino_Core_STM32
that referenced
this issue
Oct 4, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
fpistm
added a commit
to fpistm/Arduino_Core_STM32
that referenced
this issue
Oct 4, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
fpistm
added a commit
to fpistm/Arduino_Core_STM32
that referenced
this issue
Oct 4, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
fpistm
added a commit
to fpistm/Arduino_Core_STM32
that referenced
this issue
Oct 10, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
fpistm
added a commit
to fpistm/Arduino_Core_STM32
that referenced
this issue
Oct 15, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
xC0000005
pushed a commit
to xC0000005/Arduino_Core_STM32
that referenced
this issue
Nov 27, 2018
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
benwaffle
pushed a commit
to benwaffle/Arduino_Core_STM32
that referenced
this issue
Apr 10, 2019
Minimum stack size is defined in linker script: _Min_Stack_Size = 0x400;; /* required amount of stack */ If more stack is requested, then user have to ensure that heap and stack can fit in the SRAM. Fix stm32duino#307 Signed-off-by: Frederic.Pillon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am trying to make progress in porting an esp32 arduino sketch to use stm32duino.
In the short term, my progress was impeded by a freertos memory management Issue stm32duino/STM32FreeRTOS#8.
As a temporary workaround because malloc()/realloc() were failing quite badly, I changed my sketch to use heap_4.c along with a statically-allocated memory buffer.
This worked quite well with one exception: my I2C I/O was failing.
After debugging it, I found that the i2c core driver was doing malloc/realloc() for its buffer management.
This is problematic for two reasons:
As a workaround, I added the code below to my sketch. I would suggest that the correct workaround, however, is to do something so that the STM32 FreeRTOS code can hook all core allocator requests and reroute them through its own appropriate per-port allocator.
The text was updated successfully, but these errors were encountered: