Damien George
f497723802
stm32: Allow to have no storage support if there are no block devices.
...
If no block devices are defined by a board then storage support will be
disabled. This means there is no filesystem provided by either the
internal flash or external SPI flash. But the VFS system can still be
enabled and filesystems provided on external devices like an SD card.
2018-05-28 21:45:46 +10:00
Damien George
aa4a7a8732
stm32/usb: Guard USB device code with #if for whether USB is enabled.
...
With this change, all the USB source code can now be passed through the
compiler even if the MCU does not have a USB peripheral.
2018-05-28 21:45:46 +10:00
Nick Moore
ef4c8e6e97
esp32: Silence ESP-IDF log messages when in raw REPL mode.
...
This prevents clients such as ampy, mpy-utils, etc getting confused by
extraneous data.
2018-05-28 20:15:08 +10:00
Damien George
dfeaea1441
py/objtype: Remove TODO comment about needing to check for property.
...
Instance members are always treated as values, even if they are properties.
A test is added to show this is the case.
2018-05-25 10:59:40 +10:00
Damien George
15ddc20436
stm32: Add new component, the mboot bootloader.
...
Mboot is a custom bootloader for STM32 MCUs. It can provide a USB DFU
interface on either the FS or HS peripherals, as well as a custom I2C
bootloader interface.
2018-05-24 23:21:19 +10:00
Damien George
f47eeab0ad
stm32: Add low-level hardware I2C slave driver.
2018-05-24 23:11:13 +10:00
Damien George
4200018a05
stm32: Remove unneeded HTML release notes from usbdev and usbhost dirs.
...
These files provide no additional information, all the version and license
information is captured in the relevant files in these subdirectories.
Thanks to @JoeSc for the original patch.
2018-05-24 11:28:54 +10:00
Damien George
df9b7e8f24
esp32/esp32.custom_common.ld: Put soc code in iram0.
...
This is what the IDF does, it must be done.
2018-05-23 12:57:50 +10:00
Damien George
18e6358480
py/emit: Combine setup with/except/finally into one emit function.
...
This patch reduces code size by:
bare-arm: -16
minimal x86: -156
unix x64: -288
unix nanbox: -184
stm32: -48
cc3200: -16
esp8266: -96
esp32: -16
The last 10 patches combined reduce code size by:
bare-arm: -164
minimal x86: -1260
unix x64: -3416
unix nanbox: -1616
stm32: -676
cc3200: -232
esp8266: -1144
esp32: -268
2018-05-23 00:35:16 +10:00
Damien George
436e0d4c54
py/emit: Merge build set/slice into existing build emit function.
...
Reduces code size by:
bare-arm: +0
minimal x86: +0
unix x64: -368
unix nanbox: -248
stm32: -128
cc3200: -48
esp8266: -184
esp32: -40
2018-05-23 00:23:36 +10:00
Damien George
d97906ca9a
py/emit: Combine import from/name/star into one emit function.
...
Change in code size is:
bare-arm: +4
minimal x86: -88
unix x64: -456
unix nanbox: -88
stm32: -44
cc3200: +0
esp8266: -104
esp32: +8
2018-05-23 00:23:08 +10:00
Damien George
8a513da5a5
py/emit: Combine break_loop and continue_loop into one emit function.
...
Reduces code size by:
bare-arm: +0
minimal x86: +0
unix x64: -80
unix nanbox: +0
stm32: -12
cc3200: +0
esp8266: -28
esp32: +0
2018-05-23 00:23:04 +10:00
Damien George
6211d979ee
py/emit: Combine load/store/delete attr into one emit function.
...
Reduces code size by:
bare-arm: -20
minimal x86: -140
unix x64: -408
unix nanbox: -140
stm32: -68
cc3200: -16
esp8266: -80
esp32: -32
2018-05-23 00:22:59 +10:00
Damien George
a4941a8ba4
py/emit: Combine load/store/delete subscr into one emit function.
...
Reduces code size by:
bare-arm: -8
minimal x86: -104
unix x64: -312
unix nanbox: -120
stm32: -60
cc3200: -16
esp8266: -92
esp32: -24
2018-05-23 00:22:55 +10:00
Damien George
d298013939
py/emit: Combine name and global into one func for load/store/delete.
...
Reduces code size by:
bare-arm: -56
minimal x86: -300
unix x64: -576
unix nanbox: -300
stm32: -164
cc3200: -56
esp8266: -236
esp32: -76
2018-05-23 00:22:47 +10:00
Damien George
26b5754092
py/emit: Combine build tuple/list/map emit funcs into one.
...
Reduces code size by:
bare-arm: -24
minimal x86: -192
unix x64: -288
unix nanbox: -184
stm32: -72
cc3200: -16
esp8266: -148
esp32: -32
2018-05-23 00:22:44 +10:00
Damien George
e686c94052
py/emit: Combine yield value and yield-from emit funcs into one.
...
Reduces code size by:
bare-arm: -24
minimal x86: -72
unix x64: -200
unix nanbox: -72
stm32: -52
cc3200: -32
esp8266: -84
esp32: -24
2018-05-23 00:22:35 +10:00
Damien George
0a25fff956
py/emit: Combine fast and deref into one function for load/store/delete.
...
Reduces code size by:
bare-arm: -16
minimal x86: -208
unix x64: -408
unix nanbox: -248
stm32: -12
cc3200: -24
esp8266: -96
esp32: -44
2018-05-23 00:22:20 +10:00
Damien George
400273a799
py/objgenerator: Protect against reentering a generator.
...
Generators that are already executing cannot be reexecuted. This patch
puts in a check for such a case.
Thanks to @jepler for finding the bug.
2018-05-22 16:54:03 +10:00
Damien George
771cb359af
py/objgenerator: Save state in old_globals instead of local variable.
...
The code_state.old_globals variable is there to save the globals state so
should be used for this purpose, to avoid the need for additional local
variables on the C stack.
2018-05-22 16:39:19 +10:00
Damien George
20b4b85f72
ports: Enable MICROPY_PY_BUILTINS_ROUND_INT on selected ports.
2018-05-22 14:18:16 +10:00
Jan Klusacek
b318ebf101
py/modbuiltins: Add support for rounding integers.
...
As per CPython semantics. This feature is controlled by
MICROPY_PY_BUILTINS_ROUND_INT which is disabled by default.
2018-05-22 14:18:16 +10:00
Damien George
f2ec792554
py/parsenum: Adjust braces so they are balanced.
2018-05-22 13:20:00 +10:00
Damien George
e773a2cdba
stm32/main: Use consistent indenting of macro #if's.
2018-05-22 13:17:03 +10:00
Damien George
f68e722005
stm32/rng: Use Yasmarang for rng_get() if MCU doesn't have HW RNG.
2018-05-22 10:36:03 +10:00