I take a nano project, try to port from 2.9.5 to 3.3.8. but the RTC api I try to call are undefined.
RTCSetSystemFromRTCTime()
RTCSetRTCfromSystemTime()
how can I fix it?
RTC api undefine upgrade to 3.x
Re: RTC api undefine upgrade to 3.x
I just did a quick search of the header files and see RTCSetSystemFromRTCTime in rtc.h. Are you including that in your project?
-
- Posts: 89
- Joined: Fri Oct 09, 2020 2:57 pm
Re: RTC api undefine upgrade to 3.x
Yes I did. i've created a demo project to call the functions. undefined reference to the api also. However the errors are related to config_obj.h in line 1070. I look up that line of code in the file, there's not even a single RTC api function in the header file. I guess my machine is acting up. see the build log for more details.
Code: Select all
#include <predef.h>
#include <stdio.h>
#include <nbrtos.h>
#include <http.h>
#include <init.h>
#include <netinterface.h>
#include <rtc.h>
const char * AppName="demo";
void UserMain(void * pd)
{
init();
GetInterfaceBlock()->discovery_server = "discover.netburner.com";
WaitForActiveNetwork(TICKS_PER_SECOND * 5); // Wait up to 5 seconds for active network activity
StartHttp();
iprintf("Application %s started\n",AppName );
while (1)
{
RTCSetSystemFromRTCTime();
RTCSetRTCfromSystemTime();
OSTimeDly(TICKS_PER_SECOND);
}
}
Re: RTC api undefine upgrade to 3.x
When you did the port, did you create a new, empty project and import only the source code files? You want to avoid importing any eclipse project files from the old release.
There are a lot of examples that use that function. Can you try a new project and build this one:
\nburn\examples\_common\MultiPlatform\RTC-OnChip
There are a lot of examples that use that function. Can you try a new project and build this one:
\nburn\examples\_common\MultiPlatform\RTC-OnChip
Re: RTC api undefine upgrade to 3.x
To get temporarily unstuck while we figure this out...
Might also try
#include <mcf5441x_rtc.h)
int MCF541X_RTCSetTime(struct tm &bts);
int MCF541X_RTCSetSystemFromRTCTime(void);
int MCF541X_RTCSetRTCfromSystemTime(void);
What you did should have worked...
Might also try
#include <mcf5441x_rtc.h)
int MCF541X_RTCSetTime(struct tm &bts);
int MCF541X_RTCSetSystemFromRTCTime(void);
int MCF541X_RTCSetRTCfromSystemTime(void);
What you did should have worked...
-
- Posts: 89
- Joined: Fri Oct 09, 2020 2:57 pm
Re: RTC api undefine upgrade to 3.x
the example build successfully. Thanks Paul. Do you see the same issue in your end? I was about to reinstall the nndk.
Re: RTC api undefine upgrade to 3.x
Hey Reboot,
No need to do a reinstall. Going from 2.x to 3.x we realized the external RTC driver varied by customer, so we took it out of the system libs. You can find the function in effs_time.cpp of any example that uses this function. Please check in the examples folder for effs_time.cpp and let me know if yu can't find it.
No need to do a reinstall. Going from 2.x to 3.x we realized the external RTC driver varied by customer, so we took it out of the system libs. You can find the function in effs_time.cpp of any example that uses this function. Please check in the examples folder for effs_time.cpp and let me know if yu can't find it.