Commit Graph

138 Commits

Author SHA1 Message Date
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 77716ee264 Documentation: migrate STM32L0 2023-08-23 23:21:54 +08:00
raiden00pl 44f288a37c Documentation: migrate STM32G0 2023-08-23 23:20:52 +08:00
raiden00pl 8da255309b Documentation: migrate STM32F0 2023-08-23 23:20:08 +08:00
Xiang Xiao 6b4e5c0d15 binfmt: Change the default of BINFMT_DISABLE to DEFAULT_SMALL
to optimize the image size when and DEFAULT_SMALL is enabled
and refresh the defconfig in boards/

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-10 11:35:41 +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
raiden00pl dffb472ad9 cmake: port stm32f0l0g0 2023-07-24 10:13:26 -07:00
Xiang Xiao a51be33a41 libc/tls: Change the default value of TLS_NELEM to zero
to ensure the default config as small as possible.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-20 08:11:30 +02:00
Xiang Xiao 0eeca0f375 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX)
to unify the way to get include directories

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 00:11:25 +03:00
raiden00pl 7cf52139e8 boards/stm32f0l0g0: rework boards to not use CONFIG_STM32F0L0G0_USE_LEGACY_PINMAP=y
Continuation to PR #8992
2023-05-24 22:30:45 +08: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
Xiang Xiao 66c5f86018 sched: Disable stdio api by default when DEFAULT_SMALL equals y
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 00:18:03 +02:00
Xiang Xiao df102d1f06 Remove OK macro from the code base
let's use OK from sys/types.h instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 13:58:16 +01: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
Xiang Xiao 7923ea3bef boards: Refresh defconfig after the default value of FS_PROCFS_EXCLUDE_xxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 15:10:26 +09: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
chao an 0f0a94186f arch/arm/toolchain: migrate the toolchain define to arch/arm/Kconfig
migrate the toolchain define to arch/arm/Kconfig to simplify new toolchain registration

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-16 14:47:27 +08:00
raiden00pl 9770555102 nucleo-g070rb/nsh: refresh config 2022-08-03 23:43:19 +08:00
raiden00pl 0e97e57d23 stm32g071b-disco: gpio dev support 2022-07-23 16:48:13 -03:00
raiden00pl 0253f0ff66 stm32g071b-disco: ina230 support 2022-07-23 16:48:13 -03:00
Xiang Xiao f9e3ef3464 Revert "libc/stdio: enable long long formating by CONFIG_HAVE_LONG_LONG"
This reverts commit b1c72c023c.
2022-07-20 18:06:29 +03:00
raiden00pl c9ec91a5b5 stm32g071b-disco: add OLED support 2022-07-18 14:14:51 +03:00
raiden00pl 9276e41321 b-l072z-lrwan1: use board common logic for ssd1306 2022-07-15 10:22:58 -03:00
raiden00pl 072b2bca45 boards/stm32f0l0g0: add ssd1306 to board common logic 2022-07-15 10:22:58 -03:00
raiden00pl 703e5e4226 boards/stm32f0l0g0: common board logic support 2022-07-15 10:22:58 -03:00
Xiang Xiao b1c72c023c libc/stdio: enable long long formating by CONFIG_HAVE_LONG_LONG
and remove CONFIG_LIBC_LONG_LONG option to simplify the usage.
note: the size will increase 668
before change:
   text    data     bss     dec     hex filename
 168440     348    4480  173268   2a4d4 nuttx

after change:
   text    data     bss     dec     hex filename
 169108     348    4480  173936   2a770 nuttx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-13 09:50:38 -03:00
raiden00pl 2192b8df2b boards: add initial support for stm32g071b-disco board 2022-07-10 21:02:23 -03:00
raiden00pl b3e11b605a boards: add initial support for stm32l0538-disco 2022-07-09 23:37:33 +08: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 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 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 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
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
Gustavo Henrique Nihei e1f28c19c2 arch/arm: Make CXX exception and RTTI depend on Kconfig options
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-03-30 11:19:29 +08: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 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
Xiang Xiao 8bcdefafc9 board: Remove -fno-strength-reduce
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-19 00:14:03 +01:00
chao.an cbd82f1c1b compile/flags: remove redundant -fomit-frame-pointer from board flags
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-27 22:31:27 -06: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
Xiang Xiao 3847539f3d board: Run ./tools/refresh.sh --silent all
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-07 13:19:15 +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
Alin Jerpelea 13d66c8130 boards: stm32f0l0g0: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-16 07:11:32 -07:00