SQLITE Porting on FreeRTOS with STM32

classic Classic list List threaded Threaded
2 messages Options
Wei
Reply | Threaded
Open this post in threaded view
|

SQLITE Porting on FreeRTOS with STM32

Wei
I want to port on stm32 with sqlite.
But I get the followings:
.\RTOSDemo.axf: Error: L6218E: Undefined symbol sqlite3_os_end (referred from sqlite3.o).
.\RTOSDemo.axf: Error: L6218E: Undefined symbol sqlite3_os_init (referred from sqlite3.o).


1.download the latest sqlite3(3.24.0),copy sqlite3.c and sqlite3.h to my project.
2.added the sqlite3.c file to the project. Obviously, sqlite3.h has to be there too. Had to add three defines (SQLITE_THREADSAFE=0 SQLITE_OS_OTHER=1 SQLITE_OMIT_WAL=1) to make it compile
3.However I change the defines, I can't compile through.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLITE Porting on FreeRTOS with STM32

Richard Hipp-3
On 8/13/18, Wei <[hidden email]> wrote:
> I want to port on stm32 with sqlite.
> But I get the followings:
> .\RTOSDemo.axf: Error: L6218E: Undefined symbol sqlite3_os_end (referred
> from sqlite3.o).
> .\RTOSDemo.axf: Error: L6218E: Undefined symbol sqlite3_os_init (referred
> from sqlite3.o).

The sqlite3_os_init() routine is called by SQLite to initialize the
default VFSes for your system.  sqlite3_os_end()  undoes the
initialization.  If you use SQLITE_OS_OTHER, then you need to supply
these two routines.  If your VFS has no initialization requirements,
you can simply create stub routines that return without doing
anything.

See the source code for how these routines are implemented for Unix and Windows.

>
>
> 1.download the latest sqlite3(3.24.0),copy sqlite3.c and sqlite3.h to my
> project.
> 2.added the sqlite3.c file to the project. Obviously, sqlite3.h has to be
> there too. Had to add three defines (SQLITE_THREADSAFE=0 SQLITE_OS_OTHER=1
> SQLITE_OMIT_WAL=1) to make it compile
> 3.However I change the defines, I can't compile through.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users