Commit Graph

210 Commits

Author SHA1 Message Date
Tomasz 'CeDeROM' CEDRO 2ed9bd5e71 boards/nucleo-l432kc: Add internal DAC code.
* Nucleo-L432KC board was missing internal MCU DAC code.
* DAC is now available on PA4/A3 and /dev/dac0 when enabled.
* Updated info on ADC inputs (PA6/A5,PA7/A6) depending on configuration.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2024-10-19 12:29:49 +02:00
guoshichao 4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +08:00
Rodrigo Sim ea5bb64f42 nucleo-l432kc: Revert the USART2 config to be use by virtual COM port
This reverts commit 60236ce94d and fix
the issue reported by https://github.com/apache/nuttx/issues/13061.

Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-08-21 10:47:37 +08:00
cuiziwei e21885b84a nuttx/boards:Uniform initialization format for init_array.
(1) Keep the `.init_array` and `.ctors` symbols and sort them according to their initialization priority.
(2) Exclude symbols ending with crtend.* and crtbegin.* to support c++
application.if we not exclude crtend.* crtbegin.* frame_dummy will be
added when enable any c++ application with global variables, this symbol
execution is problematic, removing it does not affect the application.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 19:48:32 +08:00
Huang Qi 78743e4055 Fix some style issues
Modified files:
- boards/arm/cxd56xx/spresense/src/cxd56_clock.c
- boards/arm/sama5/giant-board/include/board.h
- boards/arm/stm32l4/b-l475e-iot01a/include/board.h
- boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3-devkit-rust-1.h
- boards/sim/sim/sim/src/dummy.c
- drivers/wireless/spirit/lib/spirit_radio.c
- include/nuttx/modem/u-blox.h

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-27 22:57:32 +08:00
Ivan Palijan 87d038c583 Fixed collision between CAN1 and I2C1. Board nucleo-l476rg.
CAN1 moved to PA11 and PA12.
2024-05-20 10:14:42 +08:00
Ivan Palijan fcbae598e4 Added support in Nucleo-L476RG board for MPU9250 sensor. 2024-05-15 23:54:30 +08:00
Ivan Palijan 6e941aed8b Added support in Nucleo-L476RG board for BMP280 sensor. 2024-05-07 02:14:15 +08:00
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
Rodrigo Sim 7b9b630073 nucleo-l432kc: Fix board configuration for USART2 2024-01-07 17:12:15 -08:00
Daniel P. Carvalho f0bc20c815 Fix I2C1 pinout. 2023-09-22 00:54:07 +08:00
cuiziwei 4ec7af779d nuttx/boards:init_array.* needs to be executed in order
When I try to set priorities in certain programs, such as init_priority(HIGH_PRIORITY), I've noticed that during linking, there's no guarantee that the programs will be compiled in the sequence I've specified based on priority. This has led to some runtime errors in my program.

I realized that in the ld file, when initializing dynamic arrays, there's no assurance of initializing init_array.* before init_array. This has resulted in runtime errors in the program. Consequently, I've rearranged the init_array.* in the ld file of NuttX to be placed before init_array and added a SORT operation to init_array.* to ensure accurate initialization based on priorities during linking.
2023-08-29 22:54:37 +08:00
raiden00pl c3f8753ecd Documentation: migrate STM32L4 2023-08-24 17:56:39 +08:00
cuiziwei 25eb09c3bb nuttx/boards:add KEEP to *(.init_array .init_array.*)
replace *(.init_array .init_array.*) with KEEP(*(.init_array .init_array.*)).

