Commit Graph

45 Commits

Author SHA1 Message Date
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
Nathan Hartman
a5e643b0cd Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
Jari van Ewijk
963ee6f42e
NXP RDDRONE-UAVCAN boards (S32K1XX) - Clean up clock config (#557)
* RDDRONE-UAVCAN boards - Clean up clock config

* S32K1XX - Style fix 3
2020-03-12 13:56:38 -07: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
Han Raaijmakers
d86a9c6374 boards/arm/s32k1xx/s32k146evb/scripts/s32k146.cfg and boards/arm/s32k1xx/s32k146evb/README.txt: Added configuration script and instructions for using Thread-Aware OpenOCD for the S32K146 with Eclipse. 2019-11-07 07:38:58 -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
6ddd4752b0 Eliminate new warnings found in build testing. 2019-08-21 13:45:31 -06:00
Alin Jerpelea
c6355f58d6 Merged in alinjerpelea/nuttx (pull request #1014)
boards: add stub drivers folder for later use

* boards: add stub drivers folder for later use

    The board/drivers folder is added for future use.

    In this folder we should place drives that are platform specific and
    depend on HW that is present only on a specific platform.

    NOTE: All shared drivers should go to the regular driver folder
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* tools: shift BOARD_DIR one level up

    In preparation for drivers and common folders we are moving the
    BOARD_DIR path up one level.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* tools: add drivers/platform symlink

    Link the boards/<arch>/<chip>/drivers dir to drivers/platform

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: add platform specifc drivers extension

    There are platforms that use specific drivers and we should be able to
    include those drivers in the build

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* board: cxd56xx: drivers: add AK09912 driver for SCU

    This is a platform specific driver connected on the SCU unit.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 13:39:29 +00:00
Gregory Nutt
507e01cb8e This commit adds support for the NXP S32K148EVB
Squashed commit of the following:

    boards/arm/s32k1xx/s32k148evb:  Correct linker scripts for the S32K148, Update README files, Hook eht S32K148EVB into the configuration and build system.

    arm/s32k1xx/s32k148evb:  Verify core and peripheral clocking.  It is the same as the S32K146EVB.  Fixed one-too-many copy-paste error in both.

    boards/arm/s32k1xx/s32k148evb:  Correct LED and button pin number for the S32K148EVB.

    boards/arm/s32k1xx/s32k148evb:  Change all occurrences of 146 to 148.

    boards/arm/s32k1xx/s32k148evb:  Initial S32K148EVB.  Initial commit is just  clone of S32K146EVB with file name changes
2019-08-20 17:02:29 -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
33ab25ae14 arch/arm/src/s32k1xx/s32k14x and boards/arm/s32k1xx/s32k146evb/src: Numerous fixes to get a clean build of the S32K146EVB. 2019-08-19 10:49:50 -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
Gregory Nutt
c3f16a46f0 This commit brings the S32K118EVB board to code complete and ready for testing. This commit adds some minor initialization fixes (like disabling the WDOG, enabling the I-cache, and initializing the MPU. It brings more files in from the Kinetis port for the IDLE loop and for GPIO functionality. This also address register definition header file for LMEM and MPU. 2019-08-18 17:26:10 -06:00
Gregory Nutt
db0641556e boards/arm/s32k1xx/s32k118evb: Implement board support for LEDs and buttons. This is taken from the Freedom-K66f with has the same LED and button configuation as the S32K116EVB and uses the same GPIO IP.
boards/arm/s32k1xx/s32k118evb/include/board.h:  Add LPUART0 pin disambiguation.

arch/arm/src/s32k1xx/hardware:  Add pin mux definitions for S32K116, 118, 142, 144, 146, and 148.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  Add support for PIDR register that disables a gneral purpose pin from acting as an input.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  The device does not support slew rate controls or open drain (on all the pins).  Only pins that are configured for a protocol that requires open-drain (e.g;, LPI2C, LPUART single-wire) will work in open-drain mode.
2019-08-18 12:02:54 -06:00
Gregory Nutt
e7a3231d7a Squashed commit of the following:
Finishes peripheral clock initialization:

      arch/arm/src/s32k1xx/s32k11x/s32k11x_clockmapping.c
      arch/arm/src/s32k1xx/s32k14x/s32k14x_clockmapping.c
        Provide MCU-specific mapping of clock names to PCC control registers.

      boards/arm/s32k1xx/s32k118evb/src/s32k118_periphclocks.c
        Provides initial clocking for for the S32K118EVB

    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c:  Add logic to initialize peripheral clocking.

    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Add SIM clock configuration.
2019-08-17 11:50:32 -06:00
Gregory Nutt
b0b33584ff boards/arm/s32k1xx/s32k118evb/src/s32k118_clockconfig.c: Add clock configuration data for the S32K118EVB. 2019-08-15 16:56:57 -06:00
Gregory Nutt
fba40c40f1 arch/arm/src/s32k1xx/s32k1xx_clockconfig.h: Add data structures that will eventually be used to configure clocking. 2019-08-15 14:03:02 -06:00
Gregory Nutt
eb4fff5221 Minor updates from review of last PR. 2019-08-15 10:05:21 -06:00
Gregory Nutt
17a4efe031 boards/arm/s32k1xx/s32k118evb: More build fixes. 2019-08-14 13:31:21 -06:00
Gregory Nutt
963031f42c arch/arm/src/s32k1xx: A few fixes. The build progresses further but still fails. 2019-08-14 12:40:51 -06:00
Gregory Nutt
8987a9e374 This commit adds initial board support for the NXP S32K118EVB. This configuration is intended, initially, to support development of the architecture support. This is VERY much a work in progress and you should not use this configuration unless you are interested in assisting with the bring-up.
Squashed commit of the following:

    boards/arm/s32k1xx/s32k118evb/configs/nsh:  Add a basic NSH configuration.
    boards/arm/s32k1xx/s32k118evb/scripts:  Add linker scripts and Make.defs.
    configs/:  Hook the S32K118EVB board into the configuration system.
    boards/arm/s32k1xx/s32k118evb:  Add initial support for the NXP S32K118EVB.
2019-08-14 08:47:35 -06:00