Commit Graph

59 Commits

Author SHA1 Message Date
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 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
Peter van der Perk b938348cdb S32K1XX EEEPROM indentation fix 2020-06-30 12:46:50 -06:00
Peter van der Perk ede6225c72 NXStyle fixes 2020-06-16 15:35:43 -03:00
Peter van der Perk 662bd5e49a Added S32K1XX EEEPROM init code 2020-06-16 15:35:43 -03:00
Peter van der Perk ff76ef0725 s32k1xx: Added FlexCAN driver with SocketCAN support 2020-06-15 08:07:19 -06:00
Xiang Xiao 7a18ebe459 drivers/led: Extend userled_set_t from 8bits to 32bits
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5701b42ff930998198b1d915316cc4f2d085d4eb
2020-06-07 19:28:10 +01:00
Xiang Xiao 76965474ac drivers/led: Let board_userled_initialize return the led number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf6638a6865bac42150b5957376e55909f041d40
2020-06-07 19:28:10 +01: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
Gregory Nutt 1414c55c45 boards/arm: Leverage PR 1150 to other ARM Make.defs 2020-05-30 20:09:02 +01:00
Xiang Xiao e83c1400b6 build: Move BOARD_DIR definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao 7e5b0f81e9 build: Replace -I with INCDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao 23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao dd61d3d9f9 build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Xiang Xiao 1a95cce1a3 build: Move .config check to the top Makefile
remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Xiang Xiao 7faf3c0254 build: replace ${TOPDIR} with $(TOPDIR) in Makefile
make the usage consistence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 567962bd62 build: Move the extension definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 8b42ee421a build: Move MKDEP definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao 9ec9431706 build: Move DIRLINK/DIRUNLINK definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Nathan Hartman 8d985819b3 Fix typos
Comments only. No functional changes.
2020-05-14 10:49:44 -06:00
Gregory Nutt 4301682fbc Fix up some problems/issues remaining from PR 1007
1. Add missing conditional logic in include/sys/syscall_lookup.h
2. CONFIG_NPTHREAD_KEYS removed from code but was still in sched/Kconfig
3. Refresh all configurations affected by PR 1007
4. syscall/syscall_funclookup.c needs to include nuttx/tls.h
2020-05-08 20:13:40 +01:00
Gregory Nutt 9ce03b1660 Move pthread-specific data into TLS
1. Move pthread-specific data files from sched/pthread/ to libs/libc/pthread.
2. Remove pthread-specific data functions from syscalls.
3. Implement tls_alloc() and tls_free() with system calls.
4. Reimplement pthread_key_create() and pthread_key_free() using tls_alloc() and tls_free().
5. Reimplement pthread_set_specific() and pthread_get_specicif() using tls_set_value() and tls_get_value()
2020-05-08 18:05:04 +01:00
Gregory Nutt 037c9ea0a4 arch/arm: Rename all up_*.h files to arm_*.h
Summary

The naming standard at https://cwiki.apache.org/confluence/display/NUTTX/Naming+FAQ requires that all MCU-private files begin with the name of the architecture, not up_.

This PR addresses only these name changes for the up_*.h files.  There are only three, but almost 1680 files that include them:

    up_arch.h
    up_internal.h
    up_vfork.h

The only change to the files is from including up_arch.h to arm_arch.h (for example).

The entire job required to be compatible with that Naming Convention will also require changing the naming of the up_() functions that are used only within arch/arm and board/arm.

Impact

There should be not impact of this change (other that one step toward more consistent naming).

Testing

stm32f4discovery:netnsh
2020-05-01 03:43:44 +01:00
liuhaitao 459ad99373 Use EXTRAFLAGS instead of EXTRADEFINES to be used by make via command line
So call 'make EXTRAFLAGS=-Wno-cpp' could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: Iaa618238924c9969bf91db22117b39e6d2fc9bb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
YAMAMOTO Takashi 1ffa009c8b Revert "Don't generate .depend anymore"
This reverts commit 79af7fbf4e.

Because:

* btashton reported some issues in local builds:

  https://github.com/apache/incubator-nuttx/pull/603#issuecomment-602264860

* this might be related to the current CI breakage:

  > /bin/sh: 1: /__w/incubator-nuttx/incubator-nuttx/nuttx/tools/mkdeps: not found
