cancel
Showing results for 
Search instead for 
Did you mean: 

is there any example of using mbedtls and stm32f746g-discovery board?

Jinlong Shen
Associate II
Posted on March 04, 2018 at 11:18

I tried to transplant the mbedtls ssl server code for stm32f769i discovery board to stm32f746g discovery board. The error was printed on to the lcd. I.E. the headers are changed and the BSP is changed. 

The error is found to be from mbedtls_mpi_grow(), from inside of which mbedtls_calloc (which in my case is calloc) returns NULL, so that screen message is:

mbedtls_pk_parse_key_returned -16912.

Is there any example of using mbedTLS with stm32f746G-discovery board?

#mbedtls-stm32f746g-discovery
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on March 04, 2018 at 16:14

If calloc() throws a NULL consider if your heap allocation is sufficient. In Keil builds the heap is described in stm32f7xx_startup.s

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2
Posted on March 04, 2018 at 16:14

If calloc() throws a NULL consider if your heap allocation is sufficient. In Keil builds the heap is described in stm32f7xx_startup.s

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 04, 2018 at 19:42

Hi Clive One, after many years, I am glad to see you again in the forum. Respect.  

Yes, your answer is correct. I was modifying the linker script to increase heap size. However, another linker script file is used by the compiler instead. 

The example now works. However, Chrome does not trust the certificate.