Jiuzhu Dong
f35c6d7ef1
syslog/rpmsg: using up_putc to force flush syslog_rpmsg buffer
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-12-17 11:43:08 -06:00
Petro Karashchenko
51a2db6ffc
Kconfig: improve uniformity
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 07:32:48 -06:00
Xiang Xiao
69468b700d
libc: Move syslog_stream from nuttx/streams.h to drivers/syslog/syslog.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-14 00:51:59 -06:00
ligd
9a86aa7f77
syslog_rpmsg: fix typo
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
ligd
93426ca7cc
syslog_rpmsg: update syslog_rpmsg to support non-overwrite
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
ligd
5b369c5cec
libs/lbc: remove CHAR_BIT = 16 support
...
For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
Xiang Xiao
3d6a5a2d0d
syslog: Add [] around the prefix like others
...
make the output format consistent
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-11 10:08:32 -06:00
anjiahao
41c3b42468
change /dev/syslog & /dev/ramlog for unix standard
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-24 05:19:46 -06:00
ligd
ff0cd0baac
Revert "drivers/syslog: Call up_puts in syslog_default_write instad up_putc"
...
This reverts commit 174b240325
.
Revert "drivers/syslog: Ensure the buffer zero terminate"
This reverts commit 1692aa7894
.
2021-11-01 06:54:05 -05:00
Xiang Xiao
1692aa7894
drivers/syslog: Ensure the buffer zero terminate
...
This patch fix the regression by:
commit 174b240325
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Fri Sep 17 11:56:21 2021 +0800
drivers/syslog: Call up_puts in syslog_default_write instad up_putc
since some drivers(e.g. semihosting) have more fast implementation.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-21 08:44:44 -03:00
Xiang Xiao
174b240325
drivers/syslog: Call up_puts in syslog_default_write instad up_putc
...
since some drivers(e.g. semihosting) have more fast implementation.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-18 07:33:44 -03:00
Jiuzhu Dong
19cea67f3e
syslog: reslove crash because vmov.i32 instruction is not ready when system boot
...
So avoid to use vmov.i32 instruction before FPU is ready.
Before modification:
3c03b35c <nx_vsyslog>:
3c03b35c: f2c00010 vmov.i32 d16, #0 ; 0x00000000
3c03b360: f2c02050 vmov.i32 q9, #0 ; 0x00000000
3c03b364: e92d40f0 push {r4, r5, r6, r7, lr}
3c03b368: e24dd08c sub sp, sp, #140 ; 0x8c
3c03b36c: e28d301c add r3, sp, #28
3c03b370: e2505000 subs r5, r0, #0
3c03b374: edcd0b0f vstr d16, [sp, #60 ] ; 0x3c
3c03b378: edcd0b01 vstr d16, [sp, #4 ]
After modification:
3c03b35c <nx_vsyslog>:
3c03b35c: e92d40f0 push {r4, r5, r6, r7, lr}
3c03b360: e2505000 subs r5, r0, #0
3c03b364: e24dd08c sub sp, sp, #140 ; 0x8c
3c03b368: e1a06001 mov r6, r1
3c03b36c: e1a07002 mov r7, r2
3c03b370: e28d000c add r0, sp, #12
3c03b374: 1a00003a bne 3c03b464 <nx_vsyslog+0x108>
Change-Id: I643c19f5416c94a529764fdaa81f3088fcf95355
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 23:02:04 -07:00
David Sidrane
3e4b3ada5e
syslog:syslog_channel:Fix compiler warnings
...
syslog_channel.c:98:8: error: unknown type name 'sem_t'
syslog/syslog_channel.c:99:14: error: 'g_syslog_default_sem'
defined but not used
2021-07-14 17:38:30 -07:00
Jiuzhu Dong
0c3cb0cb66
syslog: optimize init logic for early buffer initialize
...
N/A
Change-Id: I3295803977fa51e8ed8dedf7f0966b9604f8204d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:10:13 -07:00
Jiuzhu Dong
4bb48892d0
ramlog: init head and tail when buffer is empty on boot
...
N/A
Change-Id: I6963ef6256c3a93ac7a63115c303033ceafa321f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:10:13 -07:00
Jiuzhu Dong
c8ce33c634
syslog/intbuf: output log when syslog interrupt buffer is full
...
N/A
instead of adding overrun memssage:"[truncated]\n" to the end.
Change-Id: Ie27cdf0ca902d9ba203619a95162f01222e371c5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-10 11:08:59 -07:00
Gustavo Henrique Nihei
d12619c85f
drivers/syslog: Avoid prepending process name when no TCB is available
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-08 21:13:36 -05:00
Nathan Hartman
ce20211357
Fix various typos in comments and documentation
...
Fix typos in these files:
* Documentation/components/drivers/character/foc.rst
* Documentation/guides/cpp_cmake.rst
* Kconfig
* arch/arm/src/imxrt/imxrt_lpspi.c
* arch/arm/src/kinetis/kinetis_spi.c
* arch/arm/src/kl/kl_spi.c
* arch/arm/src/lpc31xx/lpc31_spi.c
* arch/arm/src/nrf52/nrf52_radio.h
* arch/arm/src/s32k1xx/s32k1xx_lpspi.c
* arch/arm/src/stm32/Kconfig
* arch/arm/src/stm32/stm32_adc.c
* arch/arm/src/stm32/stm32_foc.c
* arch/arm/src/stm32/stm32_foc.h
* arch/arm/src/stm32/stm32_pwm.c
* arch/arm/src/stm32/stm32_spi.c
* arch/arm/src/stm32f0l0g0/stm32_spi.c
* arch/arm/src/stm32f7/Kconfig
* arch/arm/src/stm32f7/stm32_spi.c
* arch/arm/src/stm32h7/Kconfig
* arch/arm/src/stm32h7/stm32_allocateheap.c
* arch/arm/src/stm32h7/stm32_fmc.c
* arch/arm/src/stm32h7/stm32_fmc.h
* arch/arm/src/stm32h7/stm32_pwm.c
* arch/arm/src/stm32h7/stm32_qspi.c
* arch/arm/src/stm32h7/stm32_spi.c
* arch/arm/src/stm32l4/stm32l4_pwm.c
* arch/arm/src/stm32l4/stm32l4_spi.c
* arch/arm/src/stm32l5/Kconfig
* arch/arm/src/stm32l5/stm32l5_spi.c
* arch/renesas/src/rx65n/rx65n_dtc.c
* arch/renesas/src/rx65n/rx65n_usbdev.c
* arch/risc-v/src/rv32m1/rv32m1_serial.c
* boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c
* boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c
* boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c
* boards/arm/stm32h7/nucleo-h743zi2/README.txt
* boards/risc-v/rv32m1/rv32m1-vega/README.txt
* boards/sim/sim/sim/scripts/Make.defs
* drivers/1wire/1wire.c
* drivers/1wire/1wire_internal.h
* drivers/lcd/Kconfig
* drivers/syslog/ramlog.c
* fs/fat/Kconfig
* libs/libc/debug/Kconfig
* libs/libc/machine/Kconfig
* libs/libc/stdio/lib_libvsprintf.c
* libs/libc/stdlib/lib_div.c
* libs/libc/stdlib/lib_ldiv.c
* libs/libc/stdlib/lib_lldiv.c
* libs/libdsp/lib_observer.c
2021-07-04 11:23:26 -05:00
Jiuzhu Dong
817259ec2d
syslog/ramlog_channel: fix log confusion when multi task writing together
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-03 11:24:21 -05:00
Jiuzhu Dong
7fa69e4173
syslog/ramlog: get ramlog size by ioctl
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-03 11:24:21 -05:00
Jiuzhu Dong
b30bf4ff06
syslog/default_channel: fix log confusion when multi task writing together
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-03 11:24:21 -05:00
Jiuzhu Dong
a75b712e77
syslog: fix crash when print localtime by syslog
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-02 04:57:11 -05:00
ligd
5de150160f
syslog: add CPU id to system when open CONFIG_SMP
...
Change-Id: Ie8aaf44583ff4146b79b1392d1410b31806a81e8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:45:43 +09:00
Fotis Panagiotopoulos
b16de69e56
syslog: Added channel close callback.
2021-06-18 00:47:09 -05:00
Xiang Xiao
80157b8782
syslog/ramlog: Remove the duplication of \n->\r\n conversion
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5497f3ab40a55c5c08ba893e1186b93915cef03a
2021-06-17 06:22:28 -07:00
Fotis Panagiotopoulos
b73dc0f166
syslog: Added separator in file logs.
2021-06-09 10:09:04 -05:00
Xiang Xiao
5b2a17b892
Include assert.h in necessary place
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:06:08 -07:00
Fotis Panagiotopoulos
37ec290a11
Syslog file rotations number is configurable.
2021-06-08 04:12:48 -05:00
Fotis Panagiotopoulos
216194d31b
Added automatic log rotation, when log file is opened.
2021-06-03 15:57:28 -03:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Fotis Panagiotopoulos
e189d83e11
SYSLOG channel add functions return handle to the channel.
2021-06-03 08:36:15 -05:00
Jiuzhu Dong
ed6b257fa4
syslog: support ramlog, up_putc, rpmsg_syslog coexist
...
N/A
Change-Id: Ia58c7e195da7ad48f3018a131a78b2f01f94e741
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 08:45:20 -05:00
Jiuzhu Dong
01ff3604b0
syslog/Kconfig: support config multi syslog channel
...
delete choice for select syslog log device
Change-Id: Ifc02e687526506afac46febec375062949869356
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 08:45:20 -05:00
Jiuzhu Dong
e21fddbb34
syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer
...
The patch is related to: commit 5f7c98b6e1
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Mon May 17 22:38:22 2021 +0800
drivers/syslog: Remove emergstream implementation and caller
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 10:25:19 -03:00
Jiuzhu Dong
aeb7ed8c53
syslog/ramlog: initialize g_sysdev based on the current ramlog buffer
...
by ramlog_initbuf();
Algorithm: Scan the entire ramlog buffer, the position of the head
is the first byte is not empty and second byte is empty. The position
of the tail is the first byte is empty and second byte is not empty.
Change-Id: Ieb9161bd670481cd335e9a901287cd5e589f0849
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 15:16:45 -03:00
Jiuzhu Dong
ec38d0ce98
syslog/ramlog: save ramlog to fixed section
...
we can reload ramlog after hot reboot.
Change-Id: Iee7c105a2358075302121d6bf0047bc54d07e9a6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 15:16:45 -03:00
Jiuzhu Dong
4ae6862bbe
syslog: fix bug about syslog_default_write
...
Change-Id: I6d8b5bce8071f11b1903fe1fa0fe8dbc34bf3a09
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 12:44:17 -05:00
Xiang Xiao
5f7c98b6e1
drivers/syslog: Remove emergstream implementation and caller
...
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-18 09:26:28 -03:00
Jiuzhu Dong
ff567124d3
driver/syslog: add config SYSLOG_RPMSG_SERVER_NAME to
...
N/A
specified the name of remote proc(rpmsg server)
Change-Id: Ie270d651071e87a40a80ab489597ae18db9814f0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 09:39:57 -03:00
Fotis Panagiotopoulos
3543ac95bf
syslog_device: Device is re-opened in case of failure.
2021-04-10 06:47:44 -05:00
Fotis Panagiotopoulos
ee7276e7a7
syslog: syslog_device ops are handled internally by the driver.
2021-04-09 08:02:38 -05:00
Fotis Panagiotopoulos
ac7feda1bc
syslog: Proper uninit of syslog_device.
2021-04-07 08:38:53 -05:00
Fotis Panagiotopoulos
c4a9a35fb9
syslog: Fix in syslog_intbuffer flushing.
2021-04-06 10:26:55 -05:00
Fotis Panagiotopoulos
1dee243e29
syslog: Added multi device support in syslog_device.
2021-04-06 07:32:23 -05:00
Alin Jerpelea
08e5378b11
NuttX: Gregory Nutt: update licenses to Apache
...
Several licenses were missed in the initial work
David Sidrane has submitted the ICLA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 04:20:31 -07:00
Alin Jerpelea
0f41c3c555
NuttX: Pierre-Noel Bouteville: update licenses to Apache
...
Pierre-Noel Bouteville has submitted the ICLA and we can migrate the licenses
to Apache.
David Sidrane has submitted the ICLA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Fotis Panagiotopoulos
f13adbe4bb
Added support for multiple syslog channels.
2021-03-23 21:35:22 -07:00
Matias N
cf8521e6de
syslog: add option to prefix process name
2021-03-11 19:40:48 -03:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Alin Jerpelea
ccff570e6f
drivers: nxstyle fixes
...
nxstyle fixes to pass the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00