Commit Graph

54 Commits

Author SHA1 Message Date
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 801b9d6e5f arch/arm: Remove support for old redundant toolchains.
Remove support for the Codesourcery, Atollic, DevKitArm, Raisonance, and CodeRed toolchains.  Not only are these tools old and no longer used but they are all equivalent to standard ARM EABI toolchains.  Retaining specific support has no effect (they are still supported, but now just as generic EABI toolchains).
2020-05-13 18:41:10 +01:00
Xiang Xiao 7ffafa3654 Remove executable bit from source code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-13 06:32:13 -06:00
Xiang Xiao 92c721a532 boards: Fix the wrong order in some defconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06: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
Gregory Nutt a86884c615 Run all .c and .h files modifed in this PR through nxstyle. 2020-04-30 22:09:51 +01:00
Gregory Nutt 6398a64e26 Rename up_saveusercontext to arm_saveusercontext 2020-04-30 22:09:51 +01:00
Xiang Xiao 5d12735f34 sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-29 14:04:14 -06:00
Xiang Xiao 1692c90d15 Revert "sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared"
This reverts commit ab2e24b42b.
2020-04-29 14:04:14 -06:00
Xiang Xiao ab2e24b42b sama5d3x-ek/nxwm: Fix error: 'g_adcdev' undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-29 07:10:44 -06:00
Xiang Xiao 7ffccf738c Makefile: Remove KERNEL variable which isn't really used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 09:01:58 -06:00
Gregory Nutt ee3ad39026 Remove improper uImage file
Remove boards/arm/sama5/sama5d3-xplained/boot/uImage that can in inadvertantly with a PR merge.

Also, change "/uImage" to just "uImage" in the top-level .gitignore file so that all occurences of uImage will be ignored, not just versions in the nuttx/ top-level directory.
2020-04-24 17:32:48 +01:00
Xiang Xiao f2d4e1e2b7 Follow up change in apps "nshlib: Rename sh to source"
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:54 -06:00
Xiang Xiao 2ec8f60e53 Run refresh.sh --silent all
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-18 07:17:38 -06: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
Gregory Nutt 493b8de938 Revert "Change SAMA5 files to have apache license headers:"
This reverts commit f735584514.

These header changes introduce unacceptable errors:

1. The changes alter the width of the initial block comment.  That will cause nxstyle failures on most of the files.

2. The third line of the header is an (optional) short description of content of the the file.  This change erroneously removes that line.

