Commit Graph

177 Commits

Author SHA1 Message Date
Bartosz
fef2ad61a8 [MOS-786] A/B Booting - fixed factory reset from menu
Now factory reset works both from ecoboot and from menu
2023-01-19 16:41:56 +01:00
Bartosz
01857dd1bd [MOS-786] Added support for A/B boot codes in OS
Further implementation of A/B booting
2023-01-19 16:41:56 +01:00
Pawel Olejniczak
0867d17242 [CP-1424] Refactor backup and restore endpoints
Redesign of backup and restore endpoints in the
service-desktop to delegate responsibility for
execution of the actual backup and restore process
onto the Updater.
2023-01-19 16:41:56 +01:00
Maciej-Mudita
4bd7b1acf4 [MOS-275] Fix alarm rings on the low battery screen
When we had a critical battery level and the alarm clock rang,
it was impossible to turn it off.
2023-01-19 12:07:19 +01:00
Maciej-Mudita
7fff20a0e7 [MOS-788] Fix incorrect total CPU usage in logs
After a long time, a counter overflow appeared
2022-11-02 10:59:17 +01:00
Maciej-Mudita
f4aaf4e302 [MOS-775] Create run-time statistics for tasks
Every hour, statistics of tasks that put a heavy load
on the CPU will be logged
2022-10-25 18:46:54 +02:00
Dawid Wojtas
e77b5d6702 [MOS-424] Improvement of logger module
Due to losing bytes the logger has a worker
which is responsible for dumping logs to
the file. The logger also has its own timer
to dump logs every 15 minutes. EventManager
is not responsible for interval dumping logs
now.
2022-09-15 11:58:09 +02:00
Dawid Wojtas
b7330da36c [MOS-662][MOS-301] Fix E-ink shutdown while restoring data
While restoring system data the timer can turn off power of E-ink
to save the power. To avoid this situation we need to power on
the E-ink before wiping out the display. The restore procedure
also performs reversing services list to close. In this case
we do it twice so the order is wrong.
2022-08-30 11:00:04 +02:00
Dawid Wojtas
ded7e1a7a5 [MOS-676] Fix destroying wrong sentinels
If the service is closed the governor removes connected
sentinel. The base iterator refers to the element that is next
in the reversed list. Adding std::next the iterator points to
the correct element.
2022-08-30 08:54:55 +02:00
Adam Wulkiewicz
fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00
Maciej Gibowicz
c9b16c3064 [MOS-598] Improved keyboard responsiveness
Add sentinel that increases and hold the CPU frequency
after a button press event
2022-07-28 12:16:36 +02:00
Paweł Joński
870250433a [MOS-298] HALize ServiceEink
Add HAL to ServiceEink
Remove dead code from Linux eink substitute
Fix LUTS.bin refresh problems on simulator
2022-06-29 13:37:20 +02:00
Maciej Gibowicz
fc05d5e618 [MOS-389] Fix phone stuck on shutdown screen
The phone sometimes remained on the power off screen
during system shutdown.
2022-05-05 14:16:03 +02:00
Adam Dobrowolski
3343f02809 [MOS-266] Call StateMachine implementation
With some tests, documentation and so on
2022-05-02 15:54:33 +02:00
Mateusz Piesta
97e9d7b79f [BH-1449] Fix gui/eink dependencies
* Dependencies between service-gui and service-eink
have been correctly defined.
* System close routine was replaced with the sequential one
which should solve many bell issues.
* It also fixes BH-1406 and BH-1442.
* Fixed some weird CMake issues in module-audio and
several other modules.
* Fixed service-gui closing routine
* Removed unneeded messages/states from service-gui/eink.
* Enhanced app-mgr closing routine. Fixed closing action handling.
2022-04-26 13:47:12 +02:00
Adam Dobrowolski
fc64a97b8e [MOS-380] Sentinels for each added that removes bad data
As in topic
2022-04-15 10:54:57 +02:00
Maciej Gibowicz
619685d70a [MOS-339] Fix rapid change of CPU frequency
After disconnecting the USB cable, the CPU consumption
increased to over 80% (for 4 MHz), which resulted
in a cyclical change in the CPU frequency and finally
a much shorter battery life.
2022-04-11 08:54:54 +02:00
Mateusz Piesta
2f42cd5e73 [BH-1424] FreeRTOS update
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.
2022-04-07 13:31:28 +02:00
Adam Dobrowolski
cc02ffffbb [MOS-258] System profile util works with separate rtt
Profiling Move RTT handling to interfacing library
Library for msgpack sink
magic enum updated
performance monitor fixups
2022-04-07 11:32:49 +02:00
Adam Dobrowolski
1cb4da819d [MOS-307] Application and Service example and docs
Working example of application and service ready to copy from
with minimum documentation
Apply suggestions from code review
Co-authored-by:
* Paweł Olejniczak <58421550+pawel-mudita@users.noreply.github.com>
* Paweł Joński <79840715+paweljonskim@users.noreply.github.com>
* Bartosz Cichocki <sp2fet@gmail.com>
2022-03-28 08:17:39 +02:00
Maciej Gibowicz
90b4f0c5ce [MOS-338] Fix regression in the frequency stepping algorithm
Downscaling the CPU frequency from max to min
takes less than 1 second.
2022-03-25 16:10:50 +01:00
Adam Dobrowolski
43cd960523 [MOS-278] Fixed frequency hold algorithm behaviour
fixed hold frequency algorithm behaviour
added basic tests for frequecy changing
updated catch for newer gcc
tests added
2022-03-15 17:26:09 +01:00
Marek Niepieklo
aacd665eb9 [CP-1119] Fix Restore failure
Restored Eink service to Restore whitelist
2022-03-15 10:27:49 +01:00
Mateusz Piesta
6ad290366f [MOS-296] Merge SNVS cherry-pick conflicts fixed
Fix SNVS Harmony approach conflicts with master
2022-03-09 19:34:39 +01:00
Maciej Janicki
5dc42c2be6 [MOS-296] Merge new master commits into merge-stable-wip
Merge new master commits
2022-03-09 19:32:59 +01:00
Maciej Janicki
2b2bb13a49 [MOS-296] Merge remote-tracking branch 'origin/stable'
Merge stable Harmony branch into merge wip branch
2022-03-09 19:27:50 +01:00
Adam Dobrowolski
b0c41d4ed4 [MOS-225] Restore SystemManager service idle priority
It crashes othervise on use of deleted elements
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
1fff92e9d6 [MOS-225] Review applied
As above.
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
d4d1344f0c [MOS-225] Fixed no response from SystemManager service
SystemManager service had implementation of bus processing
which never sent responses. This rendered any blocking call
to SystemManager useless
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
dd12853503 [MOS-226] Moved algorithms and their data to separate classes
This way we have controll over what does what, and can test
them separatelly
Logging statistics update more and better data presented
2022-03-04 07:05:02 +01:00
Maciej Gibowicz
2a11e4d6e3 [MOS-135] Proper system shutdown during restore
After the restore process is complete, the system shuts down
properly without any unexpected events.
2022-03-01 18:45:09 +01:00
Alek Rudnik
e0da78c9be [EGD-8193] Proper system shutdown durign update
Made sure all system is deinitialized during update.
Currently there are two exceptions: service eink and service
desktop. There are some issues with them but it should be fixed
in the near future
2022-02-22 09:42:12 +01:00
Adam Dobrowolski
30487c6008 [MOS-110] Statistics api for system
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.
2022-02-17 16:46:56 +01:00
Maciej Gibowicz
69e5fe5223 [MOS-144] Fix Increased CPU usage
On the locked screen, while refreshing the screen,
the CPU woke up to the maximum frequency,
which resulted in an increased power consumption.
2022-02-15 09:01:10 +01:00
Lucjan Bryndza
3596802273 [MOS-114] Frequency scalling skip 12MHz Level
Skip 12MHz freq level in the scaller
2022-02-14 11:59:46 +01:00
Lucjan Bryndza
ebc8e76a27 [MOS-114] CPU frequency scalling improvements
Add minimal frequency ~4Mhz, more aggressive CPU freq
optimizations.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2022-02-14 11:04:49 +01:00
Tomasz Rybarski
5f861a4c3f [BH-1372] Fix BellHarmony turn off
Fix BellHarmony turn off in Charging state
2022-02-02 12:00:19 +01:00
Maciej Gibowicz
69965aaa09 [EGD-8225] Fix incorrect logs of Power Manager Efficiency
After a longer time (~ 14 hours), the Power Manager
Efficiency logs showed incorrect values.
2022-02-02 09:10:25 +01:00
Pawel Olejniczak
6566ad7ae3 [CP-1007] Add API for rebooting to USB MSC mode
It will allow to reboot the device to USB MSC mode
without need to interact with a physical keyboard.
2022-02-01 15:26:20 +01:00
Lucjan Bryndza
c250230401 [EGD-8193] Revert proper system shutdown durign update
This reverts commit cc15dfdc3e.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2022-01-28 13:54:35 +01:00
Alek Rudnik
6aa54d4ad5 [EGD-8193] Proper system shutdown durign update
Made sure all services are deinitialized properly
2022-01-27 13:58:28 +01:00
Mateusz Piesta
c1391090c6 [BH-1389] Catch2 unit tests optimization
Removed redundant recompilation of catch2 main
resulted in over 20% speed up of unit tests compilation.
2022-01-26 15:04:23 +01:00
Maciej Gibowicz
0bc5db64a6 [EGD-8138] Software closing procedure improved
Release of resources and closing of all unfinished
services and workers.
2022-01-20 17:07:37 +01:00
Kuba
0bc4e6502b [EGD-8156] Fix cellular on system close whitelists
Service cellular is added to system close whitelists.
It prevents hard fault when cellular is blocked
on long command handler.
2022-01-17 12:52:34 +01:00
Alek Rudnik
9cf11913a1 [EGD-8129] Add atexit functionality
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.
2022-01-05 13:59:51 +01:00
Lucjan Bryndza
e9ee2af0dc [EGD-8131] Add Reboot/Poweroff for _platform_exit()
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>
2021-12-22 15:55:24 +01:00
Maciej Gibowicz
7f9bc6bf6f [EGD-7922] Added Permanent Frequency Setting
Added Permanent Frequency setting in Advanced Developer
Mode with simple set window.
2021-12-06 13:57:38 +01:00
Kuba
69cf2575cc [EGD-7909] Fixed phone mode switching
Service cellular is holding minimum cpu frequency during
phone mode switch.
2021-11-19 16:43:00 +01:00
Alek Rudnik
65d67e2690 [EGD-7948] Extend log dumping
Log are now dumped:
* on system shutdown including hard faults and aborts
* every 5 minutes

Fixed some logs
2021-11-16 17:56:28 +01:00
Alek Rudnik
1666429e07 [EGD-7584] Fix OS factory reset
There was an issue that we were deleting files which were still open.
Added removed of FI .indexed file.
2021-11-02 16:45:04 +01:00