Minimal config can be now build with:
./make-minimal BOARD=...
This is required because of Makefile.exports magic, which in its turn depends
on PROJ_CONF to be set correctly at the beginning of Makefile parsing at all
times. Instead of adding more and more workarounds for that, it's better to
just move minimal support to a separate wrapper.
Also, remove Zephyr 1.5 era cruft from Makefile, and add support for Zephyr's
"run" target which supercedes older "qemu" target in upstream.
This is a typical problem with make: we want to trigger rebuilds only
if file actually changed, not if its timestamp changed. In this case,
it's aggravated by the fact that prj.conf depends on the value of
BOARD variable, so we need to do some tricks anyway. We still don't
try to detect if just BOARD changed, just try to generate new
prj.conf.tmp every time (quick), but do actual replacement of prj.conf
only if its content changed.
Mostly intended to ease experimentation, no particular plans for APIs
so far (far less their stability), is_preempt_thread() provided is
mostly an example.
This is required to avoid extra level of output "cooking" ("\r\r\n") and
make test infrastructure work. On the other hand, this breaks somewhat
Zephyr console abstraction.
The integration with Zephyr is fairly clean but as MicroPython Hardware API
requires pin ID to be a single value, but Zephyr operates GPIO in terms of
ports and pins, not just pins, a "hierarchical" ID is required, using tuple
of (port, pin). Port is a string, effectively a device name of a GPIO port,
per Zephyr conventions these are "GPIO_0", "GPIO_1", etc.; pin is integer
number of pin with the port (supposed to be in range 0-31).
Example of pin initialization:
pin = Pin(("GPIO_1", 21), Pin.OUT)
(an LED on FRDM-K64F's Port B, Pin 21).
There is support for in/out pins and pull up/pull down but currently
there is no interrupt support.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This provides time and sleep together with the usual ticks_us/_ms/_diff
and sleep_us/ms family.
We also provide access to Zephyr's high precision timer as ticks_cpu().
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
The boot issue text mentions a help() function and encourages
the user to run it. It is very disconcerting to find that the
function does not exist...
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>