Samsung / TizenRT

TizenRT is a lightweight RTOS-based platform to support low-end IoT devices
Apache License 2.0
561 stars 560 forks source link

os/board/rtl8730e: Support CMSIS-DSP #6261

Open ZhenBei-Sin opened 1 week ago

ZhenBei-Sin commented 1 week ago

[build/configs/rtl8721csm: Clean up CMSIS-DSP] [os/board/rtl8730e: Clean Up Makefile] [configs/rtl8730e/flat_dev: Enable CMSIS-DSP by default] [external/include/cmsis_nn: Move CMSIS-NN header files to external] [external/include/cmsis_dsp: Move CMSIS-DSP header files to external] [external/cmsis_dsp: Support CMSIS-DSP for rtl8730e]

edwakuwaku commented 1 week ago

Hi @ZhenBei-Sin , please add memory usage (ie. both flash and ram) when applying cmsis-dsp library

ZhenBei-Sin commented 1 week ago

Hi @ZhenBei-Sin , please add memory usage (ie. both flash and ram) when applying cmsis-dsp library

The library's memory usage change when its functions are invoked or called by an application. So, it should be take care by Samsung side.

Please refer for the below result:

flat_apps without CMSIS-DSP ========== Size Verification of built Binaries ========== Type Binary Size Partition Size used(%) KERNEL 1,500,402 bytes 7,204,864 bytes 20.82% PASS => Size verification SUCCESS!! The size of all binaries are OK.

flat_apps with Enable External to Link CMSIS-DSP KERNEL size NO changes. External Libraries > [*] CMSIS DSP library ========== Size Verification of built Binaries ========== Type Binary Size Partition Size used(%) KERNEL 1,500,402 bytes 7,204,864 bytes 20.82% PASS => Size verification SUCCESS!! The size of all binaries are OK.

flat_apps with Enable External to Link CMSIS-DSP & Enable CMSIS-DSP example External Libraries > [] CMSIS DSP library Application Configuration > Examples > Board Specific Demos > [] CMSIS DSP example ========== Size Verification of built Binaries ========== Type Binary Size Partition Size used(%) KERNEL 1,595,770 bytes 7,204,864 bytes 22.15% PASS => Size verification SUCCESS!! The size of all binaries are OK

sunghan-chang commented 1 week ago

.a is in the external, but headers are in arch. Is that a part of arch or external? The arch is kernel but the external is user.

sunghan-chang commented 1 week ago

build/configs/rtl8730e: Add config for support CMSIS-DSP I can't get what is changed from the title. How about configs/rtl8730e/flat_dev: enable CMSIS-DSP by default? Even the commit has changes in other defconfigs, it just adds disabled (no operation change). So above would be ok I think.

ZhenBei-Sin commented 1 week ago

.a is in the external, but headers are in arch. Is that a part of arch or external? The arch is kernel but the external is user.

Hi @sunghan-chang , Due to the starting phase for support cmsis, I put the cmsis headers file under the arch folder. Recently, I was referred to Samsung's team members commit to moving it to the External path for support cmsis.

For better maintenance, yes. We should move it to be under the External path. But...... May Samsung advise on howthe link or method to include the header file located at the External path for flat_apps and loadable_apps for the example.

include <> ?

Thank You.

ZhenBei-Sin commented 1 week ago

build/configs/rtl8730e: Add config for support CMSIS-DSP I can't get what is changed from the title. How about configs/rtl8730e/flat_dev: enable CMSIS-DSP by default? Even the commit has changes in other defconfigs, it just adds disabled (no operation change). So above would be ok I think.

Done changed the commit message.

sunghan-chang commented 1 week ago

.a is in the external, but headers are in arch. Is that a part of arch or external? The arch is kernel but the external is user.

Hi @sunghan-chang , Due to the starting phase for support cmsis, I put the cmsis headers file under the arch folder. Recently, I was referred to Samsung's team members commit to moving it to the External path for support cmsis.

For better maintenance, yes. We should move it to be under the External path. But...... May Samsung advise on howthe link or method to include the header file located at the External path for flat_apps and loadable_apps for the example. #include <> ?

Thank You.

https://github.com/Samsung/TizenRT/blob/master/build/configs/rtl8730e/Make.defs#L82C3-L85C106 You can find the include paths here. For example, to include https://github.com/Samsung/TizenRT/blob/master/external/include/mbedtls/aes.h, you can do as below.

#include <mbedtls/aes.h>

external/include/ path is in the Make.defs so that you can write remain path in the including.

If you add cmsis-dsp headers like external/include/cmsis-dsp/amebasmart/aa.h, we can include it as below

#include <cmsis-dsp/amebasmart/aa.h>

But I don't know the chipset name is necessary in the path.

The including is the same for both, the flat and the loadable. But the external is user context so that kernel (os folder) should not call the function.

ZhenBei-Sin commented 1 week ago

.a is in the external, but headers are in arch. Is that a part of arch or external? The arch is kernel but the external is user.

Hi @sunghan-chang , Due to the starting phase for support cmsis, I put the cmsis headers file under the arch folder. Recently, I was referred to Samsung's team members commit to moving it to the External path for support cmsis. For better maintenance, yes. We should move it to be under the External path. But...... May Samsung advise on howthe link or method to include the header file located at the External path for flat_apps and loadable_apps for the example. #include <> ? Thank You.

https://github.com/Samsung/TizenRT/blob/master/build/configs/rtl8730e/Make.defs#L82C3-L85C106 You can find the include paths here. For example, to include https://github.com/Samsung/TizenRT/blob/master/external/include/mbedtls/aes.h, you can do as below.

#include <mbedtls/aes.h>

external/include/ path is in the Make.defs so that you can write remain path in the including.

If you add cmsis-dsp headers like external/include/cmsis-dsp/amebasmart/aa.h, we can include it as below

#include <cmsis-dsp/amebasmart/aa.h>

But I don't know the chipset name is necessary in the path.

The including is the same for both, the flat and the loadable. But the external is user context so that kernel (os folder) should not call the function.

Hi @sunghan-chang ,

Thank you for providing the useful information and guidance. I made the changes based on your suggestions and verified that it works well. CMSIS header files for amebad and amebasmart are same, so will be remain one only.

Thank You :100:

sunghan-chang commented 1 week ago

@vibhor-m @Taejun-Kwon Could you check this PR for CMSIS-DSP?