Commit Graph

122 Commits

Author SHA1 Message Date
Lefucjusz
181feb4f40 cleanup 2024-08-20 15:40:34 +02:00
Dawid Wojtas
54bf8311b0 [BH-1770][BH-1677] Update fsl drivers
Now the system uses 2.14.0 version.
Add only necessary drivers:
- pit
- pmu
- rtwdog
- snvs_hp
- snvs_lp
- src
- trng
- wdog
- gpio
- gpt
- lpi2c
- lpuart
- lpuart_edma
- common
- common_arm
- dmamux
- edma
- flexram
- flexram_allocate
- clock
- cache
- CMSIS
- dcp
- iomuxc

Changed speed of the USDHC clock from ~109MHz to ~81MHz.
Also changed bus timing from kMMC_HighSpeedTiming to
kMMC_HighSpeed200Timing for better efficiency.
2024-02-21 18:58:12 +01:00
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
13269271e6 [MOS-998] Provide additional info in crashdump filename
Added info about product, OS version and
commit hash to crashdump filename to
simplify analysis of the crashdumps
without corresponding logs available.
2023-06-22 12:14:07 +02: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
Lefucjusz
ebcd139412 [CP-1962] Add Harmony color detection
* Added serial number based Harmony color
detection.
* Unified serial number handling for both
products.
2023-06-06 14:37:52 +02:00
Bartosz
a4406ec5a7 [MOS-783] Fixed tests and simulator for Harmony
Fixed tests and simulator for Harmony
after implementation of new filesystem
structure.
2023-01-19 16:41:56 +01:00
Lefucjusz
215e4d96b7 [MOS-783] Fixed Pure unit tests
Fixed (most of the) hardcoded
paths in Pure's unit tests.
2023-01-19 16:41:56 +01:00
Lefucjusz
afd7e7bc2c [MOS-783] Working Pure simulator after partition changes
Fixed iosyscalls so that Pure simulator
works after directory structure changes.
2023-01-19 16:41:56 +01:00
Lukasz Mastalerz
157cea8acb [CP-1512] Add crashdumps indexing
Adding indexing to crashdumps to to ensure resistance to the device date
retraction.
When max crashdump count reach the file with higher index number will be
remove.
2023-01-19 11:29:12 +01:00
Lukasz Mastalerz
00b2deac97 [CP-1512] Add information allowing identification to crashdump file
Add the serial number and generation timestamp to crashdump filename.
2023-01-10 09:16:42 +01:00
Lefucjusz
49e6eca966 [MOS-790] Workaround for ext4 booting
Workaround required to make MuditaOS
able to boot from ext4-formatted OS
partition.
Previously OS partition was mounted
on /sys and user partition on
/sys/user. This worked
when two separate FS drivers
(FATFS and lwext4) were used.
Changing OS partition to ext4
created an ambiguity whether
/sys/user is user partition
mountpoint or folder 'user'
on OS partition. This
workaround still may create
ambiguities, so the issue
should be fixed in one of
the further releases by
completely removing 'sys'
prefix.
2022-11-10 00:24:52 +01: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
Dawid Wojtas
34ca4a1bd0 [MOS-573] RT1051 and linux documentation
Created readme about files in directories. Also added
documentation on how to add or update syscalls wrappers.
2022-07-25 09:54:52 +02:00
Dawid Wojtas
58319eba9a [MOS-574] Fix GCC12 port
Add missing include file.
2022-06-24 11:23:43 +02:00
Dawid Wojtas
915f3334c3 [MOS-549] Linux simulator crashes on GCC12
Add wrapper for posix stat function
in order to invoke our implementation.
2022-06-23 16:45:40 +02:00
Dawid Wojtas
0a6799579e [MOS-534] Pure simulator crashes on startup fix
Fix missing syscall used by std::filesystem and update glibc version.txt
file.
2022-06-15 10:03:55 +02:00
Lucjan Bryndza
523eb6f577 [MOS-513] Fix issues related to the GCC12 gcc
Fix issues related to the GCC 12
Fix paths for ignore license headers
2022-06-02 13:24:09 +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
Lucjan Bryndza
22cf942253 [CP-670] Fix save crash dump
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>
2021-11-16 13:24:10 +01:00
Lucjan Bryndza
e00b5ef5a4 [CP-670] Fix crash dump creation on HF
Fix the crash dump on the disk partition
when phone firmware Hard Fault CM7 core
error.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-11-09 16:31:19 +01:00
Marcin Smoczyński
d6aa228726 [EGD-7770] Fix atomic stability
Add global __GTHREADS definition to trick standard library into thinking
we have a proper threading support and that it should not used single
threaded locking policies. As a result shared pointers will use atomic
locking policy to synchronize access to reference counter.

Add own version of gthr.h to override __gthread_active_p.

Add cxa guard and release for globs.

Looks like there was conflict when __GTHREADS was set so own version of
atomicity.h is removed.

Co-authored-by: Alek Rudnik <aleksander.rudnik@mudita.com>
Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
Tested-by: Alek Rudnik <aleksander.rudnik@mudita.com>
Tested-by: Tomasz Krosnowski <tomasz.krosnowski@mudita.com>
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-10-15 14:14:27 +02:00
Piotr Tański
1d2f5cf7a4 [EGD-7754] Dates bumped in disclaimers
Dates bumped from 2020 to 2021.
2021-10-11 19:08:26 +02:00
Lucjan Bryndza
ca75ebe449 [EGD-7587] Change user partition to ext4 fs
Add support for the EXT4 filesystem using LWEXT4
Add minor VFS fixes
Add unittest for the EXT4 partitions
Reformat partition for use EXT4 filesystem

