2021-07-12 11:13 PM - last edited on 2023-07-21 01:52 AM by Amel NASRI
Hi. I am using STM32F407VGT6 this one and RadioLink SE100 GPS. I am trying to get $GNGGA data via USART and displaying it in putty terminal. I am able to get and print data. After 3-4 minutes gps sensor led is blinking but no data is printed on terminal.
2021-07-14 08:28 PM
Using strdup causes memory to be allocated which must be freed using free, otherwise you have a memory leak and will run out of available memory. This is likely what is happening.
https://en.cppreference.com/w/c/experimental/dynamic/strdup
Using dynamic memory allocation on a microcontroller should be avoided if possible. You can do everything needed here with static buffer allocations.