I am developing with platformio on eclipse with following configuration
platform = ststm32
framework = mbed
board = nucleo_f401re
In my project i am using RTC functions with clock backed up by a battery so that time is remembered after power off. It seems like stm mbed has problems in such case (refer to the last text on this page How to enable Nucleo's internal lowspeed crystal？ - Question | Mbed).
…STM mbed code all reset the RTC upon initializing the RTC the first time in a program…
This causes the RTC to not be remembered and start from the beginning.
The solution to that is following fix Nucleo_RTC_battery_bkup_pwr_off_okay - In the past, you need modify rtc_api.c in mbed-de… | Mbed.
I can confirm that the fix works since i tested it with the mbed online compiler. The problem is that for the fix to work one should depend on mbed-dev (mbed-dev - mbed library sources. Supersedes mbed-src. | Mbed) which supersedes mbed-src and needs to delete the file rtc_api.c and replace it with (in my case) rtc_api_F4xx.c.
The problem is i do not know how to achieve this with platformio.
- How can i use mbed-dev with platformio, or is this version of mbed already used?
EDIT: as per following links
Access to the target folders of the mbed library - Question | Mbed
Out of date? - Question | Mbed
MBED-SRC is not updated after updating the MBED compiled library. - Question | Mbed
How do I find "all" MBED library sources. - Question | Mbed
i can see that the mbed-dev (and not anymore the mbed-src) is the official source against which the mbed library is build, so i think platformio is already using this version. Hence the only opened question is now the second question beneath.
- How to replace the file and build with the updated version?