Commit graph

843 commits

Author SHA1 Message Date
Rodrigo Sim
a8ac255386 boards/arm/stm32f401rc-rs485: Add support to MAX31855 and MAX6675
This commit adds support for MAX31855 and MAX6675 thermocouple
sensors on the STM32F401RC-RS485 board via SPI1. It also updates
the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-27 10:04:03 -03:00
Rodrigo Sim
80e1f70832 boards/arm/stm32f4discovery: Add support to HX711 ADC
This commit adds support for the HX711 ADC in the STM32F4-Discovery
board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-27 17:43:19 +08:00
jingfei
db54331479 drivers/fs:Always use register_mtddriver() to register the MTD device (patch2)
This is a supplement to the patch:1936126210a56b6d1b033d6d940669413dd6e1b0

Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code.

So we have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize()  with register_mtddriver().
2025-07-21 15:15:30 -03:00
Alan Carvalho de Assis
54b2381c42 drivers/input: Create Single Button Multi Actions
This commit creates a sbutton device that uses a single button to
create a keyboard driver that returns TAB or ENTER depending how
long the user keeps the button pressed.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-15 18:39:59 -03:00
Rodrigo Sim
95c9525c0d boards/arm/stm32f401rc-rs485: Add support to HX711 ADC
This commit adds support for the HX711 ADC in the STM32F401RC-RS485
board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-07-12 12:26:07 +08:00
wangjianyu3
5079105e17 boards: net tcp backlog is enabled by default
The configuration NET_TCPBACKLOG is enabled by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-26 09:32:54 -03:00
raiden00pl
b37e8ecf3c boards/nucleo-f446re: fix adc example
fix adc example for nucleo-f446re:

- the second ADC channel should be different from first channel
- enable ADC SCAN mode so we get convertion on CH0 and CH1
- disable software trigger from application, we use hardware triggering
from timer

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-06-14 10:44:37 -03:00
dongjiuzhu1
3bc3092e6a fs/fs: remove unnecessary FS_REFCOUNT config
Previously, this config was added to ensure that the size of the struct
file remained unchanged, thereby preventing the Flash memory of
resource-constrained MCUs from being unnecessarily increased.

However, we have now refactored the relationship between struct fd and struct file,
reducing their memory footprint in both Flash and RAM.
Consequently, this config can be removed.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:42 +08:00
raiden00pl
0b3245f701 boards: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
Lars Kruse
3dc53adb28 arch | boards | drivers: fix whitespace issues for switch case statements 2025-05-23 10:48:41 +08:00
Lars Kruse
3ce85ca54e style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
William Yang
6633f9d907 boards/arm/nucleo-f429zi: Add example trace
Add example trace for board nucleo-f429zi

Signed-off-by: yangwei-x <yangwei3@lixiang.com>
2025-05-15 11:18:45 +08:00
Jukka Laitinen
c325ab98c4 boards/nucleo-f302r8/qenco: Disable CONFIG_LIBC_FLOATINGPOINT to free up flash space
The board has got only 64KB of flash, and is on the limit. Removing printf floating point
support frees up ~3kB of flash.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-08 16:00:05 +08:00
Rodrigo Sim
fb29f568d1 boards/arm/stm32f401rc-rs485: Add support to ST7735 LCD
This commit adds support for the LCD based on ST7735 controller on
the STM32F401RC-RS485 board and updates the board documentation accordingly.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-27 13:07:30 +08:00
dongjiuzhu1
c2abe4e994 boards/defconfig: remove unused config about dd
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:26 +08:00
chao an
52482219c8 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:22 +08:00
anjiahao
422c43949a binfmt:use crt0 inside of starthook
test:
1.use mps3-an547 build helloxx as module and run it
2.use qemu-armv7a:knsh test kernel build helloxx and run it

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
Rodrigo Sim
b28bb29bf9 boards/arm/stm32f401rc-rs485: Add support to BMP180 Sensor
This commit adds support for the BMP180 sensor on the
STM32F401RC-RS485 board and updates the board documentation
accordingly. It also enables the BMP180 UORB driver in the
STM32 common logic.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-04-07 10:45:05 +08:00
yangsong8
c4001b2433 Revert "boards/defconfig: remove fixed CDCACM BUFFER SIZE"
Use configuration CDCACM_DISABLE_TXBUF or CDCACM_DISABLE_RXBUF to choose
whether to use usb req buffer as the serial buffer. Since the default
value is n (not using req buf), the original configuration of buf is valid.