[EGD-7587] Initial cmake of the ext4

[EGD-7587] Block driver for the ext4

Initial version of the block driver for the ext4 device

[EGD-7587] Initial version of the EXT4 fs support

Initial version of the ext4 filesystem support

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

[EGD-7587] Mount unmount initial unit tests

Mount and unmount initial unit tests

[EGD-7587] Unit tests and fixes for ext4

Unit tests and fixes for the ext4 partition

[EGD-7587[ adjust flags

Adjust ext configuration flags

[EGD-7587] Change to generate ext4 image

Change image generation script to generate ext4 image

[EGD-7584] Change cache memory settings

Change cache memory settings

[EGD-7587] Change create image flags

Change create image flags

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

[EGD-7587] Git change lwext4 to the mudita version

Change LWEXT4 to mudita version

[EGD-7587] Modify ext4 implementation

Modify ext4 implementation according to the new lwext4
mudita branch. Some issues were fixed in this branch

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>

[EGD-7587] Add to VFS rmdir syscall

Add to VFS missing rmdir for compliance POSIX std

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-10-07 14:39:28 +02:00
Jakub Pyszczak
d492c3646e [EGD-7548] Crash dump rotate
Added dumps rotation. Maximum count of the files set to 5.
The oldest dumps are removed if there're more than 5 of them.
Comparison is taken by the date.
Unified log and crash dumps rotators.
2021-10-04 16:32:34 +02:00
Marek Niepieklo
22a02078cd [CP-162] Implement Logs directory
Added listing of log/crash dump files
Reorg'ed log/crash dump files locations
Added harness api/device_info
Updated test and tool scripts
2021-09-29 10:37:58 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
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>
2021-09-23 15:14:40 +02:00
Marcin Smoczyński
e0fae087a6 [BH-908] Fix macros header location
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>
2021-09-22 10:26:32 +02:00
Lucjan Bryndza
72f7d7fa81 [EGD-7391] Fix random crash on idle
Add atomic primitives for fix
random crash on idle mode

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
(cherry picked from commit 7b75494ba5)
2021-09-15 19:18:58 +02: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
Marcin Smoczyński
b355d5ce00 [BH-733] Cleanup target dependencies
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>
2021-08-13 01:43:56 +02:00
Marcin Smoczyński
f54d400500 [BH-734] Add hardware board selection
To support bell hardware one needs to distinguish between the rt1051
generic target and product's boards.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-08-13 00:39:14 +02:00
Marcin Smoczyński
74ae1a6589 [EGD-7031] Remove UT deps to the production image
Remove dependency to the production image by creating separate sysroot
for test assets alongside with a test image Test.img.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-07-27 23:36:37 +02:00
Artur Śleszyński
202dd93064 [CP-261] Print crash occurences to log
Make sure we produce log entries when crashes occur.
2021-07-26 12:48:32 +02:00
Marcin Smoczyński
9267e2d871 [EGD-7161] Remove image name reference in vfs
Add ability to change an image name in the vfs code by decoupling vfs
from a so-called board code.

Introduce platforms as a hardware and os abstraction layer for product
code.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-07-21 12:53:47 +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
Mateusz Grzegorzek
58af354908 [EGD-6979] Fix for "Unable to catch hard faults on rt1051 via GDB"
`CrashCatcher_armv7m.S` wasn't properly linked to
`CrashCatcher::CrashCatcher`, which cause that HFs on rt1051
wasn't caught via GDB.
Added `CrashCatcherARM` library that solves
above issue.
2021-06-23 13:19:50 +02:00
Mateusz Grzegorzek
0684b1271b [BH-515] Create main Bell app
Create main Bell app
2021-06-15 16:02:40 +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
Radoslaw Wicik
943fef9643 [BH-353] Add Documentation for main targets
* clean up mimimu required cmake version
* fixes for release workflow

Add documentation for targets, fixes for cmake
and release workflow.
2021-06-11 09:07:41 +02:00
Lukasz Skrzypczak
7fee0d9cfb [BH-378] Utils move log to library
Moved log to separate library
2021-06-08 12:24:29 +02:00
Radoslaw Wicik
aa1ca514cb [BH-353] Add minimal build target for BH
Introducing changes required for adding BellHybird target without
removing PurePhone.
Adden new targets:
* Pure (builds PurePhone and PurePhone.img)
* Bell (builds BellHybird and BellHybird.img)
* [PurePhone|BellHybrid]-[UpdatePackage|StandaloneImage)
2021-06-07 17:05:29 +02:00
Wiktor S. Ovalle Correa
20180437c8 [EGD-6035] Fix support for glibc-2.32
GLIBC 2.32 doesn't work with changes made for 2.33.
2021-06-03 16:16:21 +02:00
DariuszSabala
e6e9a79fa5 [BH-397] Move TPLIB parallel-hashmap
Changed submodule directory and changed way its linked,
in order to use target_link_libraries checkouted phmap
dependency to the newest revision which includes small
cmake fixes (see 031d214f2ce1973933abdf2a998d986ff8094d8e),
updated paths in PureCoverage script and Doxyfile
2021-05-28 13:51:49 +02:00
Alek Rudnik
93c4675d1d [EGD-6701] System time usage fixes
Fixed all calls to stdlib time.
Removed all redundant calls to Timestamp treated as time source.
2021-05-27 16:54:44 +02:00
Mateusz Grzegorzek
798a2fb45a [BH-361] Move date to separate directory
Move date to separate directory
2021-05-25 10:21:46 +02:00