Commit Graph

91 Commits

Author SHA1 Message Date
Xiang Xiao 4a84555d1c arduino-mega2560/nsh: Remove CONFIG_INTELHEX_BINARY
to avoid "avr-objcopy: Bad CPU type in executable" on macOS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-11 22:41:25 +08:00
zhangyuan21 a8fa51e6bf arch: rename arch special function name 2022-11-22 16:27:56 +08:00
Xiang Xiao 28947517ca sched/spawn: Rename task_spawnattr_[get|set]stack[size|addr] to posix_spawnattr_[get|set]stack[size|addr]
since they can be not only used in task_spawn but also in posix_spawn

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 09:51:18 +09:00
Fotis Panagiotopoulos bbf3f2866d Fixed non-UTF8 characters. 2022-09-28 09:38:55 +08:00
Xiang Xiao af12a552fe sched/Kconfig: let PREALLOC_TIMERS depends on !DISABLE_POSIX_TIMERS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-19 11:39:22 -03: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 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 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 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
Xiang Xiao 54e630e14d arch: Merge up_arch.h into up_internal.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-14 09:32:17 +02:00
Xiang Xiao ee931c137f boards: Remove -fno-builtin
it's more efficent to generate the machine code directly if possible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Xiang Xiao 54b886ca0d boards: Add -fno-common to ARCHCFLAGS and ARCHCXXFLAGS
since elf loader can't handle SHN_COMMON

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 22:00:32 +08:00
Xiang Xiao 1d1bdd85a3 Remove the double blank line from source files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
Alan Rosenthal 8defb843aa Remove duplicate linker script definitions
## Summary
A lot of linker scripts were listed twice, once for unix, once for windows.

This PR cleans up the logic so they're only listed once.

 ## Impact
Any opportunity to use a single source of truth and reduce lines of code is a win!

 ## Testing
CI will test all build
2022-02-17 02:55:25 +08:00
Xiang Xiao 0499979908 sched: Disable pthread by default when DEFAULT_SMALL is enabled
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 12:04:03 +08:00
Xiang Xiao a9d7a776c4 sched: Remove SDCLONE_DISABLE option and config
since the related code was removed by:
commit 4d5a964f29
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Tue Feb 23 18:04:13 2021 +0800

    net: unify socket into file descriptor

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-31 19:03:20 +01:00
Huang Qi 0c28fe9831 boards: Remove unused NXFLAT flags from Make.defs
Since NXFLAT only avaliable on arm.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-27 11:08:43 +08:00
Xiang Xiao 8bcdefafc9 board: Remove -fno-strength-reduce
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-19 00:14:03 +01:00
Petro Karashchenko 8d3bf05fd2 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
ligd 412d030149 boards: move USERMAIN_XX out of INIT_ENTRYPOINT
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-24 08:23:30 -06:00
Xiang Xiao 0aeb132d15 board: Run ./tools/refresh.sh --silent all
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-10 09:16:35 +01:00
Alan C. Assis 099e9fb4f7 boards: Remove -nostartfiles -nodefaultlibs from LDFLAGS 2021-09-13 08:58:25 +08:00
YAMAMOTO Takashi 58bdcbab9b Revert "Make: use gcc as LD"
This reverts commit 45672c269d.

Because:

* It's very confusing to have cc as LD.
* I don't see what "-nostartfiles -nodefaultlibs" in LDFLAGS are
  supposed to do when we use LD directly. It would be simpler to
  remove them from our LDFLAGS.
2021-09-08 09:40:48 +08:00
Xiang Xiao b12f588140 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 13:58:26 +02:00
Jiuzhu Dong 85470176e7 sched/task: delete CONFIG_MAX_TASKS limit
Change-Id: I583015a95dbcebd352f81ecb3104ffdbd646a9ec
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Alexander Vasiljev 45672c269d Make: use gcc as LD 2021-06-10 03:43:18 -07:00
Raman Gopalan 9b4014d048 avr32dev1: USART1 RX: Reassign pin 2021-05-10 17:11:05 -03:00
Raman Gopalan 649e680f75 avr32dev1: Suppress linker error: Placeholder for board_app_initialize() 2021-05-06 11:25:38 -03: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 9ced5cae84 boards: avr: nxstyle fixes
Fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-17 08:40:08 -07:00
Alin Jerpelea 586f458a46 boards: avr: 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-17 08:40:08 -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
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
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
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 da3e6cb175 board: Let avr/renesas utilize boards/Board.mk
to avoid the duplication

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I79d80e08fe6a05f6182dc07ea41aade7aeb9d4b0
2020-07-19 19:40:32 -07:00
Brennan Ashton 470624fa78 Use AVR Linux toolchain instead of buildroot
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-07-19 15:49:13 -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
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 1b47aa1cb2 drivers/button: Let board_button_initialize return the button number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2ff5c30049a5c5e8ee90baea56e9f4cb1a8a4f87
2020-06-07 19:28:10 +01:00
Xiang Xiao 4fe35cc87c boards: Remove OUTPUT_FORMAT and OUTPUT_ARCH from ld script
let toolchain decide the correct value base on the command line

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I342db6a88e4a161a322a8fea48a59e6ca7617ae6
2020-06-02 07:11:54 -06:00