Commit Graph

23 Commits

Author SHA1 Message Date
Lefucjusz
32c6769cb6 [BH-1657][BH-1833][BH-1854] Add WFI and SDRAM self-refresh mode
* Added mechanism enabling CPU to
enter WFI mode when the OS is
in idle, what results in large
power consumption reduction.
* Added mechanism to switch SDRAM to
self-refresh mode before entering
WFI, what resulted in further power
consumption reduction.
2024-01-22 12:32:35 +01:00
Lefucjusz
783ebcbb6c [MOS-183] Fix RT1051 debug build
Fix of multiple issues that resulted
in debug build failing.
2023-06-14 13:12:50 +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
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
Alek Rudnik
8cc1f779db [EGD-2489] Enable full newlib
Newlib nano is an optimized for size version of newlib libc library.
While newlib nano is smaller in size, it is also noticably slower than
the full version -
https://interrupt.memfault.com/blog/memcpy-newlib-nano

Moreover, full newlib provides native possiblity to printf 64-variables,
including double and float.

There was hard fault while trying to enable full newlib whithout
recompilling memcpy implementation with -mno-unaligned-access compile
option.
It was failing for missalinged memory access during memcpy.
Similar issue is described here -
https://bugs.launchpad.net/gcc-arm-embedded/+bug/1857469
2021-12-13 15:44:44 +01:00
Wojtek Rzepecki
1da915ace9 [BH-777] Add Bell specific ld script configuration
Added bell specific ld script configuration for
board memory layout
2021-08-18 08:40:44 +02:00
Marcin Smoczyński
8fbdd6ecc5 [EGD-7361] Fix not booting from image
After moving some files to libboard.a the linker was not eager to look
for symbols that should be in the boot header (.boot_hdr section).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-08-17 16:28:03 +02:00
Maciej Gibowicz
aea9e64bea [EGD-7088] SDRAM configuration on T7 board
Add configuration for new, increased to 64 MB SDRAM.
2021-07-15 17:02:37 +02:00
DariuszSabala
752033164f [BH-464] Moved USB stack to third-party dir
Moved USB stack, defined separate library and its dependencies,
assigned library to specific sections in linker script, reduced
build time by more than 10 percent thanks to ending building
usb stack file both in module-bsp and module-vfs
2021-06-29 16:40:55 +02:00
DariuszSabala
b95f902f7d [EGD-6916] Fixed makefile build linking issue
Changed the way libraries are linked to sections in the linker
script because linker couldnt find them and was silently failing.
2021-06-15 14:33:01 +02:00
Borys Jelenski
085bccb7a1 [EGD-6355] Adjust MuditaOS to be used with Secure Boot
The start address of the OS image adjusted to comply with HAB
Secure Boot. Proper SNVS initialization performed at system startup.
SNVS drivers updated to most recent version. Image signing can be
performed as a part of build process. See doc/secure_boot.md for
more info.
2021-04-22 15:02:59 +02:00
Artur Śleszyński
33d652c1a1 [EGD-6156] Create crash dumps
Integrate the CrashCatcher library in order to store phone state after
a fault occurs. The dumps are stored in the CrashCatcher hex format and
can be debugged using the CrashDebug stub built for x86_64 via the
'debug_crash_dump.sh' script.
2021-04-02 14:58:42 +02:00
Adam
07b243a084 Egd-3408 Rich text (#712)
* EGD-3408 gui::Text Rich text parser added with pugixml tree & tree walker

* EGD-3408 Fitted code in
2020-09-23 21:03:57 +02:00
Marcin Smoczyński
74e6a50989 [EGD-3714] rt1051: dtcm ld cleanup (#708)
There is a memory shortage in the DTCM region. In order to be able to
add new features linker script for the rt1051 needs to be cleanup.

A couple of issues has been fixed:
* double stack definition blocking 4kB
* excessive heap definition blocking 4kB
* a part of DTCM had not been used blocking 24kB.

Data has been split to user and system part, user data has been moved to
the SDRAM, therefore new data will be placed there. To place it inside
the MCU an explicit statement has to be used.

Added a basic description of memory layout and a couple of comments.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-09-18 11:30:11 +02:00
Marcin Smoczyński
c34f7ddb53 [EGD-2592] bsp: change heap and code size
Change SDRAM configuration from 4M for code and 13M (which is invalid)
for heaps to 6M for code and 10M for heaps.

Usermem heap's size has been decreased to 9M.

Use heap start symbol __sdram_cached_start for MPU configuration instead
of using magic values which are easy to miss when they are need to be
changed.

This change is required to be able to fit in libphonenumber.
2020-04-08 18:23:45 +02:00
Marcin Smoczyński
f9b4ebfba4 rt1051: merge text sections
Having one .text sections results in faster loading speed (currently 21
vs 44 seconds).
2020-04-07 22:39:26 +02:00
Alek-Mudita
9a1ef61bf3 [EGD-2534][fix] enable c++ exceptions (#145) 2020-01-28 16:20:58 +01:00
Mateusz
ca6fdc8950 Added OCRAM section to linker script with cache turned off. 2019-08-23 12:48:42 +02:00
Robert Borzecki
1e34c1b07d Memory access problem. 2019-06-12 10:44:33 +02:00
Mati
9b69f2b615 Changed memory layout, fixed cache problems 2019-05-27 22:09:53 +02:00
Mati
9da5a733d6 Reconfigured memory sections + necessary MPU changes 2019-05-22 10:51:34 +02:00
Mati
3c37533623 Removed unneeded OS_DATA section in linker script 2019-05-22 10:41:19 +02:00
Mati
4244f83d78 Working cross-compilation 2019-05-07 15:41:20 +02:00