Merged nuttx/nuttx into master

This commit is contained in:
Aleksandr Vyhovanec
2017-01-06 12:27:19 +03:00
31 changed files with 1186 additions and 115 deletions
+19 -1
View File
@@ -45,6 +45,14 @@ config HOST_OTHER
endchoice
config TOOLCHAIN_WINDOWS
bool
default n
depends on HOST_WINDOWS
---help---
Selected internally if the selected Windows environment is compatible
with the use of Windows native toolchains.
choice
prompt "Windows Build Environment"
default WINDOWS_CYGWIN
@@ -52,24 +60,34 @@ choice
config WINDOWS_NATIVE
bool "Windows Native"
select TOOLCHAIN_WINDOWS
---help---
Build natively in a CMD.exe environment with Windows style paths
(like C:\cgywin\home)
config WINDOWS_CYGWIN
bool "Cygwin"
select TOOLCHAIN_WINDOWS
---help---
Build natively in a Cygwin environment with POSIX style paths (like
/cygdrive/c/cgywin/home)
/cygdrive/c/Program Files)
config WINDOWS_UBUNTU
bool "Ubuntu under Windows 10"
---help---
Build natively in an Unbuntu shell under Windoes 10 environment with
POSIX style paths (like /mnt/c/Program Files)
config WINDOWS_MSYS
bool "MSYS"
select TOOLCHAIN_WINDOWS
---help---
Build natively in a Cygwin environment with POSIX style paths (like
/cygdrive/c/cgywin/home)
config WINDOWS_OTHER
bool "Windows POSIX-like environment"
select TOOLCHAIN_WINDOWS
---help---
Build natively in another POSIX-like environment. Additional
support may be necessary
+180 -12
View File
@@ -1,8 +1,10 @@
README
^^^^^^
o Installation
o Environments
- Installing Cygwin
- Ubuntu Bash under Windows 10
o Installation
- Download and Unpack
- Semi-Optional apps/ Package
- Installation Directories with Spaces in the Path
@@ -34,21 +36,49 @@ README
- Window Native Toolchain Issues
o Documentation
INSTALLATION
ENVIRONMENTS
^^^^^^^^^^^^
NuttX may be installed and built on a Linux system or on a Windows
system if Cygwin is installed. The MSYS environment is an option
to Cygwin on the Windows platform. However, I have little experience
that that configuration and it will not be discussed in this README
file.
NuttX requires a POSIX development environment such as you would find under
Linux or OSX. NuttX may be also be installed and built on Windows system
if you also provde such a POSIX development environment. Options for a
POSIX development environment under Windows include:
Instructions for installation of Cygwin on Windows system are provided
in the following paragraph.
- An installation of Linux on a virtual machine (VM) in Windows. I have
not been happy using a VM myself. I have had stability problems with
open source VMs and commercial VMs cost more than I want to spend.
Sharing files with Linux running in a VM is awkward; sharing devices
connected to the Windows box with Linux in a VM is, at the very least,
confusing; Using Windows tools (such as Segger J-Link) with files
built under the Linux VM is not a possibility.
NuttX can also be installed and built on a native Windows system, but
with some potential tool-related issues (see the discussion "Native
Windows Build" below).
- The Cygwin environment. Instructions for installation of Cygwin on a
Windows system are provided in the following paragraph, "Installing
Cygwin". Cygwin is a mature, well-tested, and very convenient
environment. It is especially expecially convenient if you need to
integrate with Windows tools and files. Downsides are that the
installation time is very long and the compile times are slow.
- Ubuntu/Bash shell under Windows 10. This is a new option under
Windows 10. See the section "Ubuntu Bash under Windows 10" below.
This is an improvement over Cygwin if your concern is compile time;
its build performance is comparable to native Linux, certainly better
than the Cygwin build time. It also installs in a tiny fraction of
the time as Cygwin, perhaps 20 minutes for the basic Ubuntu install
(vs. more than a day for the complete Cygwin install).
- The MSYS environment. I have no experience using the MSYS environment
and that configuration will not be discussed in this README file.
See http://www.mingw.org/wiki/MSYS if you are interested in
using MSYS. People report to me that they have used MSYS
successfully. I suppose that the advantages of the MSYS environemnt
is that it is closer to a native Windows environment and uses only a
minimal of add-on POSIX-land tools.
- NuttX can also be installed and built on a native Windows system, but
with some potential tool-related issues (see the discussion "Native
Windows Build" under "Building NuttX" below). GNUWin32 is used to
provide compatible native windows tools.
Installing Cygwin
-----------------
@@ -84,6 +114,9 @@ Installing Cygwin
"Publishing". You can try omitting KDE, Gnome, GTK, and other
graphics packages if you don't plan to use them.
Perhaps a minimum set would be those packages listed below for the
"Ubuntu Bash under Windows 10" installation?
After installing Cygwin, you will get lots of links for installed
tools and shells. I use the RXVT native shell. It is fast and reliable
and does not require you to run the Cygwin X server (which is neither
@@ -95,6 +128,136 @@ Installing Cygwin
about 5GiB. The server I selected was also very slow so it took
over a day to do the whole install!
Ubuntu Bash under Windows 10
----------------------------
A better version of a command-line only Ubuntu under Windows 10 (beta)
has recently been made available from Microsoft.
Installation
------------
Installation instructions abound on the Internet complete with screen
shots. I will attempt to duplicate those instructions in full here.
Here are the simplified installation steps:
- Open "Settings".
- Click on "Update & security".
- Click on "For Developers".
- Under "Use developer features", select the "Developer mode" option to
setup the environment to install Bash.
- A message box should pop up. Click "Yes" to turn on developer mode.
- After the necessary components install, you'll need to restart your
computer.
Once your computer reboots:
- Open "Control Panel".
- Click on "Programs".
- Click on "Turn Windows features on or off".
- A list of features will pop up, check the "Windows Subsystem for Linux
(beta)" option.
- Click OK.
- Once the components installed on your computer, click the "Restart
now" button to complete the task.
After your computer restarts, you will notice that Bash will not appear in
the "Recently added" list of apps, this is because Bash isn't actually
installed yet. Now that you have setup the necessary components, use the
following steps to complete the installation of Bash:
- Open "Start", do a search for bash.exe, and press "Enter".
- On the command prompt, type y and press Enter to download and install
Bash from the Windows Store. This will take awhile.
- Then you'll need to create a default UNIX user account. This account
doesn't have to be the same as your Windows account. Enter the
username in the required field and press Enter (you can't use the
username "admin").
- Close the "bash.exe" command prompt.
Now that you completed the installation and setup, you can open the Bash
tool from the Start menu like you would with any other app.
Accessing Windows Files from Ubuntu
-----------------------------------
File sysems will be mounted under "/mnt" so for example "C:\Program Files"
appears at "/mnt/c/Program Files". This is as opposed to Cgwin where
the same directory would appear at "/cygdrive/c/Program Files".
With these differences (perhaps a few other Windows quirks) the Ubuntu
install works just like Ubuntu running natively on your PC.
Accessing Ubuntu Files From Windows
-----------------------------------
In Ubuntu Userspace for Windows, the Ubuntu file system root directory is
at:
%localappdata%\lxss\rootfs
Or
C:\Users\Username\AppData\Local\lxss\rootfs
Install Linux Software.
-----------------------
Use "sudo apt-get install <package name>". As examples, this is how
you would get GIT:
$ sudo apt-get install git
This will get you a compiler for your host PC:
$ sudo apt-get install gcc
This will get you an ARM compiler for your target:
$ sudo apt-get install gcc-arm-none-eabi
NOTE: That is just an example. I am not sure if apt-get will give you a
current or usable compiler. You should carefully select your toolchain
for the needs of your project.]
You will also need to the get the kconfig-frontends configuration as
described below under "NuttX Configuration tool". In order build the
kconfig-frontends configuration tool you will also need: make, gperf,
flex, bison, and libncurses-dev.
That is enough to do a basic NuttX build.
Integrating with Windows Tools
------------------------------
If you want to integrate with Windows native tools, then you would need
deal with the same kind of craziness as with integrating Cygwin with
native toolchains, see the section "Cygwin Build Problems" below.
However, there is currently no build support for using Windows native
tools with Ubuntu under Windows. This tool combination is made to work
with Cygwin through the use of the 'cygpath -w' tool that converts paths
from say '/cydrive/c/Program Files' to 'C:\Program Files'. There is,
however, no corresponding tool to convert '/mnt/c/Program Files' in the
Ubuntu environment.
Graphics Support
----------------
The Ubuntu version support by Microsoft is a command-line only version.
There is no support for Linux graphics utilities.
This limititation is not a limitation of Ubuntu, however, only in what
Microsoft is willing to support. If you install a X-Server, then you
can also use basic graphics utilities. See for example:
http://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
Many Linux graphics programs would, however, also require a graphics
framework like GTK or Qt. So this might be a trip down the rabbit hole.
INSTALLATION
^^^^^^^^^^^^
There are two ways to get NuttX: You may download released, stable
tarballs from wither the Bitbucket or Sourceforge download locations.
Or you may get NuttX by cloning the Bitbucket GIT repositories. Let's
consider the released tarballs first:
Download and Unpack
-------------------
@@ -105,6 +268,11 @@ Download and Unpack
match the various instructions in the documentation and some scripts
in the source tree.
Download locations:
https://bitbucket.org/nuttx/nuttx/downloads
https://sourceforge.net/projects/nuttx/files/nuttx/
Semi-Optional apps/ Package
---------------------------
+5 -5
View File
@@ -7,8 +7,8 @@ comment "ARM Configuration Options"
choice
prompt "Toolchain Selection"
default ARM_TOOLCHAIN_GNU_EABIW if HOST_WINDOWS
default ARM_TOOLCHAIN_GNU_EABIL if !HOST_WINDOWS
default ARM_TOOLCHAIN_GNU_EABIW if TOOLCHAIN_WINDOWS
default ARM_TOOLCHAIN_GNU_EABIL if !TOOLCHAIN_WINDOWS
config ARM_TOOLCHAIN_BUILDROOT
bool "Buildroot (Cygwin or Linux)"
@@ -24,11 +24,11 @@ config ARM_TOOLCHAIN_CODESOURCERYL
config ARM_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARM_TOOLCHAIN_DEVKITARM
bool "devkitARM GNU toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARM_TOOLCHAIN_GNU_EABIL
bool "Generic GNU EABI toolchain under Linux (or other POSIX environment)"
@@ -38,7 +38,7 @@ config ARM_TOOLCHAIN_GNU_EABIL
config ARM_TOOLCHAIN_GNU_EABIW
bool "Generic GNU EABI toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
configured for arm-none-eabi-.
+7 -7
View File
@@ -7,12 +7,12 @@ comment "ARMV6M Configuration Options"
choice
prompt "Toolchain Selection"
default ARMV6M_TOOLCHAIN_GNU_EABIW if HOST_WINDOWS
default ARMV6M_TOOLCHAIN_GNU_EABIL if !HOST_WINDOWS
default ARMV6M_TOOLCHAIN_GNU_EABIW if TOOLCHAIN_WINDOWS
default ARMV6M_TOOLCHAIN_GNU_EABIL if !TOOLCHAIN_WINDOWS
config ARMV6M_TOOLCHAIN_ATOLLIC
bool "Atollic Lite/Pro for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV6M_TOOLCHAIN_BUILDROOT
bool "Buildroot (Cygwin or Linux)"
@@ -24,7 +24,7 @@ config ARMV6M_TOOLCHAIN_CODEREDL
config ARMV6M_TOOLCHAIN_CODEREDW
bool "CodeRed for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV6M_TOOLCHAIN_CODESOURCERYL
bool "CodeSourcery GNU toolchain under Linux"
@@ -32,11 +32,11 @@ config ARMV6M_TOOLCHAIN_CODESOURCERYL
config ARMV6M_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV6M_TOOLCHAIN_DEVKITARM
bool "devkitARM GNU toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV6M_TOOLCHAIN_GNU_EABIL
bool "Generic GNU EABI toolchain under Linux (or other POSIX environment)"
@@ -46,7 +46,7 @@ config ARMV6M_TOOLCHAIN_GNU_EABIL
config ARMV6M_TOOLCHAIN_GNU_EABIW
bool "Generic GNU EABI toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
configured for arm-none-eabi.
+5 -5
View File
@@ -128,8 +128,8 @@ endif # ARMV7A_HAVE_L2CC
choice
prompt "Toolchain Selection"
default ARMV7A_TOOLCHAIN_GNU_EABIW if HOST_WINDOWS
default ARMV7A_TOOLCHAIN_GNU_EABIL if !HOST_WINDOWS
default ARMV7A_TOOLCHAIN_GNU_EABIW if TOOLCHAIN_WINDOWS
default ARMV7A_TOOLCHAIN_GNU_EABIL if !TOOLCHAIN_WINDOWS
config ARMV7A_TOOLCHAIN_BUILDROOT
bool "Buildroot (Cygwin or Linux)"
@@ -145,11 +145,11 @@ config ARMV7A_TOOLCHAIN_CODESOURCERYL
config ARMV7A_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV7A_TOOLCHAIN_DEVKITARM
bool "devkitARM GNU toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV7A_TOOLCHAIN_GNU_EABIL
bool "Generic GNU EABI toolchain under Linux (or other POSIX environment)"
@@ -159,7 +159,7 @@ config ARMV7A_TOOLCHAIN_GNU_EABIL
config ARMV7A_TOOLCHAIN_GNU_EABIW
bool "Generic GNU EABI toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
configured for arm-none-eabi-.
+9 -9
View File
@@ -48,12 +48,12 @@ config ARMV7M_DTCM
choice
prompt "Toolchain Selection"
default ARMV7M_TOOLCHAIN_GNU_EABIW if HOST_WINDOWS
default ARMV7M_TOOLCHAIN_GNU_EABIL if !HOST_WINDOWS
default ARMV7M_TOOLCHAIN_GNU_EABIW if TOOLCHAIN_WINDOWS
default ARMV7M_TOOLCHAIN_GNU_EABIL if !TOOLCHAIN_WINDOWS
config ARMV7M_TOOLCHAIN_IARW
bool "IAR for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_IAR
config ARMV7M_TOOLCHAIN_IARL
@@ -63,7 +63,7 @@ config ARMV7M_TOOLCHAIN_IARL
config ARMV7M_TOOLCHAIN_ATOLLIC
bool "Atollic Lite/Pro for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
config ARMV7M_TOOLCHAIN_BUILDROOT
@@ -78,7 +78,7 @@ config ARMV7M_TOOLCHAIN_CODEREDL
config ARMV7M_TOOLCHAIN_CODEREDW
bool "CodeRed for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
config ARMV7M_TOOLCHAIN_CODESOURCERYL
@@ -88,12 +88,12 @@ config ARMV7M_TOOLCHAIN_CODESOURCERYL
config ARMV7M_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
config ARMV7M_TOOLCHAIN_DEVKITARM
bool "devkitARM GNU toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
config ARMV7M_TOOLCHAIN_GNU_EABIL
@@ -106,7 +106,7 @@ config ARMV7M_TOOLCHAIN_GNU_EABIL
config ARMV7M_TOOLCHAIN_GNU_EABIW
bool "Generic GNU EABI toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
@@ -114,7 +114,7 @@ config ARMV7M_TOOLCHAIN_GNU_EABIW
config ARMV7M_TOOLCHAIN_RAISONANCE
bool "STMicro Raisonance for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
select ARM_TOOLCHAIN_GNU
endchoice
+5 -5
View File
@@ -144,8 +144,8 @@ endif # ARMV7R_HAVE_L2CC
choice
prompt "Toolchain Selection"
default ARMV7R_TOOLCHAIN_GNU_EABIW if HOST_WINDOWS
default ARMV7R_TOOLCHAIN_GNU_EABIL if !HOST_WINDOWS
default ARMV7R_TOOLCHAIN_GNU_EABIW if TOOLCHAIN_WINDOWS
default ARMV7R_TOOLCHAIN_GNU_EABIL if !TOOLCHAIN_WINDOWS
config ARMV7R_TOOLCHAIN_BUILDROOT
bool "Buildroot (Cygwin or Linux)"
@@ -161,11 +161,11 @@ config ARMV7R_TOOLCHAIN_CODESOURCERYL
config ARMV7R_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV7R_TOOLCHAIN_DEVKITARM
bool "devkitARM GNU toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config ARMV7R_TOOLCHAIN_GNU_EABIL
bool "Generic GNU EABI toolchain under Linux (or other POSIX environment)"
@@ -175,7 +175,7 @@ config ARMV7R_TOOLCHAIN_GNU_EABIL
config ARMV7R_TOOLCHAIN_GNU_EABIW
bool "Generic GNU EABI toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
configured for arm-none-eabi-.
+1 -1
View File
@@ -2574,11 +2574,11 @@ static bool stm32_dmasupported(FAR struct sdio_dev_s *dev)
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen)
{
#if !defined(CONFIG_STM32_STM32F40XX)
struct stm32_dev_s *priv = (struct stm32_dev_s *)dev;
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
#if !defined(CONFIG_STM32_STM32F40XX)
/* Wide bus operation is required for DMA */
if (!priv->widebus)
+3 -4
View File
@@ -8,13 +8,13 @@ comment "AVR Configuration Options"
choice
prompt "Toolchain"
default AVR_WINAVR_TOOLCHAIN if HOST_WINDOWS
default AVR_WINAVR_TOOLCHAIN if TOOLCHAIN_WINDOWS
default AVR_BUILDROOT_TOOLCHAIN if HOST_LINUX
default AVR_CROSSPACK_TOOLCHAIN if HOST_OSX
config AVR_WINAVR_TOOLCHAIN
bool "WinAVR"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
For Cygwin development environment on Windows machines, you
can use WinAVR: http://sourceforge.net/projects/winavr/files/
@@ -29,7 +29,7 @@ config AVR_WINAVR_TOOLCHAIN
config AVR_ATMEL_AVR_TOOLCHAIN
bool "Atmel AVR Toolchain"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
Atmel provides GNU Toolchain for AVR development. It can
be obtained by installing Atmel Studio 6 and later or
@@ -55,7 +55,6 @@ config AVR_CROSSPACK_TOOLCHAIN
config AVR_BUILDROOT_TOOLCHAIN
bool "Buildroot"
depends on HOST_LINUX || HOST_WINDOWS
---help---
There is a DIY buildroot version for the AVR boards here:
http://sourceforge.net/projects/nuttx/files/buildroot/. See
+2 -2
View File
@@ -8,12 +8,12 @@ comment "AVR32 Configuration Options"
choice
prompt "Toolchain"
default AVR32_AVRTOOLSW if HOST_WINDOWS
default AVR32_AVRTOOLSW if TOOLCHAIN_WINDOWS
default AVR32_AVRTOOLSL if HOST_LINUX
config AVR32_AVRTOOLSW
bool "AVR tools for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config AVR32_AVRTOOLSL
bool "AVR tools for Linux"
+6 -6
View File
@@ -8,8 +8,8 @@ comment "MIPS32 Configuration Options"
choice
prompt "Toolchain Selection"
default MIPS32_TOOLCHAIN_MICROCHIPW_LITE if HOST_WINDOWS
default MIPS32_TOOLCHAIN_GNU_ELF if !HOST_WINDOWS
default MIPS32_TOOLCHAIN_MICROCHIPW_LITE if TOOLCHAIN_WINDOWS
default MIPS32_TOOLCHAIN_GNU_ELF if !TOOLCHAIN_WINDOWS
config MIPS32_TOOLCHAIN_GNU_ELF
bool "Generic GNU ELF toolchain"
@@ -31,15 +31,15 @@ config MIPS32_TOOLCHAIN_MICROCHIPL_LITE
config MIPS32_TOOLCHAIN_MICROCHIPW_XC32
bool "Microchip XC32 toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config MIPS32_TOOLCHAIN_MICROCHIPW
bool "Microchip C32 toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config MIPS32_TOOLCHAIN_MICROCHIPW_LITE
bool "Microchip C32 toolchain under Windows (Lite edition)"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config MIPS32_TOOLCHAIN_MICROCHIPOPENL
bool "microchipOpen toolchain under Linux"
@@ -47,7 +47,7 @@ config MIPS32_TOOLCHAIN_MICROCHIPOPENL
config MIPS32_TOOLCHAIN_PINGUINOW
bool "Pinguino mips-elf toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
config MIPS32_TOOLCHAIN_PINGUINOL
bool "Pinguino mips-elf toolchain under OS X or Linux"
+3 -3
View File
@@ -7,8 +7,8 @@ if ARCH_CHIP_LM32
choice
prompt "Toolchain Selection"
default LM32_TOOLCHAIN_GNUW if HOST_WINDOWS
default LM32_TOOLCHAIN_GNUL if !HOST_WINDOWS
default LM32_TOOLCHAIN_GNUW if TOOLCHAIN_WINDOWS
default LM32_TOOLCHAIN_GNUL if !TOOLCHAIN_WINDOWS
config LM32_TOOLCHAIN_BUILDROOT
bool "Buildroot (Cygwin or Linux)"
@@ -22,7 +22,7 @@ config LM32_TOOLCHAIN_GNUL
config LM32_TOOLCHAIN_GNUW
bool "Generic GNU toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
configured for lm32-elf-.
+3 -3
View File
@@ -7,8 +7,8 @@ comment "RV32IM Configuration Options"
choice
prompt "Toolchain Selection"
default RV32IM_TOOLCHAIN_GNU_RVGW if HOST_WINDOWS
default RV32IM_TOOLCHAIN_GNU_RVGL if !HOST_WINDOWS
default RV32IM_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS
default RV32IM_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS
config RV32IM_TOOLCHAIN_GNU_RVGL
bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)"
@@ -18,7 +18,7 @@ config RV32IM_TOOLCHAIN_GNU_RVGL
config RV32IM_TOOLCHAIN_GNU_RVGW
bool "Generic GNU RVG toolchain under Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
---help---
This option should work for any modern GNU toolchain (GCC 5.2 or newer)
configured for riscv32-unknown-elf.
+1 -1
View File
@@ -37,7 +37,7 @@ config SIM_CYGWIN_DECORATED
default n
depends on WINDOWS_CYGWIN
---help---
Older versions of Cygwin toolsdecorated C symbol names by adding an
Older versions of Cygwin tools decorated C symbol names by adding an
underscore to the beginning of the symbol name. Newer versions of
Cygwin do not seem to do this.
+3 -3
View File
@@ -7,8 +7,8 @@ if ARCH_CHIP_Z180
choice
prompt "Toolchain Selection"
default Z180_TOOLCHAIN_SDCCW if HOST_WINDOWS
default Z180_TOOLCHAIN_SDCCL if !HOST_WINDOWS
default Z180_TOOLCHAIN_SDCCW if TOOLCHAIN_WINDOWS
default Z180_TOOLCHAIN_SDCCL if !TOOLCHAIN_WINDOWS
config Z180_TOOLCHAIN_SDCCL
bool "SDCC for Linux, MAC OSX, or Cygwin"
@@ -16,7 +16,7 @@ config Z180_TOOLCHAIN_SDCCL
config Z180_TOOLCHAIN_SDCCW
bool "SDCC for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
endchoice
+3 -3
View File
@@ -7,8 +7,8 @@ if ARCH_CHIP_Z80
choice
prompt "Toolchain Selection"
default Z80_TOOLCHAIN_SDCCW if HOST_WINDOWS
default Z80_TOOLCHAIN_SDCCL if !HOST_WINDOWS
default Z80_TOOLCHAIN_SDCCW if TOOLCHAIN_WINDOWS
default Z80_TOOLCHAIN_SDCCL if !TOOLCHAIN_WINDOWS
config Z80_TOOLCHAIN_SDCCL
bool "SDCC for Linux, MAC OSX, or Cygwin"
@@ -16,7 +16,7 @@ config Z80_TOOLCHAIN_SDCCL
config Z80_TOOLCHAIN_SDCCW
bool "SDCC for Windows"
depends on HOST_WINDOWS
depends on TOOLCHAIN_WINDOWS
endchoice
+7
View File
@@ -555,6 +555,13 @@ config NXFONT_X11_MISC_FIXED_10X20
This option enables support for a "x11-misc-fixed-10x20".
(font ID FONTID_X11_MISC_FIXED_10X20 == 42).
config NXFONT_TOM_THUMB_4X6
bool "Tom Thumb Monospace 4x6"
default n
---help---
This option enables support for a small, 3x5 font (with blank space
padding to 4x6) (font ID FONTID_TOM_THUMB_4X6 == 43).
endmenu
menuconfig NXTERM
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/nx/nxfonts.h
*
* Copyright (C) 2008, 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2008, 2009, 2011, 2015, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,7 @@
/****************************************************************************
* Pre-processor definitions
****************************************************************************/
/* Select the default font. If no fonts are selected, then a compilation
* error is likely down the road.
*/
@@ -194,6 +195,11 @@
#elif defined(CONFIG_NXFONT_MONO5X8)
# define NXFONT_DEFAULT FONTID_MONO5X8
/* Tom Thumb mono-space 4x6 font */
#elif defined(CONFIG_NXFONT_TOM_THUMB_4X6)
# define NXFONT_DEFAULT FONTID_TOM_THUMB_4X6
#endif
/****************************************************************************
@@ -387,6 +393,10 @@ enum nx_fontid_e
#ifdef CONFIG_NXFONT_X11_MISC_FIXED_10X20
, FONTID_X11_MISC_FIXED_10X20 = 42 /* X11 misc fixed 10x20 */
#endif
#ifdef CONFIG_NXFONT_TOM_THUMB_4X6
, FONTID_TOM_THUMB_4X6 = 43 /* Tom Thumb monospace 4x6 */
#endif
};
/* This structures provides the metrics for one glyph */
+4
View File
@@ -225,6 +225,10 @@ ifeq ($(CONFIG_NXFONT_X11_MISC_FIXED_10X20),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=42 EXTRADEFINES=$(EXTRADEFINES)
endif
ifeq ($(CONFIG_NXFONT_TOM_THUMB_4X6),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=43 EXTRADEFINES=$(EXTRADEFINES)
endif
gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource gen32bppsources genfontsources
$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
+5 -1
View File
@@ -1,7 +1,7 @@
############################################################################
# libnx/nxfonts/Make.defs
#
# Copyright (C) 2008, 2013 Gregory Nutt. All rights reserved.
# Copyright (C) 2008, 2013, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -225,7 +225,11 @@ ifeq ($(CONFIG_NXFONT_X11_MISC_FIXED_10X20),y)
CSRCS += nxfonts_bitmaps_x11-misc-fixed-10x20.c
endif
# Tom Thumb mono-space 4x6 font
ifeq ($(CONFIG_NXFONT_TOM_THUMB_4X6),y)
CSRCS += nxfonts_tom-thumb-4x6.c
endif
# Add the nxfont/ directory to the build
+7 -1
View File
@@ -1,7 +1,7 @@
############################################################################
# libnx/nxfonts/Makefile.sources
#
# Copyright (C) 2008, 2013 Gregory Nutt. All rights reserved.
# Copyright (C) 2008, 2013, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -296,6 +296,12 @@ NXFONTS_PREFIX := g_x11_misc_fixed_10x20_
GEN_CSRC = nxfonts_bitmaps_x11-misc-fixed-10x20.c
endif
# Tom Thumb mono-space 4x6 font
ifeq ($(NXFONTS_FONTID),43)
NXFONTS_PREFIX := g_tom_thumb_4x6_
GEN_CSRC = nxfonts_tom-thumb-4x6.c
endif
DEPENDENCY := nxfonts_bitmaps.c
CPPFLAGS += -DNXFONTS_FONTID=$(NXFONTS_FONTID)
+2 -5
View File
@@ -54,10 +54,6 @@
# define CONFIG_NXFONTS_CHARBITS 7
#endif
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
@@ -65,7 +61,8 @@
#undef EXTERN
#if defined(__cplusplus)
# define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
# define EXTERN extern
#endif
+2
View File
@@ -130,6 +130,8 @@
# include "nxfonts_x11-misc-fixed-9x18B.h"
#elif NXFONTS_FONTID == 42
# include "nxfonts_x11-misc-fixed-10x20.h"
#elif NXFONTS_FONTID == 43
# include "nxfonts_tom-thumb-4x6.h"
#else
# error "No font ID specified"
#endif
+11 -14
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* libnx/nxfonts/nxfonts_getfont.c
*
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2011, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -48,14 +48,6 @@
#include "nxfonts.h"
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
@@ -246,9 +238,12 @@ extern const struct nx_fontpackage_s g_x11_misc_fixed_9x18B_package;
extern const struct nx_fontpackage_s g_x11_misc_fixed_10x20_package;
#endif
#ifdef CONFIG_NXFONT_TOM_THUMB_4X6
extern const struct nx_fontpackage_s g_tom_thumb_4x6_package;
#endif
static FAR const struct nx_fontpackage_s *g_fontpackages[] =
{
/* MONO */
#ifdef CONFIG_NXFONT_MONO5X8
@@ -431,13 +426,15 @@ static FAR const struct nx_fontpackage_s *g_fontpackages[] =
&g_x11_misc_fixed_10x20_package,
#endif
/* Tom Thumb mono-space 4x6 font */
#ifdef CONFIG_NXFONT_TOM_THUMB_4X6
&g_tom_thumb_4x6_package,
#endif
NULL
};
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/pthread/pthread_cancel.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2013, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -120,8 +120,6 @@ int pthread_cancel(pthread_t thread)
/* If the thread is waiting at a cancellation point, then notify of the
* cancellation thereby waking the task up with an ECANCELED error.
*
* REVISIT: is locking the scheduler sufficent in SMP mode?
*/
if (tcb->cmn.cpcount > 0)
+4
View File
@@ -67,10 +67,14 @@
int sched_unlock(void)
{
FAR struct tcb_s *rtcb = this_task();
#ifdef CONFIG_SMP
int cpu;
cpu = this_cpu();
rtcb = current_task(cpu);
#else
rtcb = this_task();
#endif
/* Check for some special cases: (1) rtcb may be NULL only during
* early boot-up phases, and (2) sched_unlock() should have no
-2
View File
@@ -152,8 +152,6 @@ int task_delete(pid_t pid)
/* If the task is waiting at a cancellation point, then notify of the
* cancellation thereby waking the task up with an ECANCELED error.
*
* REVISIT: is locking the scheduler sufficent in SMP mode?
*/
if (dtcb->cpcount > 0)
+7 -7
View File
@@ -269,7 +269,7 @@ bdf-convert.c
2. Use the bdf-converter program to convert the BDF font to the NuttX
font format. This will result in a C header file containing
definitions. That header file should be installed at, for example,
graphics/nxfonts/nxfonts_myfont.h.
libnx/nxfonts/nxfonts_myfont.h.
Create a new NuttX configuration variable. For example, suppose
you define the following variable: CONFIG_NXFONT_MYFONT. Then
@@ -324,7 +324,7 @@ bdf-convert.c
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
endif
6. nuttx/graphics/nxfonts/Make.defs. Set the make variable NXFSET_CSRCS.
6. nuttx/libnx/nxfonts/Make.defs. Set the make variable NXFSET_CSRCS.
NXFSET_CSRCS determines the name of the font C file to build when
NXFONTS_FONTID=2:
@@ -335,12 +335,12 @@ bdf-convert.c
NXFSET_CSRCS += nxfonts_bitmaps_myfont.c
endif
7. nuttx/graphics/nxfonts/Makefile.sources. This is the Makefile used
7. nuttx/libnx/nxfonts/Makefile.sources. This is the Makefile used
in step 5 that will actually generate the font C file. So, given
your NXFONTS_FONTID=2, it needs to determine a prefix to use for
auto-generated variable and function names and (again) the name of
the auto-generated file to create (this must be the same name that
was used in nuttx/graphics/nxfonts/Make.defs):
was used in nuttx/libnx/nxfonts/Make.defs):
ifeq ($(NXFONTS_FONTID),1)
NXFONTS_PREFIX := g_sans23x27_
@@ -351,9 +351,9 @@ bdf-convert.c
GEN_CSRC = nxfonts_bitmaps_myfont.c
endif
8. graphics/nxfonts/nxfonts_bitmaps.c. This is the file that contains
8. graphics/libnx/nxfonts_bitmaps.c. This is the file that contains
the generic font structures. It is used as a "template" file by
nuttx/graphics/nxfonts/Makefile.sources to create your customized
nuttx/libnx/nxfonts/Makefile.sources to create your customized
font data set.
#if NXFONTS_FONTID == 1
@@ -367,7 +367,7 @@ bdf-convert.c
Where nxfonts_myfont.h is the NuttX font file that we generated in
step 2 using the bdf-converter tool.
9. graphics/nxfonts/nxfonts_getfont.c. Finally, we need to extend the
9. libnx/nxfonts/nxfonts_getfont.c. Finally, we need to extend the
logic that does the run-time font lookups so that can find our new
font. The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid).
The new font information needs to be added to data structures used by
+22 -6
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# tools/sethost.sh
#
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -42,13 +42,14 @@ unset configfile
function showusage {
echo ""
echo "USAGE: $progname [-w|l] [-c|n] [-32|64] [<config>]"
echo "USAGE: $progname [-w|l] [-c|u|n] [-32|64] [<config>]"
echo " $progname -h"
echo ""
echo "Where:"
echo " -w|l selects Windows (w) or Linux (l). Default: Linux"
echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin"
echo " -32|64 selects 32- or 64-bit host (Only for Cygwin). Default 64"
echo " -c|u|n selects Windows environment option: Cygwin (c), Ubuntu under"
echo " Windows 10 (u), or Windows native (n). Default Cygwin"
echo " -32|64 selects 32- or 64-bit host. Default 64"
echo " -h will show this help test and terminate"
echo " <config> selects configuration file. Default: .config"
exit 1
@@ -65,9 +66,15 @@ while [ ! -z "$1" ]; do
host=linux
;;
-c )
host=windows
wenv=cygwin
;;
-u )
host=windows
wenv=ubuntu
;;
-n )
host=windows
wenv=native
;;
-32 )
@@ -170,6 +177,7 @@ if [ "X$host" == "Xlinux" ]; then
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER
@@ -184,11 +192,19 @@ else
if [ "X$wenv" == "Xcygwin" ]; then
echo " Select CONFIG_WINDOWS_CYGWIN=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN
if [ "X$wenv" == "Xubuntu" ]; then
echo " Select CONFIG_WINDOWS_UBUNTU=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
fi
fi
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS
+21 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# testbuild.sh
#
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -47,12 +47,13 @@ unset testfile
function showusage {
echo ""
echo "USAGE: $progname [-w|l] [-c|n] [-s] [-a <appsdir>] [-n <nxdir>] <testlist-file>"
echo "USAGE: $progname [-w|l] [-c|u|n] [-s] [-a <appsdir>] [-n <nxdir>] <testlist-file>"
echo " $progname -h"
echo ""
echo "Where:"
echo " -w|l selects Windows (w) or Linux (l). Default: Linux"
echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin"
echo " -c|u|n selects Windows environment option: Cygwin (c), Ubuntu under"
echo " Windows 10 (u), or Windows native (n). Default Cygwin"
echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int"
echo " -a <appsdir> provides the relative path to the apps/ directory. Default ../apps"
echo " -n <nxdir> provides the relative path to the NxWidgets/ directory. Default ../NxWidgets"
@@ -76,12 +77,19 @@ while [ ! -z "$1" ]; do
host=linux
;;
-c )
host=windows
wenv=cygwin
;;
-u )
host=windows
wenv=ubuntu
;;
-n )
host=windows
wenv=native
;;
-s )
host=windows
sizet=long
;;
-a )
@@ -165,11 +173,19 @@ function configure {
if [ "X$wenv" == "Xcygwin" ]; then
echo " Select CONFIG_WINDOWS_CYGWIN=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN
if [ "X$wenv" == "Xubuntu" ]; then
echo " Select CONFIG_WINDOWS_UBUNTU=y"
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
fi
fi
kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS