tve
Posts: 9
Joined: Sun Oct 18, 2015 8:25 pm

Espruino on emw3165 first steps

Thu Oct 22, 2015 7:01 am

This past week-end I managed to get Espruino to show some signs of life on an emw3165 using WICED. The approach I took is to compile Espruino against the WICED header files using the arm-none-eabi toolchain that ships with WICED and to link it all into a .o file. I then compiled a stub "main" snip in WICED and linked the Espruino .o file in.
The issue I'm now facing is who owns the devices. Right now I'm having WICED do its normal I/O init so I see its console output, but I really want to switch that around so WICED only deals with the Wifi stuff and nothing else. Not sure how to accomplish that yet...
Also... I wonder whether it's at all feasible to rip freertos out of WICED (or use WICED without FreeRTOS). Not sure whether that makes any sense, though. I know that LwIP needs some task support...
More detailed Espruino-related info is in this thread: http://forum.espruino.com/conversations/276160

ChrisWireUP
Posts: 1
Joined: Thu Oct 22, 2015 9:51 am

Re: Espruino on emw3165 first steps

Thu Oct 22, 2015 9:54 am

Hi TVE,

Having JS on a WiFi enabled device is my dream come true as it enables me to build many genuine IOT devices.

I plead and encourage you to contine on this path.

Chris
WireUp.io

tve
Posts: 9
Joined: Sun Oct 18, 2015 8:25 pm

Re: Espruino on emw3165 first steps

Thu Oct 22, 2015 9:40 pm

Thanks for the encouragement. We do have an Espruino port running on the esp8266. It's still in beta and a bit rough around the edges, but it does work. I will be continuing on the emw3165 because the esp8266 ends up having too little memory and the I/O devices are sub-standard.

User avatar
emilfr
Posts: 63
Joined: Wed Jul 22, 2015 10:05 pm
Location: Iceland
Contact: Website

Re: Espruino on emw3165 first steps

Fri Oct 23, 2015 5:27 am

It's doubtful you can easily use the wireless stack without some kind task switching and interrupt management.
Doing it yourself is reinventing the wheel.

That being said, I know absolutely nothing about Espruino or the architecture around it. Can't you run it as a WICED app?
Maintainer of the EMW3162 and EMW3165 port of Broadcom WICED.
== Github == Gitter.im chatroom == WICED subforum == Getting started with WICED on EMW ==

-- Neither I nor the WICED for EMW project are affiliated with MXCHIP or Broadcom --

User avatar
emilfr
Posts: 63
Joined: Wed Jul 22, 2015 10:05 pm
Location: Iceland
Contact: Website

Re: Espruino on emw3165 first steps

Fri Oct 23, 2015 5:56 am

I just glanced through the thread you linked on the Espruino forums and through the Espruino stm32 source.

I think you really mostly need to edit the platform configuration to override the IRQ handlers in the platform definition, except for the ones used by SDIO and I believe FreeRTOS needs systick for preemption.

Nb. didn't look very thoroughly, so I might have missed important bits, but I hope this little bit of insight helps.
Maintainer of the EMW3162 and EMW3165 port of Broadcom WICED.
== Github == Gitter.im chatroom == WICED subforum == Getting started with WICED on EMW ==

-- Neither I nor the WICED for EMW project are affiliated with MXCHIP or Broadcom --

tve
Posts: 9
Joined: Sun Oct 18, 2015 8:25 pm

Re: Espruino on emw3165 first steps

Fri Oct 23, 2015 6:03 am

Sure does help, thanks for taking the time to look!


Return to “Espruino”

Who is online

Users browsing this forum: No registered users and 1 guest