Added extended statistics to help track potential memory leaks:
* used user heap size per task
* number of successful allocations
* number of successful frees
Updated FreeRTOS source code to 10.4.6.
Moved FreeRTOS sources to the third-party directory.
Added necessary changes to the CMake configuration.
Split FreeRTOSConfig.h. From now, each board has its own.
Added missing log headers.
Minor refactor of the module-os cmake.
Fixed stack overflows in bell application main and time service.
Gets data from freertos and prints on frequency change depending
if it's important. Gathering is not costly, printing is though.
For less intrusive checks I would rather disable names gathering
as in worst case scenario it hangs rtos context switching till
thread id is found.
Added atexit functionality. All global destructors and functions
registered with atexit() should be called at program exit.
It was possbile to reuse original newlib implementation with
MALLOC_PROVIDED flag set.
Made sure logger destructructor is called as last one.
Due to mudita OS legacy, it was not possible to simply fix dependencies
in global objectes and hence there are neither global objects
destructors nor functions registered with atexit() called when exit()
is called.
Possibly it will be changed later.
Add support for Reboot and Power off for the
_platform_exit code.
Add _platform_exit mode handle
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Add support to the FreeRTOS to be able to back to main
functon when the scheduler is terminated.
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Calling abort() or exit() from the interrupt context
causes that the phone enters into bootloop, because
in the exception mode ISR cannot be used.
We are add guards for prevent clean system shudown
when abort is called from the ISR context.
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Fix saving crash dump and add create crash dump
when exit function is called.
Also crashdumps size is slighthy reduced
because for backtrace we don't need to grab
the text section and heap section.
Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Remove duplicated header for linux; move header for rt1051 to the same
tree as for linux.
_exit.c uses os so it should be placed in the os.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Remove obsolete target dependencies across modules.
Remove 'cross' and 'unittests' targets.
Refactor some remaining target dependencies to use board include macro.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Changed:
- Runtime disabled logs which didn't add value from ServiceDesktop
- Runtime disabled logs which didn't add value from SystemManager
- Added possibility to change runtime logging levels
- Integrated ServiceDesktop developer code a bit - it might be used
as virtual base with little to no modifications for other endpoints
which would result with less redundant code
added weakptr link to settings and checks
it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
- deregistration on Settings destrution
- weak referencing of Service to not crash Settings on missuse
- Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
Removed dependency from freertos in test global file
EntryPath tests updated and compilation slimed
- Dump logs to file every 10 sec.
- max file size is 50 MB
(after reaching it, no more logs will be logged),
- Add `LockGuard` with locking mechanism
supporting IRQ and use it in `Logger`.
- Fix minor style issues in `Logger`.
- Add `mount_user_lfs_partition.py` script for mounting LFS on Linux FS
in order to get `MuditaOS.log` file from `user` partition
Disable FreeRTOS optimization for RelWithDebInfo configuration in order
to be able to analyze system memory (heap and tasks' stacks).
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
lIndexOfLastAddedTask is shared between two separate functions
that should run consecutively but in some cases the thread
running can be yield in between which results in broken thread
stack.
This change reduces the risk but it does not entirely solve
the problem. It is still possible for the threads to return in
different order. Nevertheless the tests did not confirm that.
Refactor audio data path to fix several synchronization issues and
excessive copy operations on large memory blocks. Introduce
audio::Stream data structure to allow connecting audio source and sink
with a zero-copy capability.
Introduce system mechanisms:
- critical section guard lock needed for stream synchronization
- non-cacheable memory allocator to allocate memory for DMA safe
buffers
Update the Googletest CMake template to match the capabilities of the
Catch2 template.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@mudita.com>
* [EGD-4261] Initial version of syscalls
* [EGD-4261] CR small fixes
* [EGD-4261] Rename namespace and fsync call
Rename namespace vfs::internal for clarify that syscall functions are for internal use only
* [EGD-4261] Handle manager for stdlib
Handle manager layer for STDIO compatibility.
* [EGD-4261] Initial version of sysscall (old vfs)
* [EGD-4261] Direntry syscalls completed
* [EGD-4261] Fixes in handle manager
* [EGD-4261] Add support for std::filesystem.
libstdc++ from compiler is compiled without <dirent.h>
, so std::directory_iterator doesn't work.
Our implementation fix this issue and override
libstdc++ library code
* [EGD-4261] Compile syscalls only on RT1051 target
* [EGD-4261] RT compile fix
* [EGD-4261] Code review small fixes
* [EGD-4261] Code review fixes
* [EGD-4261] Remove redundant noisy debug log msg.
Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>