UnQLite Users Forum

PH7 for ARM MCU

append delete sanyaade

Is there a document on how to use PH7 e.g. on Arduino Uno or ARM mcu devices?
Accessing device GPIO or pin-mapping routines examples?
Porting to devices e.g. example?

God blesses!!!

Best regards,
Sanyaade

Reply RSS

Replies

append delete #1. chm

Compilation should be fine for all modern architectures (ARM, x86, etc.). However special functions such as accessing device GIPO should be implemented using the foreign functions mechanism documented here: https://ph7.symisc.net/func_intro.html

append delete #2. sanyaade

Thanks for your reply,

I am looking at the page but it seems there is no standard to follow e.g. like micropython has standard for device family, pin-mapping, folder arrangement, etc... May be I am think loud about future here...

I will have a got and see what works.

God blesses!!!

Best regards,
Sanyaade

append delete #3. sanyaade

Hi,
I have managed to compile PH7 for ARM platform and installed it on Cortex M4 ==> STM32F407VET6 board.

I tried it on ESP8266EX board but without success yet.

I used gcc-arm-none-eabi on my Ubuntu 16.04 Linux box to compile PH7 successfully

Has anybody attempt or have compiled PH7 for ARM who can share their experience and support? Many thanks in advance!

I also made an attempt in porting PH7 to JavaScript using Emscripten when I cam across PH7js but the aim is to use the C platform for now.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

append delete #4. chm

Could you share the compiler output and what error did you hit with when compiling PH7 to ESP8266EX

append delete #5. sanyaade

Hi @chm

Yes! the errors has to do with the followings:

1.) ESP8266Ex is not ARM base plaform

2.) PH7 is to large to fit in ram so must load into flash. This means I must add:-
void ICACHE_FLASH_ATTR to the front of all PH7 functions for them to load into rom during flashing instead of ram (" error: `.text' will not fit in region `iram1_0_seg' )

3.) Since PH7 is a 1 long file amalgamated. It will take me a bit of time as I have to go through it step by step, top-down looking for each function.

4.) I also researching/looking for other framework that will enable to use pure C on ESP8266Ex that I have.

5.) Other options: Use Bluetooth or other WiFi device and do a software serial coding but ESP8266Ex comes with all that already plus 4MB flash and 512k ram.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

append delete #6. Sanyaade

Re: PH7 And The HTTP Protocol

Hi @chm
Hi Everybody,

Does any one knows where I can get the above example PH7 HTTP protocol?

Also anything on using PH7 through web-server over the internet/browser and $GET, $POST, etc...

Please help!

Many thanks!

God blesses!!!

Best regards,
Sanyaade

append delete #7. Sanyaade

Hi @chm
Hi Everybody,

Well after several days, night with my head off and modifications, I finally got PH7 working. It currently working as a customised http, websocket and webserver.

I am looking at rewriting its grammar as and EBNF grammar to make it expandable and more generic since the aim is to bring it more into Embedded platform like ESP8266 family, Raspberry Pi, BeagleBone but also small connected devices like PIC, ARM and other platforms.

The motivation and drive was from PHPoC but I wanted to do something on my own to enhance my software porting skills and wanted more generic framework that I could use. Please see some of the screenshots from initial testing below: Hoops look like I cannot get the images onto here!

Anyway I keep you all update and will soon put up a Github repository for collaboration.

Many thanks!

God blesses!!!

Best regards,
Sanyaade

append delete #8. chm

Great Sanyaade, let us know your progress. We look forward to hear back from you!

append delete #9. sanyaade@gmail.com

Hi @chm,

Its me Sanyaade again, please can you tell me how to get some of the missing examples form PH7 source tree. Some of the important examples like ph7_http are missing and I need it for my porting work on PH7 to ESP8266, Arm Cortext, and Arduino Due. Please help.

I will also try to send email to devel@symisc.net but I believe that you are part of the lead of development team so I may be making a double request here.

Also I will like a copy of the source tree ( non amalgamated ) single files of PH7 both for learning and porting PH7 to Micro-controller platforms. Many thanks!

I am publishing work on PH7 on hackster.io (see: https://www.hackster.io/sanyaade1/php-embedded-php4mcu-2bf22c ). I will be willing to put it on http://ph7.symisc.net/ website as well if this is possible. Many thanks!

Please help!

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: chm_at_symisc, devel_at_symisc