Paul Sokolovsky
a4c8a1ffe8
extmod/moduos_dupterm: Reuse dupterm_arr_obj for write operations.
Instead of allocating new array object header again and again, causing
memory fragmentation.
8 years ago
Paul Sokolovsky
ec7fe92531
py/objarray: Split out header to allow direct access to object.
This follows source code/header file organization similar to few other
objects, and intended to be used only is special cases, where efficiency/
simplicity matters.
8 years ago
Paul Sokolovsky
380561836d
esp8266/esp_mphal: Properly handle dupterm EOF after switching to readinto().
8 years ago
Paul Sokolovsky
a22b6ebff1
esp8266/esp_mphal: call_dupterm_read: Use readinto() method.
It's memory fragmentation hazard to allocate 1-char string each time by
calling read() method.
8 years ago
Paul Sokolovsky
e07ef8f1a2
esp8266/main: Init recently added dupterm_arr_obj port state var.
8 years ago
Paul Sokolovsky
426112ce88
extmod/moduos_dupterm: Reserve buffer bytearray object for dupterm.
Allocating it for each read/write operation is a memory fragmentation
hazard.
8 years ago
Paul Sokolovsky
d83177b248
unix/mpconfigport_minimal.h: Allow to print a string within 1KB of heap.
By adjusting parser allocation policy.
8 years ago
Paul Sokolovsky
e965d2b82a
unix/Makefile: Make "minimal" build be minimal again.
8 years ago
Paul Sokolovsky
4cfe3e84b0
esp8266/README: Promote from "highly experimental" to "experimental".
8 years ago
Paul Sokolovsky
b8f45166c6
esp8266: Switch webrepl to use frozen bytecode.
8 years ago
Paul Sokolovsky
dec51e3519
esp8266: Switch webrepl_setup to use frozen bytecode.
8 years ago
Paul Sokolovsky
686367dcfc
esp8266: Explicitly collect garbage in bootstrap scripts.
Leads to less fragmentation at teh time user code starts.
8 years ago
Paul Sokolovsky
417dc0c05d
extmod/modbtree: Fixes for nanbox build.
8 years ago
Paul Sokolovsky
43241ceaac
unix: Enable btree module.
But disable it for coverage build, as its extra warninsg aren't compatible
with K&R C BerkeleyDB uses.
8 years ago
Paul Sokolovsky
b09cd0e1ec
extmod/modbtree: Fix unused argument warning.
8 years ago
Paul Sokolovsky
737bd9c314
py/mpconfig.h: Mention MICROPY_PY_BTREE config option.
However, as it requires linking with external libraries, it actually
should be ste on Makefile level.
8 years ago
Paul Sokolovsky
ae184cb9de
py/builtinimport: Disable "imported as namespace package" warning.
Namespace packages are natural part of Python3, CPython3 doesn't have such
warning, it made sense only from point of view of Python2 legacy.
8 years ago
Paul Sokolovsky
c880f91ac0
extmod/modwebrepl: Add readinto() method.
8 years ago
Paul Sokolovsky
03b0279c6d
extmod/modwebsocket: Add readinto() method.
8 years ago
Paul Sokolovsky
92a9078a6f
tests/meminfo: Update for addition of "max free sz" output.
8 years ago
Paul Sokolovsky
749cbaca7f
py/gc: Calculate (and report) maximum contiguous free block size.
Just as maximum allocated block size, it's reported in allocation units
(not bytes).
8 years ago
Radomir Dopieralski
35962eaab0
esp8266/modpybuart: allow setting baudrate and other params
8 years ago
Paul Sokolovsky
d1b7ba5dc1
esp8266/websocket_helper.py: Fix typo in debug output.
8 years ago
Paul Sokolovsky
6a6e0b7e05
py/gc: Be sure to count last allocated block at heap end in stats.
Previously, if there was chain of allocated blocks ending with the last
block of heap, it wasn't included in number of 1/2-block or max block
size stats.
8 years ago
Paul Sokolovsky
6907496016
esp8266/websocket_helper.py: Avoid extra string allocations.
8 years ago
dpslwk
f3636a7b46
stmhal: Enable SD card on L4 MCUs.
8 years ago
dpslwk
b03df60f32
stmhal: Correct DMA to allow SD card on L4 MCUs.
8 years ago
dpslwk
14b7c3e59c
stmhal: Update HALCOMMITS due to change to hal
8 years ago
dpslwk
daa279a3a1
stmhal: Port of f4 hal commit 1d7fb82
to l4 hal
8 years ago
Damien George
56845b6aff
esp8266/README: Describe how to build mpy-cross.
8 years ago
Damien George
db80c0ed46
esp8266: Enable frozen bytecode, with scripts in modules/ subdir.
To start with, the critical scripts _boot.py and flashbdev.py are frozen
to improve performance and reduce RAM consumption.
Saves about 1000 bytes of heap RAM for a bare boot with filesystem.
9 years ago
Damien George
b9e3fde21a
qemu-arm: Disable gcc LTO option for nlrthumb.c.
If LTO is enabled for nlrthumb.c then gcc optimises away the nlr_push_tail
function when in fact it is needed. So disable this option for this file.
8 years ago
Damien George
d862a7b811
cc3200: Remove obsolete singleton heart-beat object.
8 years ago
Damien George
842c2c74c0
cc3200: Allow to compile bootloader with threading enabled.
Threading is not used in the bootloader but the config optios are still
enabled so we must exclude including FreeRTOS.h.
8 years ago
Damien George
469c623bb8
cc3200: Shrink the FreeRTOS heap and place TCB+stack in freed location.
The 16k FreeRTOS heap originally had all TCBs and stacks dynamically
allocated within it (plus semaphores and some other things). Now that
xTaskCreateStatic is used instead of xTaskCreate, the TCBs and stacks
are allocated statically and no longer use any of the FreeRTOS heap.
Therefore, the FreeRTOS stack can be shrunk by the amount that has been
made static. Furthermore, the TCBs and stack that are now static should
be placed in the .rtos_heaps section of RAM because this RAM is treated
specially by the bootloader (the bootloader executes from the first 16k
of RAM and loads the firmware into the section starting after the 16k).
After this patch the FreeRTOS heap (ucHeap) is 7200 bytes. The memory
available for the MicroPython heap is 54936 bytes (including GC overhead).
9 years ago
Damien George
e098eac195
cc3200: Start the simplelink spawn task using the static task creator.
In VStartSimpleLinkSpawnTask we change xTaskCreate to xTaskCreateStatic
so that the task is created using statically allocated memory for the TCB
and stack.
This means that xTaskCreate function is no longer needed (the static
version is now used exclusively).
9 years ago
Damien George
5b8e884573
cc3200: Remove .boot section attribute from osi_TaskCreate function.
This function is no longer used. Having the .boot section attribute
meant that it was included in the firmware regargless of use. Without
this attribute the linker can remove the function.
9 years ago
Damien George
1d5aa9d245
cc3200: In FreeRTOSConfig.h, comment on configSUPPORT_STATIC_ALLOCATION.
This config variable is now needed regardless of whether threading is
enabled or not.
9 years ago
Damien George
8b9ddf4031
tests/thread: Allow some tests to run on ports with not much heap.
9 years ago
Damien George
63d05228a3
tests/thread: Allow thread_sleep1 to run without floating point.
9 years ago
Damien George
53562213c8
cc3200: Enable the GIL.
9 years ago
Damien George
fa2ac93c3a
cc3200/mpthreadport: Move mem alloc outside the thread_mutex lock.
Otherwise there could be a deadlock, with the GC's mutex and
thread_mutex.
9 years ago
Damien George
757146efe3
cc3200/mpthreadport: Scan more root pointers from thread data.
9 years ago
Damien George
17886828c8
cc3200/gccollect: Use MP_STATE_THREAD(stack_top) to get top of stack.
9 years ago
Damien George
3b0fbfe4e5
cc3200/mpthreadport: Properly initialise the main thread's data.
9 years ago
Damien George
27241293c4
cc3200/mpthreadport: Make mutex statically allocated.
Reduced the need for the FreeRTOS heap to allocate the mutex.
9 years ago
Damien George
0455755296
cc3200: Use xTaskCreateStatic instead of osi_TaskCreate.
This allows to statically allocate the TCB (thread control block) and
thread stack in the BSS segment, reducing the need for dynamic memory
allocation.
9 years ago
Damien George
77e37ff98b
py/mpthread: Include mpstate.h when defining GIL macros.
9 years ago
Damien George
15e68277c1
tests/thread: Make sure that thread tests don't rely on floating point.
9 years ago
Damien George
5b7789d519
tests/thread: Make stack-size test run correctly and reliable on uPy.
9 years ago