Commit Graph

2366 Commits

Author SHA1 Message Date
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
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 69d67c324d boards: sim: 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
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
Alin Jerpelea e85cbb81f9 arch: arm: sama5: 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
chao.an fc3565e9eb arch/z80: Unify the toolchain definition of SDCC for linux and windows
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an 2df591b3bb arch/armv7-a/r: Unify the toolchain definition of eabi for linux and windows
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an 4a085e1cdb arch/arm/armv6-m: Unify the toolchain definition of eabi for linux and windows
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an 2246afcdd8 arch/armv7-m: Unify the toolchain definition of eabi/clang/iar for linux and windows
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
chao.an a79bf8c9eb arch/armv8-m: Unify the toolchain definition of eabi/clang for linux and windows
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-19 23:17:27 +08:00
Xiang Xiao d80c2d7419 arch/arm: Remove all lazy fpu related code
since it is broken and inefficient, and then removed by:
commit dc961baaea
Author: chao.an <anchao@xiaomi.com>
Date:   Thu Apr 14 18:07:14 2022 +0800

    arm/armv7-[a|r]: move fpu save/restore to assembly handler

    Save/Restore FPU registers in C environment is dangerous practive,
    which cannot guarantee the compiler won't generate the assembly code
    with float point registers, especially in interrupt handling

    Signed-off-by: chao.an <anchao@xiaomi.com>

commit 8d66dbc068
Author: chao.an <anchao@xiaomi.com>
Date:   Thu Apr 7 13:48:04 2022 +0800

    arm/armv[7|8]-m: skip the fpu save/restore if stack frame is integer-only

    Signed-off-by: chao.an <anchao@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 11:09:36 +03:00
Xiang Xiao 7a0fd8d10f arch/risc-v: Remove FAR from chip and board folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-19 00:22:45 +03:00
chao.an dc2e4b7024 boards/ostest: remove board ostest implement
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-18 22:22:16 +08:00
chao.an 5bdfae66ce arch/arm: export arm_saveusercontext()
rename arm_saveusercontext() -> up_arm_saveusercontext()

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-18 22:22:16 +08:00
Xiang Xiao ef1a98dd00 Remove the unneeded void cast
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 23:32:05 +03:00
Xiang Xiao 6af167c086 arch/sparc: Remove FAR from chip and board folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 18:42:38 +03:00