glennrub
f49b202e7d
nrf/hal/rng: Adding HAL driver for accessing RNG peripheral
...
The driver also takes care of calling the Bluetooth LE stack for random values if the stack is enabled. The reason for this is that the Bluetooth LE stack take ownership of the NRF_RNG when enabled. Tolerate to enable/disable on the fly, and will choose to use direct access to the peripheral if Bluetooth LE stack is disabled or not compiled in at all.
Driver has been included in the top Makefile, and will not be compiled in unless nrf51_hal_conf.h/nrf52_hal_conf.h defines HAL_RNG_MODULE_ENABLED (1).
2017-10-04 20:45:40 +02:00
glennrub
8c0bbb983b
nrf/boards: Adding Arduino Primo board support ( #88 )
...
* nrf: Adding Arduino Primo board support
* nrf: Adding arduino_primo to target boards table in readme.md
* nrf/boards: Activating pyb.LED module for arduino_primo board.
* nrf/boards: Removing define not needed for arduino_primo
Updating arduino_primo board mpconfigboard.h. Removing a define
that was wrongly named. Instead of renaming it, it was removed as
it was never used.
2017-10-04 20:44:11 +02:00
Glenn Ruben Bakke
863a5c1734
nrf: Add support for floating point on nrf52 targets.
...
Duplicating pattern for detecting location of libm, libc and libgcc
from teensy port. Activating MICROPY_FLOAT_IMPL (FLOAT) for nrf52 targets
and adding libs into the compile. For nrf51 targets it is still set to
NONE as code grows to much (about 30k).
Some numbers on flash use if MICROPY_FLOAT_IMPL is set to
MICROPY_FLOAT_IMPL_FLOAT and math libraries are enabled (lgcc, lc, lm).
nrf51:
======
without float support:
text data bss dec hex filename
144088 260 30020 174368 2a920 build-pca10028/firmware.elf
with float support:
text data bss dec hex filename
176228 1336 30020 207584 32ae0 build-pca10028/firmware.elf
nrf52:
======
without float support:
text data bss dec hex filename
142040 356 36236 178632 2b9c8 build-pca10040/firmware.elf
with float support:
text data bss dec hex filename
165068 1436 36236 202740 317f4 build-pca10040/firmware.elf
2017-10-04 20:42:27 +02:00
Daniel Tralamazza
785fb6928b
nrf: add a note for running the nrfjprog tool on Linux, and touch up the make sd comment
2017-08-08 18:45:42 +02:00
Daniel Tralamazza
b53b691314
Merge remote-tracking branch 'upstream/master'
2017-08-08 00:45:58 +02:00
Daniel Tralamazza
3e0d3d283d
nrf: clean compiler warnings
2017-08-08 00:43:21 +02:00
Paul Sokolovsky
6c55cdafa3
zephyr/modusocket: socket, close: Switch to native Zephyr socket calls.
2017-08-07 21:41:03 +03:00
Paul Sokolovsky
642d9fd2a5
zephyr/modusocket: Allow to use socketized net_context in upstream.
...
Accesses recv_q, accept_q directly in net_context.
2017-08-07 21:36:57 +03:00
Paul Sokolovsky
4dc7c5649b
py/mkrules.mk: Show frozen modules sizes together with executable size.
...
This works for Unix and similar ports so far.
2017-08-06 15:43:21 +03:00
Glenn Ruben Bakke
c017f2d267
nrf/drivers/bluetooth: Speedup Bluetooth LE REPL.
...
Updating mp_hal_stdout_tx_strn_cooked to pass on the whole string
to mp_hal_stdout_tx_strn instead of passing byte by byte.
2017-08-05 18:23:22 +02:00
Glenn Ruben Bakke
def719e7a7
nrf: Use the name MicroPython consistently in comments
...
There were several different spellings of MicroPython present in comments,
when there should be only one.
Aligning to upstream commit 55f33240f3d7051d4213629e92437a36f1fac50e.
2017-08-04 18:09:17 +02:00
Paul Sokolovsky
ca582675e1
zephyr/Makefile: Explicitly define default target as "all".
...
For some reason, with the latest Zephyr master, running just "make" led
to executing Zephyr's "qemu" target.
2017-08-03 00:16:38 +03:00
Damien George
0f12082f5b
py,extmod,stmhal: Use "static inline" for funcs that should be inline.
...
"STATIC inline" can expand to "inline" if STATIC is defined to nothing, and
this case can lead to link errors.
2017-08-02 13:42:34 +10:00
Paul Sokolovsky
ee04525097
extmod/modlwip: Implement setsockopt(IP_ADD_MEMBERSHIP).
...
Allows to join multicast groups.
2017-07-31 22:38:37 +03:00
Alexander Steffen
55f33240f3
all: Use the name MicroPython consistently in comments
...
There were several different spellings of MicroPython present in comments,
when there should be only one.
2017-07-31 18:35:40 +10:00
Damien George
bbced3b4bb
extmod: Use MP_ROM_INT for int values in an mp_rom_map_elem_t.
2017-07-31 13:00:34 +10:00
Damien George
b62bb53d0e
py/modsys: Use MP_ROM_INT for int values in an mp_rom_map_elem_t.
2017-07-31 12:59:39 +10:00
Paul Sokolovsky
e6bb25317b
esp8266: Convert to mp_rom_map_elem_t.
2017-07-30 18:13:01 +03:00
Paul Sokolovsky
e3864b5907
esp8266/modesp: Remove unused constants: STA_MODE, etc.
...
WiFi mode selection happens on the level of individual interfaces.
2017-07-30 12:37:35 +03:00
Paul Sokolovsky
e280122b14
unix/modjni: Convert to mp_rom_map_elem_t.
2017-07-30 10:03:14 +03:00
Paul Sokolovsky
f2140f9446
extmod/mod{lwip,onewire,webrepl}: Convert to mp_rom_map_elem_t.
2017-07-29 18:24:16 +03:00
Paul Sokolovsky
036b58228c
extmod/modframebuf: Use correct initialization for .locals_dict.
2017-07-29 10:26:41 +03:00
Paul Sokolovsky
456450437f
py/modio: BufferedWriter: Convert to mp_rom_map_elem_t.
2017-07-28 21:54:59 +03:00
Paul Sokolovsky
f578947ae3
.travis.yml: Pin cpp-coveralls at 0.3.12.
...
Next version, 0.4.0 appears to depend on newer version of urllib3 and
conflicts with version installed in Travis.
2017-07-28 17:37:45 +03:00
Paul Sokolovsky
a3cd349eaf
tools/mpy_bin2res: Tools to convert binary resources to Python module.
...
Afterwards, they can be access using pkg_resource module from
micropython-lib.
2017-07-27 14:41:27 +03:00
Damien George
653a0c2d71
extmod/machine_signal: Fix parsing of invert arg when Pin is first arg.
2017-07-26 12:51:46 +10:00
Eric Poulsen
6b4d4a25ce
extmod/modussl_mbedtls: Implement non-blocking SSL sockets.
2017-07-26 11:34:33 +10:00
Damien George
f3687109d5
extmod/modframebuf: Consistently use "col" as name for colour variables.
...
Thanks to @kamikaze, aka Oleg Korsak, for the original idea and patch.
2017-07-25 14:06:44 +10:00
Damien George
0893b273b9
extmod/modussl_mbedtls: Make socket.close() free all TLS resources.
...
Also, use mp_stream_close() helper to close the underlying socket.
2017-07-25 14:00:45 +10:00
Radomir Dopieralski
363087aa11
extmod/modframebuf: Fix invalid stride for odd widths in GS4_HMSB fmt.
...
Since the stride is specified in pixels, in a 4-bit horizontal format it
has to always be even, otherwise the computation is wrong and we can
write outside of the buffer sometimes.
2017-07-25 12:29:02 +10:00
Damien George
a10467b58a
extmod/modussl_mbedtls: When reading and peer wants to close, return 0.
...
If this particular code is returned then there's no more data, it's not
really an error.
2017-07-25 11:53:26 +10:00
Damien George
04552ff71b
py: Implement raising a big-int to a negative power.
...
Before this patch raising a big-int to a negative power would just return
0. Now it returns a floating-point number with the correct value.
2017-07-25 11:49:22 +10:00
Damien George
4d1fb6107f
py/mpz: Make mpz_is_zero() an inline function.
...
It's more efficient as an inline function, and saves code size.
2017-07-25 11:32:04 +10:00
Damien George
aa7be82a4d
all: Don't include system errno.h when it's not needed.
2017-07-24 18:43:14 +10:00
Damien George
a559098fec
py/mperrno: Allow mperrno.h to be correctly included before other hdrs.
...
Before this patch the mperrno.h file could be included and would silently
succeed with incorrect config settings, because mpconfig.h was not yet
included.
2017-07-24 18:41:24 +10:00
Damien George
1ed3356540
py/py.mk: Make berkeley-db C-defs apply only to relevant source files.
...
Otherwise they can interfere (eg redefinition of "abort") with other source
files in a given uPy port.
2017-07-24 15:50:47 +10:00
Damien George
513dfcf4fe
extmod/modussl_mbedtls: Support server_side mode.
...
To use server_side mode one must pass valid values in the "key" and "cert"
parameters.
2017-07-24 15:08:59 +10:00
Matthew Brener
d003daee06
docs/esp8266/tutorial: Fix typo, "its" to "it's" in powerctrl.rst.
2017-07-24 10:33:03 +10:00
Paul Sokolovsky
7901741bf1
tools/pyboard: Add license header.
2017-07-22 17:12:15 +03:00
Alexander Steffen
71173cd57d
cc3200: Use the name MicroPython consistently in code.
...
In a few places the cc3200 port uses the incorrect spelling Micropython
instead of MicroPython.
2017-07-21 23:33:12 +10:00
Damien George
a6bec53177
minimal/Makefile: Enable gc-sections to remove unused code.
2017-07-21 23:30:33 +10:00
Paul Sokolovsky
205c368fa1
eps8266/general: Fix typo in recent example.
2017-07-21 12:08:18 +03:00
Peter Hinch
6ede921731
eps8266/general: Add known issue of WiFi RX buffers overflow.
2017-07-21 10:19:17 +03:00
Piotr Maliński
8c9e22c127
docs/pyboard/tutorial/amp_skin: Add example for playing large WAV files.
2017-07-21 16:52:16 +10:00
Tom Collins
6cfe737597
tests/basics/builtin_exec: Test various globals/locals args to exec().
2017-07-21 15:17:33 +10:00
Tom Collins
bb3bddabb5
py/builtinevex: Add typechecking of globals/locals args to eval/exec.
2017-07-21 15:16:51 +10:00
Damien George
6c1b7e008d
tests: Rename exec1.py to builtin_exec.py.
2017-07-21 15:11:24 +10:00
Paul Sokolovsky
4368ae3142
extmod/modussl_axtls: Allow to close ssl stream multiple times.
...
Make sure that 2nd close has no effect and operations on closed streams
are handled properly.
2017-07-20 00:20:53 +03:00
Alex Robbins
4662006119
esp8266/mpconfigport.h: Make socket a weak link
...
This way it can be overridden by a socket module in Python, as in other
ports.
2017-07-19 09:36:51 +03:00
Damien George
761e4c7ff6
all: Remove trailing spaces, per coding conventions.
2017-07-19 13:12:10 +10:00