Re: [sqlite] Using SQLite3 on On-Time RTOS ...

2009-07-01 Thread Kent Dahl
ma., 27.04.2009 kl. 14.58 +0200, skrev Kent Dahl:
> We've been giving the SQLite 3.6.10 amalgamation source code for Windows
> a try against RTOS 5.14 and it compiled out of the box. However, we ran
> into some linker and run-time errors. After a fair amount of
> experimenting, we got it up and running, but only towards an in-memory
> database. We still have problems opening existing or creating database
> files.
[...]
> Finally we had something that linked and ran, but only towards in-memory
> database. When we tried to open an existing database (or create a new
> one) using the sqlite3_open_v2 API, it kept returning SQLITE_NOMEM(7).
> When I tried debugging this, I got as far as the sqlite3BtreeFactory
> call, but because of the breakpointing problems I didn't get much
> further.

Unfortunately, work priorities shifted so I didn't have much time to dig
futher into the disk problems. 

In the off chance that someone else might find this useful, I'm
including the patches I had so far when I stopped investigating. These
are towards the 3.6.10 amalagamation source and are not too clean, but
might save someone else trying SQLite3 on On-Time RTOS a little time
getting started...

Please let me (and the list) know if anyone has any further progress.

-- 
Mvh/Regards,

Kent Dahl
Software Developer

Industrial Control Design AS



Phone: +47 93 07 32 30

Breivika Industriveg 63
N-6018 Ålesund
Norway

k...@icd.no

www.icd.no


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the System Manager i...@icd.no and
delete the material from any computer.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using SQLite3 on On-Time RTOS ...

2009-04-28 Thread Sylvain Pointeau
.. or you can pay for a support ?

On Mon, Apr 27, 2009 at 3:31 PM, Virgilio Alexandre Fornazin <
virgilioforna...@gmail.com> wrote:

> Maybe RTOS kernel does not implement Wide-Char functions...
>
> Windows VFS must guard them with a SQLITE_WINDOWS_NO_UNICODE
> macro or something like that at compile time, but you should
> do it yourself... then you can contribute it back to SQLite.
>
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kent Dahl
> Sent: segunda-feira, 27 de abril de 2009 09:58
> To: General Discussion of SQLite Database
> Subject: [sqlite] Using SQLite3 on On-Time RTOS ...
>
> Hi.
>
> I wondered whether anyone is using SQLite3 on the On-Time RTOS platform,
> and if so, if there are any patches or tips to help others along?
>
> We've been giving the SQLite 3.6.10 amalgamation source code for Windows
> a try against RTOS 5.14 and it compiled out of the box. However, we ran
> into some linker and run-time errors. After a fair amount of
> experimenting, we got it up and running, but only towards an in-memory
> database. We still have problems opening existing or creating database
> files.
>
> I'll outline what we ran into and what we've tried so far.
>
> The linker errors were primarily towards wide char APIs that didn't
> exist on RTOS. Most of these could easily be ifdef'd away. There was
> alternate Win95/98/ME code we could trigger if we changed "isNT" to 0,
> which helped a bit. Some, like AreFileApisANSI we just defined to 1.
>
> We then ran into a crasher caused by convertUtf8Filename returning NULL,
> so we changed that to use a fallback. Just strdup-ing the input string
> if the conversion failed. Debugging this took a little while, because
> using the amalgamation source meant that the RTOS compiler crossed a 64k
> symbols limit, meaning breakpoints and backtraces broke badly.
>
> Finally we had something that linked and ran, but only towards in-memory
> database. When we tried to open an existing database (or create a new
> one) using the sqlite3_open_v2 API, it kept returning SQLITE_NOMEM(7).
> When I tried debugging this, I got as far as the sqlite3BtreeFactory
> call, but because of the breakpointing problems I didn't get much
> further.
>
> So, my questions then are:
> * Is anyone using or have used SQLite3 on RTOS?
> * Are the older Win95/98/ME code paths still actively used, tested and
> found to be working? (Or should I expect a few inches of legacy dust and
> bugs in them?)
> * Is there a good way to get more debug information? (SQLITE_DEBUG seems
> more targetted at debugging SQL statements.)
> * Am I barking up any of the wrong trees?
>
> Hope someone out there has some ideas or pointers to help me get
> motivated enough to give another stab at it. :)
>
>
> = Additional information =
>
> === Linker errors ===
>
> Example linker error:
> "Error: DLL dependency in CDP.EXE: KERNEL32.dll.DeleteFileW"
>
> These APIs also gave linker errors:
> - LockFileEx
> - GetTempPathW
> - GetFullPathNameW
> - GetDiskFreeSpaceW
> - AreFileApisANSI
>
> === References ===
>
> * On-Time RTOS - http://www.on-time.com/
>
>
> --
> Mvh/Regards,
>
> Kent Dahl
> Software Developer
>
> Industrial Control Design AS
>
>
>
> Phone: +47 93 07 32 30
>
> Breivika Industriveg 63
> N-6018 Ålesund
> Norway
>
> k...@icd.no
>
> www.icd.no
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. If you
> received this in error, please contact the System Manager i...@icd.no and
> delete the material from any computer.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using SQLite3 on On-Time RTOS ...

