Commit Graph

45812 Commits

Author SHA1 Message Date
Masayuki Ishikawa
79e5579837 boards: sabre-6quad: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with QEMU and sabre-6quad board

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
Masayuki Ishikawa
d35b39b25a boards: spresense: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with spresense

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
Masayuki Ishikawa
50ad3d62aa boards: esp32-devkitc: Enable to test C++ static object in ELF
Summary:
- This commit enables to test C++ static object in ELF (hello++3)

Impact:
- elf defconfig only

Testing:
- Tested with both QEMU and esp32-devkitc board

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-22 21:38:17 +08:00
ligd
5b9a953381 local: fix nx_style
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
390de249a0 local: connect operation should jump self's connection
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
cd5ab80f2f local: server accept should wait client connect done
server:
at accept last nxsem_post(&client->lc_waitsem);

client:
connect wait(&client->lc_waitsem) then local_open_client_rx();

But if the server priority is higher then client,
and after server accept return, immediately call send().
At this time the client has no way do local_open_client_rx().
Then server send() return error.

Fix:
add lc_done sem to client

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
ligd
e489a308c8 local_socket: remove error log when use nonblock mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 14:07:12 +03:00
Xiang Xiao
4e92e32d7b libc/impure: Fix the inconsistence from the different toolchain
some toolchain provider remove const qualifier from global_impure_ptr
(e.g. Espressif) but other provider keep it(e.g. ARM or Cadence), so
let's define const to empty macro to pass the compile and more safety.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-22 11:02:48 +03:00
ligd
fe723f0715 sched_critmonitor: remove check zero in sched_critmonitor
Cause of up_perf_gettime() may return 0

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:15:06 +03:00
Jiuzhu Dong
40e86501f1 driver/ioe_rpmsg: split server and client ept_cb to simplify code
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 14:44:44 +08:00
Jiuzhu Dong
978530f5f6 fs/ioctl: add BLKSSZGET cmd to get block sector size
refer to:
https://sites.uclouvain.be/SystInfo/usr/include/sys/mount.h.html

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
Jiuzhu Dong
b385c48a30 fs/fs_fsync: add file sync operation by ioctl
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
ligd
8f54f9e1c3 sim: idle pm should do PM_RESOTRE in critical section
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 09:06:38 +03:00
Jiuzhu Dong
008cb0d31a sys/sysmacros.h: support sysmacros header
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 11:10:08 +08:00
Karel Kočí
3693d38763 drivers/lcd/st7789: update implementation of driver for ST7789
'putarea' function now has to select the appropriate values from the
whole frame buffer instead of the previous expectation of having just
specified rectangle passed to it.

This required extension of WRRAM handling function as we now are not
writing simply buffer but we want to skip some values and do that
multiple times. Having two implementation in this case is worst as this
function is actually called only twice in the whole code (thus making
dedicated function for every call if we would have two variants).
Calling `st7789_wrram` multiple times is not an option as command
ST7789_RAMWR resets the position and thus calling it multiple times just
overwrites the previous values.
2022-07-22 11:08:00 +08:00
Karel Kočí
fb0fdea4d4 include/nuttx/lcd: change meaning of buffer argument for putarea
The putarea documentation originally suggested that provided buffer
contains just the rectangle to be updated.
The commit 664d45dcba changed the expected
behavior for lcd_framebuffer but failed to propagate this change to the
driver's documentation. Now the expected behavior is that the whole
frame is passed in buffer and it is driver's responsibility to pick the
correct pixels according to the provided rectangle coordinates.

This change requires update of the LCD drivers if they implement this
function.
2022-07-22 11:08:00 +08:00
Alan Carvalho de Assis
a9d3e1bd08 lcd/apa102: Fix APA102 RGB LED Matrix interleaving issue
I found an issue in the APA102 framebuffer that wasn't spot
before by fb test because this application draw symetric squares