Automated header file changes can screw up a lot of files, very quickly.
2020-03-07 08:47:48 -03:00
Adam Feuer f735584514 Change SAMA5 files to have apache license headers:
- No code changes
- All files are now utf-8 encoded
- Some non-utf-8 characters in comments were changed or removed
2020-03-06 10:33:08 +00:00
patacongo 730133d84a SAMA5D27 peripheral support - USB Host working (#444)
* SAMA5D27 peripheral support - USB Host working

    - updated nsh defconfig with vfat for testing USB Host
    - sama5d2_xult: USB Host worked.
    - ported sam_bringup.c code from sama5d3-xplained
    - USB 2.0 HS now working
    - other perpherals may work, but haven't been tested

* update license headers to approve NuttX Apache-2.0
2020-03-05 18:24:11 -06:00
Adam Feuer 6b4f9038d4 fix for SAMA5D2 serial console
authored by Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2020-02-28 13:39:36 -06:00
Adam Feuer 511e548613 Ethernet Over USB net helper script and docs
- for CDC ECM driver

Squashed commit of the following:

commit aa9a715498e15ad46d43318a663d296f38160cf8
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:42:52 2020 -0800

    code formatting; removed ping

commit 56520b7f7e2b7f03697eacc2f2b5450b0f7af676
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:42:32 2020 -0800

    add description of netusb.sh helper script

commit afee3d33b1e66138afb7e9713d86b765ceab55b0
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:41:40 2020 -0800

    readme formatting

commit 772e36021f4aee2ba1df408ad29d8b9adedeed9f
Author: Adam Feuer <adam@starcat.io>
Date:   Sun Feb 23 11:38:50 2020 -0800

    updated readme, removed redundant configs

commit 082785178aa6e0d1578034b4b163785fdcb61f22
Author: Adam Feuer <adam@starcat.io>
Date:   Sat Feb 22 17:40:05 2020 -0800

    README, defconfig, and helper script improvements
2020-02-24 20:13:31 -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 bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
YAMAMOTO Takashi 43e9608a14 sama5d4-ek: Fix typos in README 2020-02-20 08:48:16 +01:00
Xiang Xiao dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao f982ee43db drivers/serial: Remove the lowconsole driver
Replace with the syslog console driver which has more capability than lowconsole
2020-02-18 12:51:09 -06: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
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Gregory Nutt 211c6dcaa7 Remove unused configuration option CONFIG_RAMDISK 2020-01-23 17:42:56 -03:00
Xiang Xiao 540e947c0c Run ./tools/refresh.sh --silent all 2020-01-22 20:47:18 -06:00
Gregory Nutt c1f75af084 Fix SAMA5D* warnings
sama5d3-xplained:ethernet-over-phy configuration found in build testing:

  arch/arm/src/sama5/sam_irq.c:  Fix "Control reaches end of non-void function " warning
  arch/arm/src/sama5/sam_udphs.c:  Fix "unused variable 'epno'" warning
  boards/arm/sama5/sama5d*-*/src/sam_usb.c:  Fix "warning 'HAVE_USBHOST' not defined" warnings
2020-01-22 16:42:46 +01:00
Xiang Xiao 346336bb9e Make the read ahead buffer unselectable
Here is the email loop talk about why it is better to remove the option:
https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0

Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 08:24:49 -06:00
Adam Feuer 237c0cca09 CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained #68
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c .h files and fix it

Author: Adam Feuer <adam@starcat.io>

Summary

    Adds CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained
      (and maybe other boards) (most of the code was there already,
      but didn't work out of the box for the SAMA5D36-Xplained)
    Only SAMA5D36-Xplained has been tested so far

Impact

    None if you don't use the CDC ECM Ethernet driver
    On SAMA5D36-Xplained, this adds high-speed Internet connectivity
      over USB 2.0 High Speed. via the USB CDC ECM Gadget driver.
    It may work on other boards too.
    This also fixed full-speed (low-speed) mode for the board too.

Limitations

    Hasn't been tested on anything other than SAMA5D36-Xplained board.

TODO

    Ideally this would include a composite RNDIS device so it would
      also work seamlessly on Windows. That is for a future PR
    Ideally this would include software to help configuration via
      mDNS/DNS-SD for plug and play compatibility with Linux and macOS.
      That is for a future PR.

Detail

    Only a few lines of C driver code needed to be changed, since the
      capability was there already. The rest is config and documentation.
    Changes the SAMA5D3-Xplained board bringup to match the SAMA5D3-EK
      board bringup
    A helper script to configure Linux routing and iptables NAT is also
      provided, along with documentation on how to use it.

Testing

    Manual, on a Ubuntu Linux 19.10 system and MacOS 10.14.6 Mojave
      MacBook Pro.

How To Verify

    Follow the new CDC ECM Ethernet over USB instructions in the board
      README.txt file

Commits:

    remove non-UTF-8 chars in comment and reformat

    removed unneeded comment markers

    instructions for using the defconfigs

    removed EMAC from config

    - to prove this example only needs the CDC ECM Ethernet over USB to work

    added CDC-ECM Ethernet over USB info to README

    added U-Boot image

    added netusb helper script

    - this can configure the Linux network interface and routes
      so you can ping or access the NuttX system via TCP/IP.

    renamed defconfig dirs to be ethernet-over-usb

    - was usb-over-ethernet which is not right

    added USB DMA to defconfigs

    updated readme with autoboot and debugging info

    bringing ethernet-over-usb examples into parity

    added cdc ecm ethernet over usb with telnetd config

    added defconfig

    only use phy interrupt if netdevices is ethernet

    - because now netdevice could be CDC ECM ethernet over usb
      which has no PHY interrupt

    add bringup to Makefile

    add bringup

    app init cleanup

    init cdc ecm driver and rndis driver; some cleanup

    fixed some typos and odd characters

    usb over ethernet working over usb 2.0 hs
2020-01-10 07:13:37 -03: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
Adam Feuer 3c2fbe3d9c sama3 sam_serial.c USART selection fixes (#13)
arch/arm/src/sama5/sam_serial.c:  uart2port in sam_serial, fix the rest of the uarts in sam_serial
boards/arm/sama5/sama5d2-xult/README.txt:   Fix some minor typos
boards/arm/sama5/sama5d2-xult/include/board.h:  Update UART pin disambiguation with default UARTn_RXD, _TXD
2019-12-31 08:10:46 -06:00
Gregory Nutt 9e4602a2f4 drivers/mtd: Apply tools/nxstyle to a few files. Lots more to check. 2019-12-07 08:25:16 -06:00
Gregory Nutt 175131fb31 boards/arm/sama5/sama5d4-ek/src/sam_appinit.c: Fix error found in build testing. Bad conditional compilation for board_app_initialize(). Should depend only on CONFIG_LIB_BOARDCTL, CONFIG_BUILD_KERNEL is irrelevant. 2019-10-27 13:49:25 -06:00
Gregory Nutt 66a55c91e7 Linker scripts: Fix some alignment problems. 2019-09-15 18:06:36 -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 5a41d7f9b5 boards/: Several more fixes to Make.defs files and README.txt files. More collateral damage from the big boargs/ directory re-organization. 2019-09-11 11:15:56 -06:00
Nathan Hartman 366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Augusto Fraga Giachero 68bbc8438c drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00