Source code under `newlib/newlib/newlib/libm/machine/$(ARCH)/*.c`
should be added before common source code from `../../common/*.c`.
Take `newlib/newlib/newlib/libm/machine/riscv/s_fma.c` as an
example:
```
double
fma (double x, double y, double z)
{
double result;
asm ("fmadd.d %0, %1, %2, %3" : "=f" (result) : "f" (x), "f" (y), "f" (z));
return result;
}
```
Note that the common `s_fma.c` will be included by the source file
directly. The order of adding the files to CSRCS matters here.
Although the CMake-based build system does not have the same build
problem of including the a source-file with the same in the wrong
order, this commit also changes the order of inclusion for CMake
too to keep it consistent.
Fix CMake-based build system to include the toolchain's libm only
when `CONFIG_LIBM_TOOLCHAIN` is selected. Before this commit, if
the user selected `CONFIG_LIBM_NEWLIB`, for instance, the build
system would still link the toolchain's libm functions instead of
the ones provided by newlib.
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete.
Therefore, we need to rename up_set_current_regs to better reflect its actual meaning,
which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Convenient for qemu debugging and adding ci check
We can learn to use the following command to mount 9pfs on qemu64:
qemu-system-aarch64 -cpu max -nographic \
-machine virt,virtualization=on,gic-version=3,mte=on \
-fsdev local,security_model=none,id=fsdev0,path=/xxxx -device virtio-9p-device,id=fs0,fsdev=fsdev0,mount_tag=host \
-chardev stdio,id=con,mux=on, -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx/nutt
mkdir mnt
mount -t v9fs -o trans=virtio,tag=host mnt
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Add an option to use HSE on the Nucleo-H563ZI with board modification. This is enabled through board Kconfig.
It supplies the same PLL output frequencies using the HSE instead of HSI, for significantly more precise clocks.
The feature of preventing the same ID frame rotation should be done in the lowerhalf, not in the upperhalf.
Signed-off-by: gaohedong <gaohedong@xiaomi.com>
Adding the STM32H5 FDCAN Hardware definitions. The register set is identical to the STM32G4. No major changes other than changing G4 to H5 and removing ifdef requirement for STM32G4.
Fixed style issues
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete. Therefore, we need to rename up_set_current_regs to better reflect its actual meaning, which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Errors
1. Not return int value
usbmsc_main.c: In function 'msconn_main':
usbmsc_main.c:645:55: error: expected expression before ';' token
645 | ret = usbtrace_enumerate(usbmsc_enumerate, NULL);
2. Error argument number
CC: usbmsc_main.c usbmsc_main.c: In function 'msconn_main':
usbmsc_main.c:645:54: error: macro "usbtrace_enumerate" passed 2 arguments, but takes just 1
645 | ret = usbtrace_enumerate(usbmsc_enumerate, NULL);
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
CC: mqueue.c common/riscv_exit.c: In function 'up_exit':
common/riscv_exit.c:65:33: error: 'tcb' undeclared (first use in this function); did you mean 'tcb_s'?
65 | g_running_tasks[this_cpu()] = tcb;
| ^~~
| tcb_s
Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason:
simplify context switch
sys_call0(SYS_switch_context)
sys_call0(SYS_restore_context)
size nuttx
before
text data bss dec hex filename
187620 1436 169296 358352 577d0 nuttx
after
text data bss dec hex filename
187576 1452 169280 358308 577a4 nuttx
size reduce -44
Signed-off-by: hujun5 <hujun5@xiaomi.com>
1.make the generation sequence of etc romfs no longer bound to the board
2.RCRAWS RCSRCS can be added from any directory
3.enable dynamic files, files generated during the compilation process,
and ensure the correct time order
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
EEFC read sequence requires read length in words instead of bytes,
therefore bytes given by the user has to be recalculated to words.
The calculation however had a mistake in brackets and was just adding
1 to buflen instead of recalculating it to 4 byte words. This caused
global array g_page_buffer to overflow for some reads.
This fixes the calculation.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Fix the compilation error:
audio/wm8994.c: In function 'wm8994_audio_output':
Error: audio/wm8994.c:1898:3: error: implicit declaration of function 'up_mdelay' [-Werror=implicit-function-declaration]
1898 | up_mdelay(40);
| ^~~~~~~~~
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
reason:
simplify context switch
sys_call0(SYS_switch_context)
sys_call0(SYS_restore_context)
size nuttx
before
text data bss dec hex filename
148021 921 26944 175886 2af0e nuttx
after
text data bss dec hex filename
147995 921 26928 175844 2aee4 nuttx
size reduce -42
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Fix ps command reports wrong running stack corruption.
To get running tcb registers, need to read from frame register not the tcb context.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>