The KEEP statement within a linker script will instruct the linker to keep the specified section, even if no symbols inside it are referenced. This statement is used within the SECTIONS section of the linker script. This becomes relevant when garbage collection is performed at link time, enabled by passing the --gc-sections switch to the linker. The KEEP statement instructs the linker to use the specified section as a root node when creating a dependency graph, looking for unused sections. Essentially forcing the section to be marked as used.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-05 05:02:25 -07:00
Xiang Xiao abfe082a6f Kconfig: Simplify the conditional default statement
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-16 14:39:20 -03:00
Petro Karashchenko dcd26ac6b2 sdcard: update sdcard detection to avoid 0xff assignment to bool type
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 12:55:29 +08:00
Xiang Xiao 7990f90915 Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 09:52:08 -03:00
Xiang Xiao 7a8cf7ff70 Indent the include statement by two spaces
follow the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-16 12:34:32 -03:00
Xiang Xiao 6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Xiang Xiao 9b4ea90f5c boards: Remove signal number from README.txt
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-26 08:31:36 -06:00
Xiang Xiao 2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
chao an 3a0fdb019d nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:05:44 +08:00
Alan Carvalho de Assis f0289577bf boards: Update all boards config after updating NSH_CMDPARMS 2023-01-23 03:04:51 +08:00
Xiang Xiao 6b31918b42 Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 08:51:45 +02:00
Xiang Xiao 78f6a02bc8 boards: Remove the duplicated prototype of CONFIG_INIT_ENTRYPOINT
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:02:44 +02:00
Xiang Xiao 2a574427c6 boards: Remove CONFIG_NETDEVICES=y from board defconfig
since it's enabled by default now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-01 19:12:15 +02:00
Xiang Xiao bdeaea3742 Remove the unnessary empty line after label
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00
Xiang Xiao 70290b6e38 arch: Change the linker generated symbols from uint32_t to uint8_t *
and remove the duplicated declaration

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-24 21:26:56 +02:00
chao an 0f0a94186f arch/arm/toolchain: migrate the toolchain define to arch/arm/Kconfig
migrate the toolchain define to arch/arm/Kconfig to simplify new toolchain registration

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-16 14:47:27 +08:00
Amir Melzer 5e22dcb73b modify clock config 2022-09-08 20:55:53 +08:00
Daniel P. Carvalho 95d91ef906 STM32L4 ADC: Update configuration file 2022-08-18 11:26:25 -03:00
Daniel P. Carvalho dbb82c3191 NUCLEO-L432KC: Added sinusoidal DAC wave generator example 2022-08-02 10:43:59 +08:00
zhuyanlin 031c89db89 power: add PM_IDLE_DOMAIN to pm.h and remove definations
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-07-29 11:15:40 +08:00
simbit18 0fddf71b2d Update stm32_bmp180.c 2022-07-26 08:43:36 -04:00
raiden00pl 0fe378621e boards: add initial support for ST steval-stlcs01v1 2022-07-23 16:51:31 -03:00
Jeonghyun Kim 4058f01faf Correct code formatting 2022-06-07 03:20:57 +08:00
Jeonghyun Kim f53792fea0 board: nucleo-l432kc: Add spi driver registering function and Make it is called on appinit. 2022-06-07 03:20:57 +08:00
Jeonghyun Kim 1717ffdb38 chip: stm32l4: Register spi character driver when both spi port and driver available 2022-06-07 03:20:57 +08:00
Jeonghyun Kim f7295dd434 board: nucleo-l432kc: Add missing TIM1 CH3, CH4 pin definition 2022-06-07 03:20:57 +08:00
Xiang Xiao 1f920e55d3 Move warning option from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao 06e36f6a13 boards/b-l475e-iot01a: Fix selects WL_SPIRIT which has unmet direct dependencies (DRIVERS_WIRELESS && ALLOW_BSD_COMPONENTS)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-11 17:39:33 +09:00
Xiang Xiao a3c9b413d8 arch/arm: Remove FAR and CODE from board folder(2)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-03 16:50:52 +03:00
Xiang Xiao aeb9c5d822 boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs
and migrate MAXOPTIMIZATION into ARCHOPTIMIZATION

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 11:36:41 +03:00
Xiang Xiao b12c0a1e31 boards: Remove -std=c++1x from Make.defs
let the implementation of standard library choice what they want

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-29 21:08:14 -03:00
Xiang Xiao 7f91fcdf89 boards/arm: Remove the unneeded C++ config from stm32l4/nucleo-l476rg
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-29 21:08:14 -03:00
Xiang Xiao 8f8ee25a9c boards: Move -g from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 16:23:03 +03:00
Xiang Xiao 75326e563d boards: Move -fno-common from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 07:57:29 +03:00
chao.an 1c8e12406e compile/opt: add config DEBUG_LINK_MAP
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
when linking NuttX ELF. That file can be useful for verifying
and debugging magic section games, and for seeing which
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-22 01:37:23 +08:00
Jiuzhu Dong de1c184e6c boards/sim: support rc.sysinit
Follow: http://glennastory.net/boot/sysinit.html

This is first script that init runs is rc.sysinit. This
script does serval initialization tasks about basic service.

The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(Peripherals driver, core driver, ...)->
	run rcS script(mount fs, run service) ->
	    board_appinitialize->

After this patch:
The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(core driver,...)->
	run rc.sysinit script(mount fs, run core service) ->
	    board_appinitialize(Peripherals driver)->
		run rcS script(run other service)->

So, Peripheral drivers can do more with the file system and
core services.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-21 12:54:53 +03:00
Alin Jerpelea fbaa259298 arch: arm: stm32: Add Apache license to files
In the initial contribution those files were missing the license

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-04-20 21:05:45 +08:00