2009-04-27 Thread Virgilio Alexandre Fornazin
Maybe RTOS kernel does not implement Wide-Char functions... 

Windows VFS must guard them with a SQLITE_WINDOWS_NO_UNICODE 
macro or something like that at compile time, but you should
do it yourself... then you can contribute it back to SQLite.


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kent Dahl
Sent: segunda-feira, 27 de abril de 2009 09:58
To: General Discussion of SQLite Database
Subject: [sqlite] Using SQLite3 on On-Time RTOS ...

Hi.

I wondered whether anyone is using SQLite3 on the On-Time RTOS platform,
and if so, if there are any patches or tips to help others along?

We've been giving the SQLite 3.6.10 amalgamation source code for Windows
a try against RTOS 5.14 and it compiled out of the box. However, we ran
into some linker and run-time errors. After a fair amount of
experimenting, we got it up and running, but only towards an in-memory
database. We still have problems opening existing or creating database
files.

I'll outline what we ran into and what we've tried so far.

The linker errors were primarily towards wide char APIs that didn't
exist on RTOS. Most of these could easily be ifdef'd away. There was
alternate Win95/98/ME code we could trigger if we changed "isNT" to 0,
which helped a bit. Some, like AreFileApisANSI we just defined to 1.

We then ran into a crasher caused by convertUtf8Filename returning NULL,
so we changed that to use a fallback. Just strdup-ing the input string
if the conversion failed. Debugging this took a little while, because
using the amalgamation source meant that the RTOS compiler crossed a 64k
symbols limit, meaning breakpoints and backtraces broke badly.

Finally we had something that linked and ran, but only towards in-memory
database. When we tried to open an existing database (or create a new
one) using the sqlite3_open_v2 API, it kept returning SQLITE_NOMEM(7).
When I tried debugging this, I got as far as the sqlite3BtreeFactory
call, but because of the breakpointing problems I didn't get much
further.

So, my questions then are:
* Is anyone using or have used SQLite3 on RTOS?
* Are the older Win95/98/ME code paths still actively used, tested and
found to be working? (Or should I expect a few inches of legacy dust and
bugs in them?)
* Is there a good way to get more debug information? (SQLITE_DEBUG seems
more targetted at debugging SQL statements.)
* Am I barking up any of the wrong trees?

Hope someone out there has some ideas or pointers to help me get
motivated enough to give another stab at it. :)


= Additional information =

=== Linker errors ===

Example linker error:
"Error: DLL dependency in CDP.EXE: KERNEL32.dll.DeleteFileW"

These APIs also gave linker errors:
- LockFileEx 
- GetTempPathW 
- GetFullPathNameW 
- GetDiskFreeSpaceW 
- AreFileApisANSI 

=== References ===

* On-Time RTOS - http://www.on-time.com/


-- 
Mvh/Regards,

Kent Dahl
Software Developer

Industrial Control Design AS



Phone: +47 93 07 32 30

Breivika Industriveg 63
N-6018 Ålesund
Norway

k...@icd.no

www.icd.no


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the System Manager i...@icd.no and
delete the material from any computer.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users