This reverts commit 21c8ed80bd.
2025-03-28 08:52:42 +08:00
Jukka Laitinen
b83493d8a0 Normalize defconfigs, remove CONFIG_PTHREAD_MUTEX_DEFAULT_PRIO_INHERIT=y
This is now default when CONFIG_PRIORITY_INHERITANCE=y

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-03-26 22:36:48 +08:00
raiden00pl
d9ee02bc2e boards/nucleo-f302r8: add rs485 support
add rs485 support for nucleo-f302r8 based on RS485 CAN Waveshare shield.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-24 20:25:29 +08:00
raiden00pl
6443b33a39 boards/nucleo-f302r8: add ADC support
Add ADC support for nucleo-f302r8.
CN8 pins 35, 36, 37 and 38 are used.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-24 20:24:57 +08:00
Yangwei
b03c367501 arm/nucleo-f429zi: Add board flash size config for STM32F429ZI
Add board flash size config to avoid build warning

Signed-off-by: Yang Wei yangwei3@lixiang.com
2025-03-15 13:37:46 +01:00
Rodrigo Sim
2e57ed24a7 boards/arm/stm32f401rc-rs485: Add support to GPIO
This commit adds support to GPIO Subsystem for STM32F401RC RS485 board.

Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2025-03-11 18:39:15 -03:00
yangsong8
21c8ed80bd boards/defconfig: remove fixed CDCACM BUFFER SIZE
Use usb req buf to replaced cdcacm rxbuffer and txbuffer,
so this macro is no longer needed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-03-05 12:52:00 -03:00
raiden00pl
38c348bf9a boards/b-g431b-esc1/cansock: enable SocketCAN utils
boards/b-g431b-esc1/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
3a0870df1c boards/nucleo-f446re/cansock: enable SocketCAN utils
boards/nucleo-f446re/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
425b2683cd boards/nucleo-f302r8/cansock: enable SocketCAN utils
boards/nucleo-f302r8/cansock: enable SocketCAN utils, so user can easly use CAN tools.

This board has only 64KB of FLASH which requires some additional optimization to fit CAN tools on it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
27dd63d147 boards/nucleo-g431rb/cansock: enable SocketCAN utils
boards/nucleo-g431rb/cansock: enable SocketCAN utils, so user can easly use CAN tools

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-17 14:13:29 +08:00
raiden00pl
107b37561b boards/nucleo-f303re: fix CAN bit timings
boards/nucleo-f303re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
a62078bb43 boards/b-g431b-esc1: fix CAN bit timings
boards/b-g431b-esc1: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
292906472e boards/nucleo-f446re: fix CAN bit timings
boards/nucleo-f446re: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
fa062daeec boards/nucleo-f302r8: fix CAN bit timings
boards/nucleo-f302r8: fix CAN bit timings, calculated with http://www.bittiming.can-wiki.info/

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
cbba667112 boards/nucleo-g431rb: fix CAN bit timings and unify bitrate
boards/nucleo-g431rb: fix CAN bit timings, calculated with https://phryniszak.github.io/stm32g-fdcan/

also update bit rate to 250000 so it's the same as for other stm32 boards

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-14 10:36:23 +01:00
raiden00pl
5b9d535ce6 boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface
boards/b-g431b-esc1: configure CAN_TERM pin also for SocketCAN interface

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-02-13 18:45:55 -03:00
4606f1f9e1 feat: drop legacy pinmap for nsh config
migrate from legacy pinmap for nucleo-f429zi board nsh config
2025-01-31 12:53:36 +08:00
11a47a4b0c boards/stm32/nucleo-f429zi: update netnsh defconfig
This PR updates the netnsh defconfig for nucleo-f429zi board, as currently the board would not get ip.
Few changes comes with this PR:
* enabled CONFIG_NETINIT_NOMAC option.
* enabled CONFIG_NETINIT_DHCPC and CONFIG_NETUTILS_TELNETD as I wanted to get a telnet shell and did not care about ip handling
* disabled legacy pinmap and updated the board.h config to get the board to compile
2025-01-31 12:53:36 +08:00
Xiang Xiao
4ef36cff80 boards: Renanme CONFIG_TESTING_SENSORTEST to CONFIG_SYSTEM_SENSORTEST
follow the change from: https://github.com/apache/nuttx-apps/pull/2976

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 02:24:38 +01:00
wangjianyu3
aa24051628 boards: Refresh configurations with refresh.sh
With patch https://github.com/apache/nuttx/pull/15531

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:08:28 +08:00
wangjianyu3
f3b31ef1df boards: Replace CONFIG_NSH_LINELEN with CONFIG_LINE_MAX
Details: https://github.com/apache/nuttx-apps/pull/2943