Normally in a display each line starts at left and increase to the
right, however for this APA102 matrix the next line starts at the
end of previous line and move the opposite direction, forming a
zig-zag pattern.
2022-07-22 11:05:32 +08:00
ligd
cda9cfbc80 unlink: don't do unlink with inode_semtake
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 11:00:26 +08:00
Fotis Panagiotopoulos
30f8d33bca Fixed path calculation in BBS RAM. 2022-07-22 10:59:57 +08:00
ligd
db08f3a723 sched: handle nxtask_setup_arguments return values
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:54:07 +08:00
ligd
1f854486c3 procfs: procfs_opendir should return fail if can't match
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
ligd
3bc2131918 irq_procfs: fix divide 0 error
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
ligd
df365008b2 arm_secure_irq: fix NVIC_IRQ_DBGMONITOR un-secure set failed
NVIC_DEMCR.SDME is a read-only bit

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 01:48:55 +03:00
ligd
3db8c2b6a6 stdio: need also flush stdio when flushall
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 01:46:21 +03:00
Xiang Xiao
d04ed9587b drivers/syslog: Call up_nputs in syslog_default_write
since the buffer may not be terminated by null

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-21 21:26:10 +03:00
Fotis Panagiotopoulos
66f49c1f3c mm: Fixed the usage of CONFIG_MM_BACKTRACE & CONFIG_DEBUG_MM. 2022-07-22 00:53:02 +08:00
Jiuzhu Dong
e7b8af7a35 driver/ramlog: set CONFIG_SYSLOG_DEVPATH to /dev/kmsg when enbale ramglog
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
af62e6cbfa driver/syslog: support syslog rpmsg server chardev
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
eedb774d68 driver/syslog: remove TRANSFER_DONE and sem wait when buffer is full
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
059114557f driver/syslog: support syslog output when buffer remaining space over 75%
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Jiuzhu Dong
664fcb2698 driver/syslog: support syslog rpmsg character buffer
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-21 23:40:56 +08:00
ligd
5c33db4220 syslog_rpmsg: head must bigger then tail when syslog_rpmsg_init
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-21 23:40:56 +08:00
Petro Karashchenko
2291f601ee arch/arm/samv7: fix SPI 16-bit transactions in DMA mode
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-07-21 23:26:20 +08:00
Xiang Xiao
1d43b4a4eb libc/stdio: Enable LIBC_FLOATINGPOINT by default if ARCH_FPU is enabled
and DEFAULT_SMALL is false

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-21 09:53:09 -04:00
anjiahao
2b65b46946 boardctl:add reset subreason restore factory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 20:48:56 +08:00
anjiahao
0b3fd3b0b5 serial:fix a compile bug
serial_io.c use pid,but the headfile Inconsistent macro definitions
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-07-21 10:01:44 +03:00
Abdelatif Guettouche
ae1cbc47ef esp32&c3/Kconfig: CONFIG_ESP32(C3)_WIRELESS doesn't need to be user
selectable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
20c6996e81 esp32c3/Kconfig: Don't select options already selected.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
4ccedb176e arch/esp32: Re-organise shared functions and options for ESP32 Wireless code
- Introduce the ESP32_WIFI option to replace the broader
ESP32_WIRELESS option.  ESP32_WIRELESS is used by both WIFI and BLE.

 - Move common functions from esp32_wifi_adapter to esp32_wireless.

 - Change the order of including the external libraries to avoid undefined references.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:02:28 +03:00
Abdelatif Guettouche
770147ffe3 arch/esp32: Introduce the ESP32_RTC option.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-07-20 22:01:25 +03:00
Xiang Xiao
63cb11cc72 libc/stdio: Support "long long" type if CONFIG_HAVE_LONG_LONG is enabled
but just format the low 32bits if CONFIG_LIBC_LONG_LONG isn't enabled to
avoid to expand the code space to much.
Note: the size will increase 192 bytes on stm32_tiny:nsh.
Before the change:
   text    data     bss     dec     hex filename
  41444     184    1656   43284    a914 nuttx
After the change:
   text    data     bss     dec     hex filename
  41636     184    1656   43476    a9d4 nuttx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-20 18:06:29 +03:00
Xiang Xiao
f9e3ef3464 Revert "libc/stdio: enable long long formating by CONFIG_HAVE_LONG_LONG"
This reverts commit b1c72c023c.
2022-07-20 18:06:29 +03:00
Masayuki Ishikawa
aecdcb316b Revert "binfmt: Fix memory leak in ELF loader"
This reverts commit 23d57be21b.
2022-07-20 15:34:58 +03:00
Jiuzhu Dong
43f0555bfb include/sensors/ioctl: remove duplication ioctl cmd
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-20 14:56:46 +03:00
Masayuki Ishikawa
23d57be21b binfmt: Fix memory leak in ELF loader
Summary:
- I noticed that the hello (ELF) application causes a memory leak.
- Finally, I found that the data section is not deallocated.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp, rv-virt:nsh64, sabre-6quad:netnsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-20 14:56:37 +03:00
Denis Tolstov
e937cfcbce net/slip: Rename and clarify orphaned Kconfig options 2022-07-20 13:17:09 +08:00
Alan Carvalho de Assis
9587e4a85e lcd/apa102: Add putarea() support for faster rendering 2022-07-20 11:52:22 +08:00
Jukka Laitinen
b10658653b fs/partition/fs_gpt.c: Fix compilation error
PRI?OFF macros are defined in inttypes, so include it

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-07-19 23:50:30 +08:00
Alan Carvalho de Assis
b3daaf765b drivers/lcd: Add support to use APA102 LED Matrix as LCD Display
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-07-19 18:50:04 +03:00
Xiang Xiao
463f321316 wireless/ieee802154: Don't set IFF_DOWN in mac802154netdev_register
since IFF_DOWN is only used for request, not for status. Instead,
IFF_UP should be used to query the netdev status. The IFF_DOWN
related macros are also removed to avoid the confuse.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-19 11:09:16 +03:00