Commit Graph

2381 Commits

Author SHA1 Message Date
Xiang Xiao
8b7c5b039d arch: Move -fsanitize=kernel-address to ARCHOPTIMIZATION
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
4f090eb7fd arch/sparc: Move toolchain macro from board's Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
21188ce37e boards/nrf52: Remove toolchain macro which is already defined in Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
468007307c boards/nrf52: Remove ARCHCCVERSION/ARCHCCMAJOR which isn't used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 15:40:35 +03:00
Xiang Xiao
51cf7ba05a Remove FAR from arm/risc-v/xtensa/sim/x86
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
Masayuki Ishikawa
dc2a01e75a boards: rv-virt: Add knsh64 related files
Summary:
- This commit adds knsh64 related files

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-13 04:14:01 +08:00
Eero Nurkkala
77e36d1acc risc-v/mpfs: introduce IHC driver
This provides an example of Asymmetric Multiprocessing (AMP). The
master from Linux sends pings that this NuttX echoes back. The system
uses RPMsg from OpenAMP.

The Inter-Hart Communication module is present in the vendor's software
stack with the tag "2021.11". The software is present on github at the
polarfire-soc project. The following conditions must be met:

 1. FPGA programmed with 2021.11 software
 2. HSS (Vendor bootloader) with 2021.11 software
 3. U-boot and Linux kernel from 2011.11 software

Currently the IHC works as a slave only on the hart number 4.

On the NuttX side, this patch uses rptun that incorporates rpmsg and
virtio. If it used only rpmsg and virtio, the future maintenance would
likely be much heavier. Using rptun also simplifies many things.

Upon success, the master side from Linux may issue an example test:

root@icicle-kit-es-amp:/opt/microchip/amp/rpmsg-pingpong# ./rpmsg-pingpong

However, the rpmsg-pingpong.c (compiled on target with gcc), may need to
be modified as seen below to match the device id:
 - char *rpmsg_dev="virtio0.rpmsg-amp-demo-channel.-1.0";
 + char *rpmsg_dev="virtio0.rpmsg-amp-demo-channel.-1.1024";