1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g'
2. ./tools/refresh.sh --silent --defaults all

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:07:58 +08:00
Huang Qi
cfd0cc0d1a Remove duplicate includes across multiple files
This commit cleans up redundant header file includes throughout the codebase.
 The changes include:

 - Removing duplicate #include directives that were present in the same file
 - Consolidating includes that were split across multiple lines unnecessarily
 - Removing unused includes that were no longer needed
 - Fixing some formatting issues with includes

 The changes improve code organization and maintainability by:
 - Reducing unnecessary dependencies
 - Making include dependencies more explicit
 - Following consistent include patterns
 - Removing dead code

 No functional changes are made - this is purely a code cleanup commit.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-09 23:30:23 +08:00
Yanfeng Liu
ae26129e6e stm32ldiscovery/chrono: add CONFIG_SLCD
This is to unblock CI check,
https://github.com/apache/nuttx/actions/runs/12628628318/job/35185115826

following suggestion per:
https://github.com/apache/nuttx/pull/15423#pullrequestreview-2530760373

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-06 22:11:54 +08:00
mazhuang
60683d7495 nuttx/boards/XXX/defconfig:DEV_ZERO is not set
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2024-12-30 22:22:29 +08:00
hujun5
46c2d46a6b use small lock in:
arch/arm/src/imxrt/imxrt_wdog.c
arch/arm/src/kinetis/kinetis_edma.c
arch/arm/src/lc823450/lc823450_dvfs2.c
arch/arm/src/lc823450/lc823450_timer.c
arch/arm/src/lpc54xx/lpc54_lowputc.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-23 15:01:08 +08:00
hujun5
8411a97b85 use small lock in following files
arch/xtensa/src/esp32s3/esp32s3_rtc_lowerhalf.c
arch/z16/src/z16f/z16f_serial.c
arch/z80/src/z8/z8_serial.c
boards/arm/max326xx/max32660-evsys/src/max326_button.c
boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c
drivers/i2c/i2c_bitbang.c
drivers/power/supply/act8945a.c
drivers/serial/uart_pci_16550.c
drivers/serial/uart_pl011.c
drivers/wireless/bluetooth/bt_uart_shim.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:43:26 +08:00
hujun5
48c439190d fix compile erorr
chip/stm32_gpio.c:44:11: note: '#pragma message: CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py'
   44 | #  pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
      |           ^~~~~~~
CC:  pthread/pthread_mutexconsistent.c In file included from chip/stm32_flash.c:40:
chip/stm32f20xxf40xx_flash.c:53:4: warning: #warning "Default Flash Configuration Used - See Override Flash Size Designator" [-Wcpp]
   53 | #  warning "Default Flash Configuration Used - See Override Flash Size Designator"
      |    ^~~~~~~
board/stm32_ethernet.c:84:19: warning: 'g_phy_lock' defined but not used [-Wunused-variable]
   84 | static spinlock_t g_phy_lock = SP_UNLOCKED;
      |                   ^~~~~~~~~~
LD: nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-20 14:09:34 +08:00
hujun5
5d68ab635c remove big lock in arch_phy_irq
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 23:28:18 +08:00
simbit18
88239153b8 [sensors]: Removed the unnecessary inclusion of spi header files
- ina219
- apds9960
- veml6070

these sensors use i2c serial communication protocol
2024-12-10 21:59:31 +08:00
simbit18
11f412b7af fix nxstyle
Removed extra spaces from .h and .c files
2024-12-10 01:29:00 +08:00
hujun5
0e1b432dd0 armv7/8m: fix regresion from https://github.com/apache/nuttx/pull/14881
reason:
svc call may trigger hardfault

Background
    The origin of this issue is our desire to eliminate the function of storing
"regs" in g_current_regs and instead utilize (*running_task)->xcp.regs for storage.
The benefits of this approach include faster storage speed and
avoiding multiple accesses to g_current_regs during context switching,
thus ensuring that whether returning from an interrupt or an exception,
we consistently use this_task()->xcp.regs

Issue Encountered
    However, when storing registers, we must ensure that (running_task)->xcp.regs is invalid
so that it can be safely overwritten.
According to the existing logic, the only scenario where (running_task)->xcp.regs
is valid is during restore_context. We must accurately identify this scenario.
Initially, we used the condition (running_task)==NULL for this purpose, but we deemed
this approach unsatisfactory as it did not align well with the actual logic.
(running_task) should not be NULL. Consequently, we adopted other arch-specific methods for judgment,
but due to special logic in some arch, the judgment was not accurate, leading to this issue.

Solution:
    For armv6-m, we haven't found a more suitable solution, so we are sticking with (*running_task)==NULL.
    For armv7-m/armv8-m, by removing support for primask, we can achieve accurate judgment.

    PRIMASK is a design in armv6-m, that's why arm introduce BASEPRI from armv7-m.
It's wrong to provide this option for armv7-m/armv8-m arch.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-09 12:20:13 +08:00