tools/configure.c: Trivial design improvement to last commit.
This commit is contained in:
parent
f748d01a53
commit
f41d968455
|
@ -43,8 +43,8 @@ command:
|
|||
|
||||
You may need to be super-user in order access the USB device.
|
||||
|
||||
NOTE: In order for the debug Type C connector to power the phone the DIP
|
||||
Switch B4 must be in the on position. See the MDK User Guide at
|
||||
NOTE: In order for the debug Type C connector to power the phone, the DIP
|
||||
Switch B4 must be in the ON position. See the MDK User Guide at
|
||||
developer.motorola.com for more information on the hardware including the DIP
|
||||
switches.
|
||||
|
||||
|
@ -54,16 +54,21 @@ Or you can use the GDB server. To start the GDB server:
|
|||
|
||||
Then start GDB:
|
||||
|
||||
$ arm-non-linux-gdb
|
||||
$ arm-none-linux-gdb
|
||||
(gdb) target extended-remote localhost:3333
|
||||
(gdb) set can-use-hw-watchpoints 1
|
||||
|
||||
You can load code into FLASH like:
|
||||
|
||||
(gdb) mon halt
|
||||
(gdb) load nuttx
|
||||
(gdb) file nuttx
|
||||
(gdb) mon reset
|
||||
|
||||
NOTE: There is a special version of GDB 7.11 available with some additional,
|
||||
MDK-specific features. It is available in a MotorolaMobilityLLC github.com
|
||||
repository.
|
||||
|
||||
Serial Console
|
||||
==============
|
||||
|
||||
|
|
|
@ -981,101 +981,101 @@ static void disable_feature(const char *destconfig, const char *varname)
|
|||
|
||||
static void set_host(const char *destconfig)
|
||||
{
|
||||
if (g_host != HOST_NOCHANGE)
|
||||
switch (g_host)
|
||||
{
|
||||
switch (g_host)
|
||||
case HOST_LINUX:
|
||||
{
|
||||
case HOST_LINUX:
|
||||
printf(" Select the Linux host\n");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
disable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
}
|
||||
break;
|
||||
|
||||
case HOST_MACOS:
|
||||
{
|
||||
printf(" Select the Linux host\n");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
enable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
}
|
||||
break;
|
||||
|
||||
case HOST_WINDOWS:
|
||||
{
|
||||
enable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
disable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
|
||||
switch (g_windows)
|
||||
{
|
||||
printf(" Select the Linux host\n");
|
||||
case WINDOWS_CYGWIN:
|
||||
printf(" Select Windows/Cygwin host\n");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
enable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
disable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
case WINDOWS_UBUNTU:
|
||||
printf(" Select Ubuntu for Windows 10 host\n");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
case WINDOWS_NATIVE:
|
||||
printf(" Select Windows native host\n");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
default:
|
||||
fprintf(stderr,
|
||||
"ERROR: Unrecognized windows configuration: %d\n",
|
||||
g_windows);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case HOST_MACOS:
|
||||
{
|
||||
printf(" Select the Linux host\n");
|
||||
case HOST_NOCHANGE:
|
||||
break;
|
||||
|
||||
disable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
enable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
}
|
||||
break;
|
||||
|
||||
case HOST_WINDOWS:
|
||||
{
|
||||
enable_feature(destconfig, "CONFIG_HOST_WINDOWS");
|
||||
disable_feature(destconfig, "CONFIG_HOST_LINUX");
|
||||
disable_feature(destconfig, "CONFIG_HOST_OSX");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_MSYS");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_OTHER");
|
||||
|
||||
enable_feature(destconfig, "CONFIG_SIM_X8664_MICROSOFT");
|
||||
disable_feature(destconfig, "CONFIG_SIM_X8664_SYSTEMV");
|
||||
|
||||
disable_feature(destconfig, "CONFIG_SIM_M32");
|
||||
|
||||
switch (g_windows)
|
||||
{
|
||||
case WINDOWS_CYGWIN:
|
||||
printf(" Select Windows/Cygwin host\n");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
case WINDOWS_UBUNTU:
|
||||
printf(" Select Ubuntu for Windows 10 host\n");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
case WINDOWS_NATIVE:
|
||||
printf(" Select Windows native host\n");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_CYGWIN");
|
||||
disable_feature(destconfig, "CONFIG_WINDOWS_UBUNTU");
|
||||
enable_feature(destconfig, "CONFIG_WINDOWS_NATIVE");
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,
|
||||
"ERROR: Unrecognized windows configuration: %d\n",
|
||||
g_windows);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unrecognized host configuration: %d\n", g_host);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
default:
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unrecognized host configuration: %d\n", g_host);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue