Commit Graph

32 Commits (better-build-2)

Author SHA1 Message Date
Daniel Thompson 32d4b1eb0f zephyr: Switch sub-makes to use proper environment variables
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-19 19:21:41 +01:00
Daniel Thompson 08d596dd95 zephyr: Use ?= for BOARD
The main zephyr build system allows BOARD to come from the environment
but the micropython pre-build does not. Fix this.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-19 19:20:48 +01:00
Daniel Thompson d6086be810 zephyr: Support extra make targets
The two variables, GENERIC_TARGETS and CONFIG_TARGETS come, respectively,
from the the lists shown during "make help" and "make kconfig-help".

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-19 19:20:21 +01:00
Daniel Thompson 9af5511d93 zephyr: Honour CONFIG_FP_HARD/SOFTABI build option
Currently micropython cannot be linked on some ARM platforms because
the micropython libraries and the OS code are compiled with different
float ABIs. This can be fixed by honouring the appropriate Kconfig
options.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-19 19:18:02 +01:00
Daniel Thompson d5632b5292 zephyr: Automatically derive ARCH
Currently to compile for anything that except ARCH=x86 we have to
provide ARCH via the environment or make arguments. We can do better
than that!

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2016-09-19 19:17:04 +01:00
Paul Sokolovsky 0ab6e8fbfd zephyr: Add mbedTLS config for the port.
Zephyr appear to include only constrained config, we need more features to
access real-world HTTPS, etc.
2016-09-19 00:43:24 +03:00
Paul Sokolovsky b6934ad68c zephyr: Bump heap size to 24K, as required for umqtt.simple. 2016-09-19 00:43:24 +03:00
Paul Sokolovsky 13d54f0914 zephyr: Enable ustruct module, required for umqtt.simple. 2016-09-19 00:43:24 +03:00
Paul Sokolovsky 668e5bcf41 zephyr/modsocket: socket_write: Send only data fitting in a netbuf. 2016-09-19 00:43:24 +03:00
Paul Sokolovsky 37c7951926 zephyr/modsocket: Detect connection reset in connect().
TODO: Think about connection reset in other places too.
2016-09-19 00:43:24 +03:00
Paul Sokolovsky 814d6e4169 zephyr: Enable frozen modules support. 2016-09-19 00:43:24 +03:00
Paul Sokolovsky 1819653ce9 zephyr: Enable building ussl_mbedtls module.
Using Zephyr's builtin mbedtls.
2016-09-19 00:43:24 +03:00
Paul Sokolovsky c703fd0480 zephyr/prj.conf: Add network debug logging options (commented). 2016-09-19 00:43:23 +03:00
Paul Sokolovsky 7443422093 zephyr/prj.conf: Enable mbedTLS. 2016-09-19 00:43:23 +03:00
Paul Sokolovsky 23ca7e2657 zephyr/modsocket: Add DEBUG_printf() logging. 2016-09-19 00:43:23 +03:00
Paul Sokolovsky e2032582d7 zephyr/modsocket: socket_read: Handle zero-length packets.
Zephyr actually filters these out, and requires patching to let them thru.
And underlying uIP uses them to e.g. communicate changes in connection
state (like peer closed connection). Without this change (and associated
Zephyr patch), socket read requests may hang if peer close happened after
read request was issued.
2016-09-19 00:43:23 +03:00
Paul Sokolovsky dd766368e2 zephyr/modsocket: repr(): Dump even more internal socket info. 2016-09-19 00:43:23 +03:00
Paul Sokolovsky 15845b708c zephyr/modsocket: Implement partial reads/writes. 2016-09-19 00:43:23 +03:00
Paul Sokolovsky 788f6ed2e3 zephyr/modsocket: Initial implementation of stream protocol. 2016-09-19 00:43:23 +03:00
Paul Sokolovsky f2a4d1ad4e zephyr/Makefile: Add qemu-net target to run QEMU virtual networking. 2016-09-19 00:43:22 +03:00
Paul Sokolovsky efed2dd984 zephyr: Enable building of modsocket. 2016-09-19 00:43:22 +03:00
Paul Sokolovsky 316f42bdc1 zephyr/modsocket: Add initial implementation of usocket module. 2016-09-19 00:43:22 +03:00
Paul Sokolovsky 13257a9f11 zephyr: Enable (IPv4) networking support. 2016-09-19 00:43:22 +03:00
Paul Sokolovsky b310abc440 zephyr: Implement smart way to access Zephyr config variables.
For this, we first build Z part with libmicropython.a not existing. This
produces autoconf.h with all setiings, but eventually fails on linking
stage due to missing libmicropython.a. We then build MicroPython, which
now can access values in autoconf.h. Then we execute Z build again, which
now succeeds.
2016-09-19 00:43:22 +03:00
Paul Sokolovsky d01061a198 zephyr/Makefile: Switch to qemu_x86 by default.
As it supports QEMU virtual networking.
2016-09-19 00:43:22 +03:00
Paul Sokolovsky bb7fd43b04 zephyr: Switch to microkernel, required for network to work in background. 2016-09-19 00:43:22 +03:00
Paul Sokolovsky 24026ed17b zephyr: Enable stack checking and micropython.mem_info(). 2016-09-19 00:43:22 +03:00
Paul Sokolovsky de2203510e zephyr/prj.conf: Set main thread stack size to 4K.
An interpreted language needs good size of stack to do anything useful
(minimum can be set to a lower value of course).
2016-09-19 00:43:22 +03:00
Paul Sokolovsky b0a95fc00c zephyr: Add README. 2016-09-19 00:43:21 +03:00
Paul Sokolovsky 8004ee68ff zephyr: Add zephyr_getchar module to handle console input.
From https://github.com/pfalcon/zephyr_getchar .
2016-09-19 00:43:21 +03:00
Paul Sokolovsky 217035f23a zephyr: Initial Zephyr RTOS port, Zephyr part. 2016-09-19 00:43:21 +03:00
Paul Sokolovsky bec77172e7 zephyr: Initial Zephyr RTOS port, MicroPython part. 2016-09-19 00:43:21 +03:00