[Ovmsdev] Javascript

Michael Balzer dexter at expeedo.de
Sun Dec 23 07:05:26 HKT 2018


Steve…

> OVMS# vfs cat /store/scripts/helloworld.js
> OvmsPrint("Hello world!\n*”*);

…is that closing quote really a typographic one? If so, try replacing that by a straight one.

Regards,
Michael


Am 22.12.18 um 23:50 schrieb Stephen Casner:
> Well, I have tried several stages of rebuilding, but I still get an
> immediate crash from duktape.
>
> First I updated sources for ovms and esp-idf (the previous pull was
> October 29).  Still crashed.
>
> Then I changed from RELEASE to DEBUG to be like sdkconfig.default.hw31
> but that failed to link because I still had bluetooth configured so
> there was not enough space in IRAM, so I removed bluetooth and made
> clean.  Still crashed.
>
> Then I backed off to straight sdkconfig.default.hw31, though the make
> procedure then added some more defaults that should be checked in.
> Still crashed.
>
> The most obvious question is whether there is something wrong with my
> javascript file so that duktape is legitimately considering it in
> error, but the source looks clean:
>
> OVMS# vfs cat /store/scripts/helloworld.js
> OvmsPrint("Hello world!\n”);
> OVMS#
>
> I don't have any other ideas yet.
>
>                                                         -- Steve
>
> On Sat, 22 Dec 2018, Stephen Casner wrote:
>
>> Michael,
>>
>> I used the same sequence of commands that you did.  The only
>> difference is that I did not capitalize World and I did include an
>> exclamation point after it (since I did copy/paste from Mark's
>> message).
>>
>> Maybe it is an insufficient free memory problem.  But I just tried
>> again via an ssh console with this starting condition:
>>
>> Free 8-bit 91352/230700, 32-bit 1236/3144, SPIRAM 4032872/4194252
>>
>> That should be sufficient.
>>
>> Attached is a diff of sdkconfig.default.hw31 to my sdkconfig.  The
>> only thing I noticed that might be an explanation is the optimization
>> level set to RELEASE vs DEBUG.
>>
>>                                                         -- Steve
>>
>> On Sat, 22 Dec 2018, Michael Balzer wrote:
>>
>>> Steve,
>>>
>>> I just tried this:
>>>
>>> OVMS# vfs append 'OvmsPrint("Hello World\n");' /store/scripts/helloworld.js
>>> OVMS# vfs cat /store/scripts/helloworld.js
>>> OvmsPrint("Hello World\n");
>>> OVMS# . helloworld.js
>>> Hello World
>>> OVMS#
>>>
>>> So no, the blank line isn't necessary.
>>>
>>> Regards,
>>> Michael
>>>
>>>
>>> Am 22.12.18 um 09:14 schrieb Stephen Casner:
>>>> Mark,
>>>>
>>>> There is a blank line at the end of your script that I don't have.
>>>> Perhaps that is required for javascript?  I'll try that soon.  On the
>>>> other hand, crashing when the input format isn't as desired is not the
>>>> best error handling approach.
>>>>
>>>> I do have some deviations from sdkconfig.default.hw31, but not in the
>>>> spec for the duktape library.
>>>>
>>>>                                                         -- Steve
>>>>
>>>> On Sat, 22 Dec 2018, Mark Webb-Johnson wrote:
>>>>
>>>>> Steve,
>>>>>
>>>>> I get this:
>>>>>
>>>>> OVMS# vfs cat /sd/helloworld.js
>>>>> OvmsPrint("Hello world\n");
>>>>>
>>>>> OVMS# . /sd/helloworld.js
>>>>> Hello world
>>>>>
>>>>> Maybe your SDKCONFIG different than mine? I am using the sdkconfig.default.hw31.
>>>>>
>>>>> Regards, Mark.
>>>>>
>>>>> _______________________________________________
>>>>> OvmsDev mailing list
>>>>> OvmsDev at lists.openvehicles.com
>>>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181223/e0af47ce/attachment.htm>


More information about the OvmsDev mailing list