Commit Graph

130 Commits

Author SHA1 Message Date
Xiang Xiao 0bbb720be2 boards/arm/imxrt: Fix nxstyle warning in imxrt1060-evk/src/imxrt_boot.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-23 13:57:31 +01:00
Alin Jerpelea ee0861ae7a arch: arm: fixes for nxstyle errors
Nxstyle error fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-22 19:28:38 -07:00
Alin Jerpelea 1863dca88a boards: Author David Sidrane: update licenses to Apache
David Sidrane has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-22 19:28:38 -07:00
Xiang Xiao e14c458747 mm/heap: Move semaphore related declaration to private header
since other subsystem doesn't need call these function anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50
2021-03-22 15:35:32 +01:00
Alin Jerpelea 6f14299dd0 boards: nxstyle fixes
nxstyle fixes to pass the CI check

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
Alin Jerpelea 40cd67eee6 boards: arm: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
Jiuzhu Dong 59eb4fa8d6 fs: delete NFILE_DESCRIPTORS for allocating dynamically
Change-Id: Id06d215063796d222b9792d25ab2d6742167729f
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei 13535d8725 linkerfiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei 47cb41c92f makefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea 0a797f1e8b boards: Makefile: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-05 04:08:55 -08:00
Xiang Xiao 151cf49562 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Xiang Xiao 9473434587 Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Michal Lenc 3b219fb2da boards/arm/imxrt/teensy-4.x: allow configuration of all CANs
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-02-25 22:31:04 -08:00
Masayuki Ishikawa d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Masayuki Ishikawa 7a58144ff2 boards: imxrt1050-evk: Fix style warnings in imxrt_ethernet.c
Summary:
- This commit fixes style warnings in imxrt_ethernet.c
Impact:
- None

Testing:
- Built with imxrt1050-evk:netnsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-04 21:49:16 -08:00
Masayuki Ishikawa 940d0cb964 boards: imxrt1020-evk: Fix style warnings in imxrt_ethernet.c
Summary:
- This commit fixes style warnings in imxrt_ethernet.c

Impact:
- None

Testing:
- Built with imxrt1020-evk:netnsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-04 21:49:16 -08:00
Masayuki Ishikawa 0c1e784245 boards: imxrt1060-evk: Add iperf to netnsh
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-04 00:29:07 -08:00
Pavel Pisa bd372724cc boards/arm/imxrt/teensy-4.x: added configuration for PiKRON's BaseBoard v1.
The BaseBoard carries Teensy 4.1 SBC. The complete design
of the baseboard (teensy_bb-1.tdb) is available at

  https://gitlab.com/pikron/projects/imxrt-devel/-/tree/master/hw

Attempt is to provide configuration which enables most
of interfaces of the BaseBoard and allows runtime applications
loading over TFTP.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa d77fe3390f board/arm/imxrt: the request for map file in Make.defs LDFLAGS results in absolute path in export target.
The BSP MAke.defs line

  LDFLAGS += -Map=$(TOPDIR)/nuttx.map

results  in absolute path in nuttx-export/scripts/Make.defs
which would mean that each application rebuild would attempt
to modify file inside original build of NuttX system.

Even worse, it prevents linking by GCC, because -Map=xxx/nuttx.map
works directly in LD, it would require -Wl,-Map= for GCC.

Fixed name of map file prevents to define map file by build
system using exported NuttX libraries and link kit.

Change is done to allow OMK template based applications
development for another NuttX BSP

  https://github.com/ppisa/nuttx-devel/tree/master/nuttx-omk-template

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Matias N 76cc5c36e4 bmp280: convert to common sensor interface 2021-01-18 21:08:34 -03:00
Xiang Xiao eda15d23c2 boards/imxrt1020-evk: Don't include the unused bt_uart_shim.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
Michal Lenc 6439d1b976 boards/arm/imxrt/teensy-4.x: Added lcd-4.1 config to README.txt
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Michal Lenc 1502693f93 boards/arm/imxrt/teensy-4.x: Added support for LCD display with ST7789
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Michal Lenc 3ec7cd186a boards/arm/imxrt/teensy-4.x: CDC-ACM console support
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-14 04:25:56 -06:00
Michal Lenc eabd79f97b boards/arm/imxrt/teensy-4.x: fixed build error and nx style
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-04 10:18:41 -08:00
Michal Lenc 11be65db8b board/arm/imxrt: Added Teensy-4 BSP based on imxrt1060-evk
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-04 10:18:41 -08:00
Xiang Xiao 9208176f60 build: Move __NuttX__ definition to tools/Config.mk
ensure this critical macro get defined in all projects

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-02 13:22:39 -03:00
chao.an b88561299b make/expression: improving up asm/C/C++ compile times
In the current compilation environment, the recursive assignment(=) for compile
flags will be delayed until every file is actually need to be compile.

For example:
--------------------------------------------------------------------------------
arch/arm/src/Makefile:

INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)common}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)$(ARCH_SUBDIR)}
INCLUDES += ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)sched}

CPPFLAGS += $(INCLUDES) $(EXTRAFLAGS)
CFLAGS += $(INCLUDES) $(EXTRAFLAGS)
CXXFLAGS += $(INCLUDES) $(EXTRAFLAGS)
AFLAGS += $(INCLUDES) $(EXTRAFLAGS)
--------------------------------------------------------------------------------

