Commit Graph

22 Commits

Author SHA1 Message Date
guoshichao 4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +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
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 00db279c00 Documentation: migrate STM32F4 2023-08-24 12:07:40 -03: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 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
chao an e942a7c55e build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:07:46 +08:00
Alan Carvalho de Assis eef1c4697e nucleo-wl55jc: remove duplicated peripheral placed manually 2023-01-23 03:04:51 +08:00
Xiang Xiao a7b3217c37 boards/arch: Remove FAR from 32bit/64bit arch
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-16 10:22:12 +02:00
Michał Łyszczek 71d4573cc3 boards/stm32wl5: simplify Makefile
Remove ifeq and endif and replace them with CSRC-$(CONFIG) form.
This simplifies Makefile and makes it a tiny bit more readable.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek 3e43128f07 boards/stm32wl5jc: add support for board ipcc
Allows to easily enable and configure ipcc for board.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek dcc2499926 boards/stm32wl5jc: add support to enable CPU2 booting at startup
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Nathan Hartman dd718e78f7 Fix typos 2022-08-07 23:33:19 +08:00
Michał Łyszczek a1aee22a4f boards/stm32wl5/flash: define default procfs mountpoint
When nsh is not enabled, CONFIG_NSH_PROC_MOUNTPOINT is not defined.
If in that case procfs is used, compilation will result in error.

Define sane default path for procfs in case nsh is not enable but
procfs is.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 10:44:50 +08:00
Michał Łyszczek d8b214ce9a boards/stm32wl5/flash: fix invalid #ifdef config to enable flash
Invalid #ifdef macro results in flash never being used.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 10:44:50 +08:00
Michał Łyszczek 7cb421e866 boards/stm32wl5/flash: add support to define bootloader partition
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 10:44:50 +08:00
Michał Łyszczek 5e75dd9be3 boards/stm32wl5/flash: add missing {} to struct init
When CONFIG_ARCH_BOARD_FLASH_CPU2_PROG_SIZE is bigger than 0, compilation
will fail because of missing "{}" in struct initialization.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 10:44:50 +08:00
Michał Łyszczek d11816cc39 boards/stm32wl5/flash: silent compiler warnings
If not all partitions are defined in Kconfig, compiler may show -Wundef
warnings for each: "#if CONFIG_ > 0". Fixed by defaulting values to 0
if they are undefined.

Some variables may be unused if filesystems are not enabled in Kconfig.
These variables are marked as UNUSED() to silent compiler warnings.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-07-29 10:44:50 +08:00
Adam Kaliszan fafe91cec6 Nucleo Wl55JC board supports E-ink display
All works
SPI pinouts is arduino compatibile
Additional lines for display are configurable using make menuconfig
2022-06-30 15:36:25 +08:00
Michał Łyszczek 4d4566e9ed nucleo-wl55jc: add partition table support for progmem FLASH
This patch adds working integration of progmem FLASH. User can partition
internal FLASH memory to up to 4 partitions and use any combination of
raw, nxffs, smartfs and mtd_config filesystems (unless there are other
limitations like nxffs supports only single instance).

Support for dual CPU is added to Kconfig to not overwrite CPU2 program code.

Code guards user to not allocate more memory than there is on FLASH, and
warns user if not all FLASH memory is used. Errors will be printed when
user tries to initialize two instances of nxffs or mtd_config filesystems.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-06-15 20:29:17 +08:00
Michał Łyszczek 4e5d8aca3d nucleo-wl55jc: add buttons and gpio interrupt support
This patch adds to the nucleo-wl55jc previously implemented EXTI support.
Button support with nuttx's button driver is added.

I've written small example to show how to use GPIO EXTI. B3 button can be
used (selectable via Kconfig) to toggle Red LED.

I've added new defconfig for demo purposes. I've included there config
and enabled example programs that are meant to demonstrate functions of
the board and does not really have a place in real world project. Like
Red LED can be toggled with B3 button, or LED example that flashes LEDS,
or button example to show which button has been pressed.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>

--
v1 -> v2:
Suggested by: Petro Karashchenko
- Change (1 << 0) to (1 << BUTTON1_BIT (and similar)

v2 -> v3:
- Fix invalid BUTTON3_BIT value

v3 -> v4:
Suggested by: Petro Karashchenko
- Change 0/1 to false/true
2022-06-13 20:21:20 +08:00
Michał Łyszczek f643edbe41 boards/nucleo-wl55jc: add new board
This patch includes bare minimum support for nucleo-wl55jc board.
It compiles and nsh shell is working properly on virtual com port
over USB. 3 onboard leds with userled driver are working.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-06-07 23:20:02 +08:00