Giter VIP home page Giter VIP logo

Comments (5)

acassis avatar acassis commented on August 23, 2024

@laoniaokkk please share your .config

from nuttx-apps.

laoniaokkk avatar laoniaokkk commented on August 23, 2024

config.txt

@acassis Hello,this is my .config, I just use 'sim/nsh' and select database as:
[ * ] SQLITE library
(3.45.1) SQLITE version
[ * ] SQLite cmd line tool
(8192) SQLite3 cmd line tool stack size

from nuttx-apps.

acassis avatar acassis commented on August 23, 2024

Thank you @laoniaokkk ! Using your config I got the same issue. Seems like HOST_ARM64 is not supported yet.

Then I decided to change it to HOST_X86_64 and got some errors and fixed them.

However the SQLite didn't work when I run "nsh> sqlite3". Please find the files I modified to get it compiling.

@yinshengkai @xiaoxiang781216 I appreciate if you guys could include an example using the SIM or better yet some real board.

config_sim_sqlite.txt
Makefile.txt
sqlite3.c.txt

from nuttx-apps.

xiaoxiang781216 avatar xiaoxiang781216 commented on August 23, 2024

@Gary-Hobson will provide patch soon.

from nuttx-apps.

Gary-Hobson avatar Gary-Hobson commented on August 23, 2024

Compilation error problems can be solved by adding this patch: apache/nuttx#12303

The following patch adds an example of sqlite in sim: apache/nuttx#12305

Since hostfs does not support FIOC_FILEPATH, it cannot currently be used in hostfs

Steps for usage:

./tools/configure.sh sim:sqlite
make -j 
./nuttx

nsh> cd tmp
nsh> ls
/tmp:

nsh> sqlite3 test.db
SQLite version 3.45.1 2024-01-30 16:01:20
Enter ".help" for usage hints.
sqlite> 

 CREATE TABLE COMPANY(
   ID INT PRIMARY KEY     sqlite> (x1...> NOT NULL,
   NAME           TEXT    NOT NULL,
   AGE            (x1...> (x1...> INT     NOT NULL,
   ADDRESS        CHAR(50),
   SALARY         (x1...> (x1...> REAL
);(x1...> 

sqlite> .schema COMPANY
CREATE TABLE COMPANY(
   ID INT PRIMARY KEY     NOT NULL,
   NAME           TEXT    NOT NULL,
   AGE            INT     NOT NULL,
   ADDRESS        CHAR(50),
   SALARY         REAL
);
sqlite> .quit
sqlite> 
nsh> 
nsh> ls -l
/tmp:
 -rwxrwxrwx       12288 test.db

from nuttx-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.