All compilation options will be included recursively,
which will be delayed until the compilation options are actually used:

tools/Config.mk:

--------------------------------------------------------------------------------
define COMPILE
  @echo "CC: $1"
  $(Q) $(CC) -c $(CFLAGS) $($(strip $1)_CFLAGS) $1 -o $2
endef
--------------------------------------------------------------------------------

All compile flags to be reexecuted $(INCDIR) as long as one file needs to be compiled,
but in fact, the compilation options have not changed in the current directory.

So the we recommand to change the syntax of assignment
From
    Recursive (=)
To
    Simple    (:=)

In this way, we can ensure that all compilation options are expanded only once and reducing repeated works.

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-02 07:53:53 -08:00
Xiang Xiao eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Michal Lenc b5e9961036 Fix nxstyle errors and warnings
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-10-17 19:38:42 -03:00
Michal Lenc 1f323fe6be imxrt1060-evk: Added support for FlexCAN driver
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-10-17 19:38:42 -03:00
David Sidrane 06d1ea1a67 imxrt:imxrt10x0-evk Add KEEP on init_section 2020-09-29 10:26:59 +08:00
Thomas Axelsson d67bc0c3c8 imxrt: ADC driver
Based on LPC17xx_40xx and STM32 drivers.
2020-09-23 13:16:33 -03:00
Xiang Xiao b0797263ca libc/stdio: Allocate file_struct dynamically
1.Reduce the default size of task_group_s(~512B each task)
2.Scale better between simple and complex application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
2020-09-11 17:58:17 +08:00
Xiang Xiao a0ce81d659 sched/wdog: Don't dynamically allocate wdog_s
to save the preserved space(1KB) and also avoid the heap overhead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
2020-08-11 12:28:55 -06:00
Xiang Xiao 154852acb5 sched/mqueue: Reduce the initial memory consumption
Change the preallocated message and descriptor from 32/24 to 4.
The total size is reduce from 1892 to 532

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I79d199465daef678986868f773876289859f42fc
2020-08-10 08:07:50 +02:00
Xiang Xiao e1d3627bb1 sched/wdog: Change the default value of MAX_WDOGPARMS from 4 to 2
since the maximum number of argument pass to wd_start in the whole
code base is 2 and change CONFIG_MAX_WDOGPARMS in some defconfig
from 1 to 2 oherwise pthread_condclockwait will fail

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib6cb28b8c0722058849e7be916e164513431d21c
2020-08-06 10:36:22 -06:00
Xiang Xiao b329e2377d boards: Move toolchain related variables to Toolchain.defs
1.It make sense to let Toolchain.defs give the default value
2.The board can still change if the default isn't suitable
3.Avoid the same definition spread more than 200 Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic2649f1c7689bcf59c105ca8db61cad45b6e0e64
2020-07-20 17:10:37 +01:00
Xiang Xiao 4910d43ab0 build: Move the toolchain library setting to the common place
so all boards support C++ automatically
2020-07-16 15:38:08 -03:00
Xiang Xiao f5311de6b4 boards: Remove the unused ARCHCCVERSION and ARCHCCMAJOR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I22d546693139c59c8c899479887a5f04d65edbd6
2020-07-16 11:03:53 -07:00
Xiang Xiao ee875b2a26 boards: Move HOSTCC/HOSTCFLAGS to tools/Config.mk
Make.defs under board folder can still overwrite the default as needed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1c300a8ace4b54d475ef8d398661ed65ca273a2e
2020-07-15 19:14:58 +01:00
Dave Marples bc95500bab Add buttons support to iMXRT1060 2020-07-14 23:34:08 +01:00
Xiang Xiao d32e9c38df boards: Move the C/C++ search path to the common place
so all boards support uClibc++/libc++ automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibe6fafbec57f7acb26ea6188a3e9923ea82295c5
2020-07-13 15:11:12 -03:00
Xiang Xiao 6abd03d53f libxx: Unify uClibc++ and libc++ config
code just need check CONFIG_CXX_EXCEPTION/CONFIG_CXX_LIBSUPCXX now,
instead uClibc++/libc++ specific config

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3b00a5a6701b8bf1c70de89f2d924592ca3e38b0
2020-07-13 15:08:13 -03:00
Dave Marples 3cbf6d58a5 Fix LCD pins to work correctly 2020-07-09 14:03:13 +01:00
Xiang Xiao 5da9cb3ae6 libxx: Eanble HAVE_CXXINITIALIZE automatically if LIBCXX or UCLIBCXX enable
otherwise the user is shocked that using cin/cout/cerr will crash the system

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I453427261f3e2a6e60f7dd2398f7d3bd1043a0d5
2020-07-09 13:19:54 +01:00
chao.an d938e2cd46 CI check: fix nxstyle warning
nxstyle fixes to reduce the CI warnings

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 01:53:23 -05:00
Xiang Xiao 49020acfdc boards: Remove the unused CONFIG_xxx_CXXINITIALIZE=y
since cxx initialization is controlled by CONFIG_HAVE_CXXINITIALIZE now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I39438dc3006d0a0b810052ecef50cd3c92f09d83
2020-07-01 10:41:37 -06:00
Xiang Xiao e9c7df4769 sched: Rename task_startup to nxtask_startup
to follow the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3594d12a65e8cacea99bc295d622628304c3f9f8
2020-07-01 07:55:33 -06:00