| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| distortos-0.4.0.7z | 2017-03-11 | 717.5 kB | |
| distortos-0.4.0.tar.xz | 2017-03-11 | 723.5 kB | |
| README.md | 2017-03-11 | 8.0 kB | |
| v0.4.0 source code.tar.gz | 2017-03-11 | 7.6 MB | |
| v0.4.0 source code.zip | 2017-03-11 | 8.1 MB | |
| Totals: 5 Items | 17.1 MB | 1 | |
Added
- Support for all 78 STM32F7 chips.
- Support and test configuration for 32F746GDISCOVERY board with STM32F7 chip.
- Set
STKALIGNbit inSCB->CCRfor ARM Cortex-M3 r1p1 (like STM32F1). Thanks to that, stack will be automatically aligned to 8-bytes on exception entry, which is required by AAPCS. This bit is set by default on all other ARM Cortex-M cores. FATAL_ERROR()macro with weakfatalErrorHook().- "Check context of functions" option in Kconfig menus. When this option is selected, the context of functions which must not be used from interrupt context (all blocking functions, all
Mutexfunctions and all functions fromThisThreadnamespace) is checked during run-time. If a violation is detected,FATAL_ERROR()is called with appropriate message. See help of the new option for more info. - "Check stack pointer range during context switch" option in Kconfig menus. Selecting this option enables simple range checking of preempted thread's stack pointer during context switches. Such check is relatively fast, but cannot detect all stack overflows.
FATAL_ERROR()is called with appropriate message when an overflow is detected. Check new option's help for more info. - "Check stack guard contents during context switch" option in Kconfig menus. When enabled, this option extends stacks for all threads (including
main()thread) with a "stack guard" at the overflow end. This "stack guard" - just as the whole stack - is filled with a sentinel value during thread initialization. During each context switch contents of preempted thread's "stack guard" are checked - if any byte has changed, FATAL_ERROR() will be called with appropriate message. This method is able to detect stack overflows much more reliably than simple stack pointer range checking and is still sufficiently fast, assuming that the size of "stack guard" is reasonable. For more info, check new option's help. - "Check stack pointer range during system tick" and "Check stack guard contents during system tick" options in Kconfig menus, which are similar to "Check stack pointer range during context switch" and "Check stack guard contents during context switch" respectively, but executed during every system tick.
Thread::getStackSize()andThisThread::getStackSize()which can be used to get thread's stack size.Thread::getStackHighWaterMark()andThisThread::getStackHighWaterMark()which can be used to get "high water mark" (max usage) of thread's stack.- Test of thread's
start()returningENOSPCwhen stack is too small. STM32-bit-banding.hheader withSTM32_BITBAND_ADDRESS()andSTM32_BITBAND()macros, which are more suited for STM32's CMSIS headers - it's enough to writeSTM32_BITBAND(RCC, CR, PLLON)instead ofBITBAND(&RCC->CR, RCC_CR_PLLON_bit). Note that these new macros must not be used withFLASHregisters - useSTM32_BITBAND_FLASH()andSTM32_BITBAND_FLASH_ADDRESS()for that peripheral.- Options to enable STM32's GPIO to Kconfig menu.
- New chips: 10 STM32F413 chips and 5 STM32F423 chips.
README.mdfiles for all supported boards.
Changed
- Changed placement of fixed stacks for ARMv6-M and ARMv7-M in generated linker script. Stack for interrupts ("main" stack) is located at the beginning of RAM, so any stack overflow during interrupt handling will cause a HardFault exception. Stack for
main()thread ("process" stack) is placed at the end or RAM, after heap, which introduces a potential safety margin for any stack overflows in this thread - as long as heap's last block is not allocated, the memory below this stack is not used. - Stacks are filled with 0xed419f25 instead of 0. Using 0 is not a reliable method to detect stack usage/overflow, as 0 is very likely to be used in the application (for example to zero-initialize variables).
- Reduced default size of stack for interrupts to 1kB.
- Reduced size of stack for interrupts to 1kB in all test configurations.
- Reduced size of stack for idle thread to 256 bytes when support for thread detachment is enabled.
architecture::requestFunctionExecution()checks for amount of free stack before doing any stack modifications. If there's not enough free stack available, it returns anENOSPCerror code. Modify all callers of this function (which includes functions to generate/queue signals and set signal mask) to handle this error code.- Changed number of threads, software timers, queued signals and signal actions used by test application to 8 (was 10) to reduce its RAM requirements. This fixes a crash of test application for NUCLEO-F103RB board caused by insufficient memory available for
_sbrk_r()and crashes of other configurations at lower optimization levels due to stack overflow. - Reimplemented
callOnce()with a mutex. This increases the size ofOnceFlagobject (32 bytes vs 8 bytes), but at the same time reduces stack requirements of any thread usingcallOnce()function. RemovedThreadState::blockedOnOnceFlagenum value. - Cleaned up
architecturenamespace, leaving only architecture-specific elements. MovedStack,InterruptMaskingUnmaskingLockandInterruptUnmaskingLocktointernalnamespace. MovedInterruptMaskingLocktodistortosnamespace. - Removed virtual
Thread::start()and convert overrides available viaDynamicThreadandStaticThreadto non-virtual functions. architecture::initializeStack()checks for buffer overflow before actually doing any memory operations. If stack is too small for stack frame,ENOSPCerror code is returned. Modify all call paths - starting atDynamicThread::start()andStaticThread::start()- to handle this error.- Moved
lowLevelInitialization0()to the very beginning of reset handler. - Renamed
BITBAND_PERIPH()macro toBITBAND_PERIPHERAL(). - Moved remaining ARMv6-M and ARMv7-M assembly functions (
Reset_Handler()andSVC_Handler) to C++ source files. ARMv6-M-ARMv7-M-Reset_Handler.cppno longer requires__USES_CXXand__USES_TWO_STACKSto be defined in compilation flags.- Moved enabling of RCC clocks for STM32's GPIO from
board::lowLevelInitialization()tochip::lowLevelInitialization(). - Buttons and LEDs for boards depend on enabling the GPIO port to which they are connected. "Enable buttons" and "Enable LEDs" options in Kconfig menu are available only if at least one GPIO port of buttons / LEDs is enabled. Preprocessor macros with total number of buttons and LEDs which were previously provided by Kconfig -
CONFIG_BOARD_TOTAL_BUTTONSandCONFIG_BOARD_TOTAL_LEDS- were renamed toDISTORTOS_BOARD_TOTAL_BUTTONSandDISTORTOS_BOARD_TOTAL_LEDS. These macros are now generated automatically bybuttons.hppandleds.hpprespectively. - Update CMSIS-STM32F0 to version 1.7.0.
- Update CMSIS-STM32F4 to version 1.14.0.
Fixed
- Added
ChipSpiMasterLowLevelandChipUartLowLevelclasses to "devices" group in API reference generated by doxygen. - Compiler's built-in defines are passed automatically to doxygen, which fixes some missing documentation entries (for example bit-banding macros).
- Fixed failures in several test cases (
ThreadSleepForTestCase,SignalsInterruptionTestCaseandCallOnceOperationsTestCase) that occured only with low core frequency due to very strict timing requirements. - Fixed stack overflow in
CallOnceOperationsTestCasewhich occured only on ARM Cortex-M0 cores with-Ogoptimization level. - Maximum values of APB1 and APB2 frequencies for STM32F4 take into account whether over-drive is enabled or not.
Removed
lowLevelInitialization1()- which was executed right before callingmain()- from reset handler.- All
...-bits.hheaders files, which are superseded by recent versions of CMSIS headers. - Configuration of chip package from Kconfig menu.