This work uses a separate linker script. Due to a bug yet unknown to date,
a small NuttX, when loaded by the vendor HSS bootloader, will cause the
Linux kernel to hang at boot. Thus, the binary size is increased with
a section 'filler_area' whose only purpose is to increase the image size
so that the Linux kernel will boot up.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-05-12 22:56:12 +08:00
wangbowen6
28684f24b7 arm/tlsr82: pwm driver optimize and add pulse count support.
1. add pulse count support for pwm0;
2. add more detailed config for pwm;
3. pwm configuration and start process optimize;
4. tlsr82/Kconfig format;

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-11 13:15:44 +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
Masayuki Ishikawa
9af903dcf0 boards: lm3s6965-ek: Remove CONFIG_TIVA_ETHERNET from qemu-kostest
Summary:
- The configuration is no longer needed because Kconfig has
  been fixed in the previous commit

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-11 15:09:34 +08:00
wangbowen6
73f7cc5855 tlsr82: first commit of telink tlsr82xx chip port.
tlsr82: first commit of telink tlsr82xx chip port.

 - tc32 archtecture context switch;
 - tc32 backtrace;
 - timer, uart, pwm, gpio, adc driver;
 - flash, watchdog driver;
 - uart txdma/rxdma;
 - spi console driver;
 - add board bringup and reset;

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-09 12:33:39 +08:00
Zou Hanya
acfbd6cf6f nucleo-g474re: Add Nucleo G474RE bord suport
based on boards/arm/stm32/b-g474e-dpow1 2022-05-01 aeb9c5d822
2022-05-09 10:34:40 +08:00
okayserh
2696aee11d Fixed the bug that prevented the code from working in uninitialized
state (wrong I2C write size). Some improvements of the code.
2022-05-09 10:34:29 +08:00
Xiang Xiao
d9a519444c boards/arm: Fix undefined reference to `arm_netinitialize'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-08 16:58:50 +03:00
okayserh
476770e9fd Added functionality for Audio support with the STM32F746 Discoboard
In particular additions to wm8994.h and filled functionality into
wm8994.c.

Resolved a few more remarks from review.
2022-05-07 11:52:51 -03:00
Xiang Xiao
75bf7be0c3 boards/arm: Enable gcov in pimoroni-tiny2040:nsh
to improve the ci coverage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-06 14:43:57 -03:00
Xiang Xiao
8a6546ab10 boards/sim: Enable gcov in kasan config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-06 14:43:57 -03:00
Xiang Xiao
eba185b04b boards/sim: Change -fprofile-arcs to -fprofile-generate
to generate more information for profile feedback optimization
and remove -lgcov from STDLIBS since gcc/clang will automatically
add the profile help lirary(triggered by -fprofile-generate).

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-06 14:43:57 -03:00
JacobCrabill
5f82c82e4d boards/stm32h7: Add socketcan config to nucleo-h743zi2 2022-05-06 08:54:58 +02:00
Xiang Xiao
a229e4a399 boards: Remove CONFIG_C99_BOOL8 from all defconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-05 16:23:32 -03:00
Xiang Xiao
bbdbca00c1 libc/assert: let CONFIG_NDEBUG default to !CONFIG_DEBUG_ASSERTIONS
so the user could just change CONFIG_DEBUG_ASSERTIONS in most case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-04 10:07:34 +03:00
Xiang Xiao
c628529e2d arch/arm: Remove FAR and CODE from board folder(3)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-03 16:50:52 +03: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
cd001725b7 arch/arm: Remove FAR and CODE from board folder(1)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-03 16:50:52 +03:00
Xiang Xiao
fead1964cb boards/space: Remove the unneeded XXXEXT definition
these make variable is defined in common place now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-03 16:48:35 +03:00
Masayuki Ishikawa
0908c67d73 boards: rv-virt: Add support ELF to nsh and nsh64 defconfigs
Summary:
- This commit adds support ELF to nsh and nsh64 defconfigs

Impact:
- None

Testing:
  nsh> mount -t hostfs -o fs=../apps/bin /system/bin
  nsh> hello
  Hello, World!!

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-03 13:57:24 +08:00
Masayuki Ishikawa
9b20f97064 boards: rv-virt: Add hostfs support to nsh and nsh64 defconfigs
Summary:
- This commit adds hostfs support to nsh and nsh64 defconfigs

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-02 19:46:58 +08:00
Ville Juven
a5d49140ea MPFS: Add dummy rofms image
To allow building with ROMFS enabled
2022-05-02 16:13:15 +08:00
Ville Juven
31b916c485 MPFS: Add kernel space mappings
Mappings are done with vaddr=paddr.
- I/O space mapped with two gigapages
- Kernel space mapped to statically allocated page tables. 2MB of kernel
  memory is supported.
- Page pool is mapped to the kernel space, to allow virtual memory access
  for the kernel e.g. to initialize the page memory when it is allocated.
2022-05-02 16:13:15 +08:00
Ville Juven
2287ebcbcf MPFS: Add knsh (CONFIG_BUILD_KERNEL=y)
Re-name the old knsh (CONFIG_BUILD_PROTECTED=y) to pnsh
2022-05-02 16:13:15 +08:00
Masayuki Ishikawa
7b6ac23277 boards: sabre-6quad: Add defconfig for libcxx
Summary:
- This commit adds defconfig for libcxx

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-02 10:24:16 +03:00
Masayuki Ishikawa
c5af689180 boards: sabre-6quad: Fix dramboot.ld for libcxx
Summary:
- I noticed that cxxtest does not work correctly.
- Finally, I found that initializers for c++ is not called.
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with cxxtest (defconfig will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-05-02 10:24:16 +03:00
Xiang Xiao
f77a0ec7fa arch: Move -finstrument-functions from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 23:54:15 +03:00
Xiang Xiao
1fde7e17bb arch: Move -fstack-protector-all from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 23:54:15 +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
220f1dd6a0 boards: run tools/refresh.sh to normalize defconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-01 09:50:50 +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
94cb0c6072 arch: Move -nostdinc++ to Tooolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-29 21:08:14 -03:00
Ville Juven
d495007943 MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs
For some reason # CONFIG_ARCH_FPU is not set also unsets ARCH_FPU
for the .config file, meaning FPU support is not built.
2022-04-27 23:20:51 +08:00
Xiang Xiao
fc16cfaefe Correct the code alignment found in review
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-26 11:34:28 +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
e9f5eb0823 boards: Move "-fno-exceptions -fcheck-new" from Make.defs to Toolchain.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 16:22:46 +03:00
Xiang Xiao
25d819253b boards/risc-v: Remove "MAXOPTIMIZATION = -Os" from Make.defs
since it is already defined in Toolchain.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-25 07:58:00 +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
Xiang Xiao
547c85b0ae boards: Switch the elf link script to binfmt/libelf/gnu-elf.ld
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-24 17:02:37 +02:00
Oki Minabe
54508a3798 boards/boardctl: correct boarctl return value
Summary:
- Correct boardctl function's return value
- In case of BOARDIOC_TESTSET, `ret' has 0 or 1 or an error,
  but `ret' is ignored except error.

Impact:
- boardctl return value except errors

Testing:
- custom Cortex-A9 board

Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
2022-04-23 16:25:53 +08:00
Xiang Xiao
5a565e753c pm: Move pm_initialize call from driver_initialize to xxx_pminitialize
since it's too late with the below commit:
ommit a594a5d7a8
Author: chao.an <anchao@xiaomi.com>
Date:   Mon Apr 11 19:44:26 2022 +0800

    sched/init: drivers_initialize() should be late than up_initialize()

    up_initialize
    |
     ->up_serialinit
       |
        ->uart_register  /* ("/dev/console", &CONSOLE_DEV); */

    drivers_initialize
    |
     ->syslog_console_init
       |
        ->register_driver /* ("/dev/console", &g_consoleops, 0666, NULL); */

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-22 14:36:27 +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
chao.an
64d7326ed5 compile/opt: add config DEBUG_OPT_UNUSED_SECTIONS
Enable this option to optimization the unused input sections with the
linker by compiling with " -ffunction-sections -fdata-sections ", and
linking with " --gc-sections ".

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-22 01:37:23 +08:00