Glenn Ruben Bakke
18e73d4214
nrf5/modules/ubluepy: Fixing compilation bug of wrong variable name when registering gattc event handler in ublupy peripheral connect function (central mode).
2017-05-12 20:11:30 +02:00
Paul Sokolovsky
a4e38db30d
unix: Move upip to frozen bytecode dir.
...
For x86_64 build, this saves only 128 bytes on the final executable
size, but still an improvement.
2017-05-12 18:32:25 +03:00
Paul Sokolovsky
5c312861a6
unix/Makefile: Enable frozen bytecode modules dir.
2017-05-12 18:31:22 +03:00
Paul Sokolovsky
ddf0b7dbc3
esp8266/scripts: Move initsetup & port_diag tools to modules/.
2017-05-12 17:58:50 +03:00
Paul Sokolovsky
e9308c189a
esp8266/scripts: Move drivers/modules to modules/ (frozen bytecode).
2017-05-12 17:57:23 +03:00
Paul Sokolovsky
5f7ce2a1ca
esp8266/modules/flashbdev: Reserve one sector for native code storage.
2017-05-12 16:08:54 +03:00
Paul Sokolovsky
3e05df7fd1
esp8266/modesp: flash_user_start: Use value from linker script.
...
Make esp8266_common.ld export size reserved to all code segments, and use
that in esp.flash_user_start() implementation.
2017-05-12 16:00:05 +03:00
Paul Sokolovsky
0987ad5e30
esp8266/esp8266.ld, esp8266_ota.ld: Grow main firmware size by 32KB.
...
To accommodate both system and user frozen modules.
2017-05-12 16:00:05 +03:00
Tom Collins
760aa0996f
tests/basics/lexer: Add line continuation tests for lexer.
...
Tests for an issue with line continuation failing in paste mode due to the
lexer only checking for \n in the "following" character position, before
next_char() has had a chance to convert \r and \r\n to \n.
2017-05-12 15:14:25 +10:00
Tom Collins
6f56412ec3
py/lexer: Process CR earlier to allow newlines checks on chr1.
...
Resolves an issue where lexer failed to accept CR after line continuation
character. It also simplifies the code.
2017-05-12 15:14:24 +10:00
Paul Sokolovsky
5feeba8897
examples/hwapi/hwconfig*: Use inline Signal() args where possible.
2017-05-12 01:19:13 +03:00
Glenn Ruben Bakke
96b203b729
nrf5/bluetooth: Updating makefiles with updated paths to bluetooth le components after moving files.
2017-05-11 19:13:20 +02:00
Glenn Ruben Bakke
3d503cf7a8
nrf5/bluetooth: Moving stack download script to drivers/bluetooth folder.
2017-05-11 19:13:20 +02:00
Glenn Ruben Bakke
bdaa714f85
nrf5/bluetooth: Move bluetooth driver files to drivers/bluetooth. Move bluetooth stack download script to root folder.
2017-05-11 19:13:20 +02:00
Glenn Ruben Bakke
e69e47bc24
nrf5/bluetooth: Guarding implementation against being linked in by surrounding it with BLUETOOTH_SD flag. Flag is only set if SD=<sdname> parameter is provided during make.
2017-05-11 19:13:20 +02:00
Glenn Ruben Bakke
4676e5900b
nrf5/bluetooth: Moving makefile include folder and source files of bluetooth driver, ble uart and ble module to main Makefile.
2017-05-11 19:13:20 +02:00
Glenn Ruben Bakke
d61dcf18fb
nrf5/bluetooth: Moving help_sd.h and modble.c to modules/ble.
2017-05-11 19:13:20 +02:00
Damien George
1d8c3f4cff
mpy-cross/Makefile: Override undefine any inherited variables.
...
This is a temporary hack to allow othe Makefiles to build mpy-cross
recursively.
2017-05-11 23:40:16 +10:00
Damien George
a1f254028d
py/mkrules.mk: Add dependency of .mpy files upon mpy-cross.
...
This ensures that mpy-cross is automatically built (and is up-to-date) for
ports that use frozen bytecode. It also makes sure that .mpy files are
re-built if mpy-cross is changed.
2017-05-11 23:40:16 +10:00
Glenn Ruben Bakke
b245011259
nrf5/modules/machine: bugfix after changing to MP_ROM_PTR in machine module local dict.
2017-05-11 00:08:44 +02:00
Damien George
6d221fe284
docs/library/uos: Add description of uos.ilistdir() function.
2017-05-10 12:44:21 +10:00
Damien George
d70f688f25
extmod/vfs: Use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers.
2017-05-10 12:30:34 +10:00
Damien George
f1609bc843
ports: Add ilistdir in uos module.
2017-05-10 12:13:53 +10:00
Damien George
852c215d76
tests/extmod/vfs: Update tests to reflect new ilistdir() method.
2017-05-10 11:39:29 +10:00
Damien George
d4cd4831b0
extmod/vfs_fat: Replace listdir() with implementation of ilistdir().
...
VfsFat no longer has the listdir() method. Rather, if listdir()
functionality is needed then one should use uos.listdir() which will call
VfsFat.ilistdir().
2017-05-10 11:39:28 +10:00
Damien George
87283c1974
extmod/vfs: Implement mp_vfs_ilistdir().
...
uos.ilistdir() is the core function, returning an iterator that yields
3-tuples. uos.listdir() is implemented in terms of ilistdir().
2017-05-10 11:39:28 +10:00
Glenn Ruben Bakke
54656044f7
nrf5: Syncing code with upstream master and converting all module and method tables to use MP_ROM macros. Also adding explicit casting of local dicts to (mp_obj_dict_t*).
2017-05-09 22:54:58 +02:00
Paul Sokolovsky
edc02bd952
unix/main: Implement -m option for packages.
2017-05-09 14:22:21 +03:00
Damien George
9bd67d9fbc
tests/extmod: Make some vfs tests fully unmount FSs before running.
...
Otherwise the existing FSs can interfere with the tests, and in some
cases the tests can write to the real FS on the device.
2017-05-09 15:50:40 +10:00
Tom Collins
d00d062af2
tests/basics/lexer: Add lexer tests for input starting with newlines.
2017-05-09 14:48:00 +10:00
Tom Collins
2998647c4e
py/lexer: Simplify lexer startup by using dummy bytes and next_char().
...
Now consistently uses the EOL processing ("\r" and "\r\n" convert to "\n")
and EOF processing (ensure "\n" before EOF) provided by next_char().
In particular the lexer can now correctly handle input that starts with CR.
2017-05-09 14:43:23 +10:00
Damien George
e711e2d44a
tests/basics: Add memoryview test for big ints.
2017-05-09 10:49:19 +10:00
Damien George
2e9e14980d
tests/basics: Update array test for big-int with lL typecodes.
2017-05-09 10:46:43 +10:00
Damien George
6cfa61a4cc
py/binary: Handle storing big-ints to all arrays types.
...
Prior to this patch only 'q' and 'Q' type arrays could store big-int
values. With this patch any big int that is stored to an array is handled
by the big-int implementation, regardless of the typecode of the array.
This allows arrays to work with all type sizes on all architectures.
2017-05-09 10:41:00 +10:00
Glenn Ruben Bakke
00d96f5695
nrf5/modules/timer: Fixing bug in timer_find(). Function allowed to locate index out of range and started to look up in config pointer (index == size of array).
2017-05-08 23:32:42 +02:00
Glenn Ruben Bakke
1063a44ec6
nrf5/modules/timer: Remove test which is covered by timer_find() function in the line below.
2017-05-08 23:31:14 +02:00
Glenn Ruben Bakke
2cf9e3e625
nrf5/modules/timer: Adding locals dict table and adding start/stop template functions. Also adding constants for oneshot and periodic to locals dict.
2017-05-08 23:24:15 +02:00
Glenn Ruben Bakke
9e6cca66b4
nrf5/modules/timer: Adding timer module to modmachine.
2017-05-08 23:09:15 +02:00
Glenn Ruben Bakke
891bd61bf7
Merge remote-tracking branch 'upstream/master' into nrf5_no_sdk
2017-05-08 22:21:56 +02:00
Glenn Ruben Bakke
bf79699810
nrf5/boards: Adding micro:bit default music pin definition. Also adding config flag for enabling pwm machine module.
2017-05-08 22:16:59 +02:00
Glenn Ruben Bakke
130a00fdeb
nrf5/hal/timer: Adding start/stop template functions to hal_timer.h/.c
2017-05-08 22:10:02 +02:00
Glenn Ruben Bakke
64f91e01ac
nrf5/Makefile: Adding drivers/pwm.c and modules/music files to the source file list.
2017-05-08 22:06:25 +02:00
Glenn Ruben Bakke
d3509517f5
nrf5/modules/music: Adding config guard in musictunes.c and adding import of mphal.h.
2017-05-08 22:05:23 +02:00
Glenn Ruben Bakke
a84ed760b5
nrf5/modules/music: Including mphal.h before config guard in modmusic.c. Also changed name on config guard to MICROPY_PY_MUSIC. Missing PWM functions during linkage will show up if PWM module has not not configured.
2017-05-08 22:03:33 +02:00
Glenn Ruben Bakke
24e902aa8f
nrf5/drivers/pwm: Including mphal.h before config guard in pwm.c.
2017-05-08 22:01:47 +02:00
Glenn Ruben Bakke
cf1c6939ea
nrf5: Updating mpconfigport.h to include music module as builtin. Adding new configuration for enabling music module. Activating MODULE_BUILTIN_INIT in order to run music module init function on import.
2017-05-08 22:01:05 +02:00
Glenn Ruben Bakke
c3ccef800d
nrf5/modules/music: Backing up progress in music module.
2017-05-08 21:22:53 +02:00
Glenn Ruben Bakke
8d06dd3281
nrf5/drivers/pwm: Updating soft PWM driver to only be included if SOFT_PWM config is set.
2017-05-08 21:21:57 +02:00
Glenn Ruben Bakke
a4513f0159
nrf5/hal/gpio: Add function to clear output register using a pin mask.
2017-05-08 21:20:08 +02:00
Glenn Ruben Bakke
94efa02084
nrf5: Adding new configuration called MICROPY_PY_MACHINE_SOFT_PWM to mpconfigport.h. This config will enable software defined PWM using timer instead of using dedicated PWM hardware. Aimed to be used in nrf51 targets.
2017-05-08 21:14:34 +02:00