Commit Graph

12 Commits

Author SHA1 Message Date
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).
2016-06-28 11:28:53 +01:00
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.
2016-06-28 11:28:53 +01:00
Damien George eef4f13a33 cc3200: Add basic threading capabilities.
Can create a new thread and run it.  Does not use the GIL at this point.
2016-06-28 11:28:51 +01:00
Damien George 9b1c1262dc cc3200: Define our own FreeRTOS heap so it can go in a special segment. 2016-06-28 11:28:50 +01:00
Damien George 5c0fc73f33 cc3200: Update FreeRTOS to v9.0.0.
This is a pristine copy (actually a subset of files) of upstream FreeRTOS
v9.0.0.

Modifications to the previous version of FreeRTOS (v8.1.2) included
addition of __attribute__ ((section (".boot"))) to the following
functions:

    pxPortInitialiseStack
    prvTaskExitError
    prvPortStartFirstTask
    xPortStartScheduler
    vPortSetupTimerInterrupt
    xTaskGenericCreate
    vTaskStartScheduler
    prvInitialiseTCBVariables
    prvInitialiseTaskLists
    prvAllocateTCBAndStack

This attribute will need to be reinstated on a case-by-case basis
because some of the above functions are now removed/changed.
2016-06-28 11:28:50 +01:00
danicampora 65f6324573 cc3200: Increase stack sizes a bit. 2015-10-19 21:17:15 +02:00
Daniel Campora 6e25d955f4 cc3200: Enable long filename support in FatFS.
This has implications all over the place. I have to admit that
you can instantly see that usability improves, but it costs 3K.
At the same time I took the oportunity to rename the '/SFLASH'
drive to '/flash' which improves compatibility with the pyboard.
2015-04-11 13:35:05 +02:00
danicampora 9e44383e3f cc3200: Add power management framework. Add mpcallback class.
Supports suspend and hibernate modes. Waking is possible throug GPIO
and WLAN.
The mpcallback class is generic and can be reused by other classes.
2015-03-11 17:00:33 +01:00
danicampora 26cbc91373 cc3200: Place functions only used while booting in a special section.
Such functions are never used after MicroPython has started, and they
remain in RAM wasting space. Now they are placed in a special section
named "boot" which sits just before the heap, allowing us to extend
the effective heap area up to the new boot section. Right now, this
gives us back ~1K, but in the future, more functions might end up in
there as well.
2015-03-11 16:59:29 +01:00
danicampora 5330d8996f cc3200: Modify simplelink FreeRTOS OSI layer to only use semaphores.
Before, both mutexes and semaphores were used. Using only the latter
and with a bit of cleanup to remove some code bloat, we save ~600
bytes of code.
2015-02-26 11:18:18 +01:00
danicampora e1dfc44178 cc3200: Disable FreeRTOS asserts. Optimize more files if BTYPE=debug. 2015-02-20 16:40:06 +01:00
danicampora 8785645a95 cc3200: Add cc3200 port of MicroPython.
The port currently implements support for GPIO, RTC, ExtInt and the WiFi
subsystem. A small file system is available in the serial flash. A
bootloader which makes OTA updates possible, is also part of this initial
implementation.
2015-02-06 22:10:11 +00:00