2020-03-22 23:07:29 -05:00
Xiang Xiao 79af7fbf4e
Don't generate .depend anymore 2020-03-22 18:15:29 +00:00
Jari van Ewijk 850c7faaa8
NXP S32K1XX EVB boards - clock config cleanup (#556)
* S32K1XX EVB boards - clock config cleanup

* S32K1XX - Style fix 2
2020-03-12 13:55:43 -07:00
Jari van Ewijk 5cc54ba15d S32K1xx boards - Remove unused files (should have been renamed) 2020-03-05 10:14:11 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
Peter van der Perk 499607d68f
S32K add support for Nxp drone boards (#224)
* S32K add support for Nxp drone boards

* Update arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h codestyle

Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>

Co-authored-by: Jari van Ewijk <jari.vanewijk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2020-02-07 04:53:40 -08:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt d6b4e90d70 arch/arm/src/s32k1xx: Support configuration and initialization of the flash configuration bytes. boards/arm/s32k1xx/s32k1**evb/scripts/flash.ld: Create a special FLASH section to hold the FLASH configuration bytes. 2019-10-19 13:14:02 -06:00
Gregory Nutt 2925c28f8f All linker scripts: Preface all _edata defininitions with . = ALIGN(4). Otherwise, the last bytes in the .data section may not be initialized properly. Also convert all linker scripts indent in units of 8-spaces to units of 4-spaces. 2019-09-15 17:22:16 -06:00
Gregory Nutt 0bd60c3722 All linker scripts: Preface all _ebss defininitions with . = ALIGN(4). Otherwise, the last bytes in the .bss section will not be initialized properly. Also convert all linker scripts that use TABs to spaces. 2019-09-15 15:27:58 -06:00
Gregory Nutt bbbe9d85c5 Move EXIDX assignments inside of braces so that we can be assure that the symbols have the correct alignment. Suggested by Daniel P. Volpato
Squashed commit of the following:

    Some scripts use TABs, others spaced.  Make usage consistent.
    Move __exidx_end assignment inside of brackets.
    Remove old __exidx_end assignment.
    Move __exidx_start assignment inside of brackets.
    Remove old __exidx_start assignment
2019-09-12 09:57:50 -06:00
Gregory Nutt 27e4bfffd4 Update some comments and README files. 2019-08-24 13:06:43 -06:00
Gregory Nutt e4c333820a tools/refresh.sh: Fix some remaining breakage from the boards/ directory reorganization; boards/arm/s32k1xx: Add CONFIG_NSH_ARCHINIT=y to all NSH configurations. 2019-08-24 08:43:46 -06:00
Gregory Nutt b3d609959c arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h: Add an incomplete FlexCAN register definition header file. Still missing some bitfield definition. Also updates some README files. 2019-08-23 07:35:49 -06:00
Gregory Nutt 3613ae33a7 boards/arm/s32k1xx/s32k118evb, s32k146evb, and s32148evb: Correct the 'sense' of the LED discrete output. A high level illuminates the LED. 2019-08-22 12:12:22 -06:00
Gregory Nutt 37960ff780 All S32K1xx flash.ld configurations: Do not write into FLASH configuration field.
Extend s32k146 and s23k148 NSH configurations so that they support more features.
2019-08-22 08:26:27 -06:00
Gregory Nutt 5655a9d362 Update README files. 2019-08-20 14:39:46 -06:00
Gregory Nutt c6026d7500 With these changes the S32K146EVB minimal NSH is function. Only verifed while running from SRAM.
arch/arm/src/s32k1xx/s32k1xx_lowputc.c:  Fix a typo that prevented LPUART1 from working.
    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c and related files:  Fix yet another case of confusion between pre-decremented and non-decremented divider values.  Enforce the rule that dividers are not decremented until the moment they are written into registers.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Fix another problem related to whether a divider is pre-decremented or not.  The answer must be the divder values are never pre-decremented.  They are decremented just before being written to hardware.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Clean up some bad conditional logic.  Precedence of operators problem.
    boards/arm/s32k1xx/s32k118evb:  Add support for execution out of SRAM.  This is helpful for bringup when you want to avoid putting a lethal image in FLASH.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.h:  Remove crystal frequency, it is not used.
    arch/arm/src/s32k1xx/s32k1xx_wdog.h:  Fix a typo in a register name.i
    boards/arm/s32k1xx/s32k*evb/configs/nsh/defconfig:  Create Motorola SREC output format.
2019-08-20 14:35:36 -06:00
Gregory Nutt faf8bdcbf8 Eliminate some new warnings found in build testing 2019-08-19 17:50:04 -06:00
Gregory Nutt df1294906d arch/arm/src/s32k1xx/s32k1xx_clockconfig.c and related files: Fix confusion about who decrements the rster value. Some dividers may have a function range of 1..8 but the register value is 0..7. There were several places where values were getting decremented twice: Once by higher up logic and once by the register access logic. A such dividers were reviewed and, hopefully, all were fixed. 2019-08-19 13:07:45 -06:00
Gregory Nutt 39d1a02c6d This commit adds support for the S32K146EVB
Squashed commit of the following:

    s32k1xx/s32k146evb/scripts/flash.ld:  Update the linker script for the S32K146.
    boards/:  Hook the S32K146EVB into the configuration and build system.
    s32k146_clockconfig.c:  Add S32K146 clock configuration.
    boards/arm/s32k1xx/s32k146evb/src/s32k146_periphclocks.c:  Update peripheral clocking for the S32K146.
    arm/s32k1xx/s32k146evb:  Initial support fo S32K146EVB.  Starting point is just the S32K118EVB with name changes.
2019-08-19 09:14:14 -06:00