build: Fixes for cross-compilation. (#1527)

This commit includes two changes:

*   Removes existing `AC_NO_EXECUTABLES` from `configure.ac`, since it
    is a hack only intended to be used by the GCC project.
*   Adds a new configure argument: `--enable-no-executables-hack`,
    which restores `AC_NO_EXECUTABLES` for broken build environemnts
    which require it.
*   Removes `--target` from example makefiles, since it is only
    appropriate when compiling compilers.

As a side effect of the second change, cross compiling with the
makefiles now no longer causes the `arm-none-eabi-` prefix to be
prepended to all built executables. This change updates all of the
documentation accordingly.
This commit is contained in:
Robert Quattlebaum
2017-03-29 13:22:07 -07:00
committed by Jonathan Hui
parent 2fa7a13c1b
commit 812cc838eb
11 changed files with 54 additions and 55 deletions
-1
View File
@@ -154,7 +154,6 @@ $(ECHO) " CONFIG $(TargetTuple)..."
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
--host=arm-none-eabi \
--target=arm-none-eabi \
--prefix=/ \
--exec-prefix=/$(TargetTuple) \
$(configure_OPTIONS))
-1
View File
@@ -143,7 +143,6 @@ $(ECHO) " CONFIG $(TargetTuple)..."
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
--host=arm-none-eabi \
--target=arm-none-eabi \
--prefix=/ \
--exec-prefix=/$(TargetTuple) \
$(configure_OPTIONS))
-1
View File
@@ -153,7 +153,6 @@ $(ECHO) " CONFIG $(TargetTuple)..."
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
--host=arm-none-eabi \
--target=arm-none-eabi \
--prefix=/ \
--exec-prefix=/$(TargetTuple) \
$(configure_OPTIONS))
-1
View File
@@ -207,7 +207,6 @@ $(ECHO) " CONFIG $(TargetTuple)..."
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" CCAS="$(CCAS)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CCASFLAGS="$(CCASFLAGS)" LDFLAGS="$(LDFLAGS)" \
--host=arm-none-eabi \
--target=arm-none-eabi \
--prefix=/ \
--exec-prefix=/$(TargetTuple) \
$(configure_OPTIONS))
+1 -1
View File
@@ -23,4 +23,4 @@ The server listens to the clients.
The client sends a message to the server and the server echos that message back to the client.
![Talk Functionality](../../../doc/images/windows-app-talk-client.png)
![Talk Functionality](../../../doc/images/windows-app-talk-client.png)
+1 -1
View File
@@ -28,7 +28,7 @@ After a successful build, the `elf` files are found in
`<path-to-openthread>/output/cc2538/bin`. You can convert them to `bin`
files using `arm-none-eabi-objcopy`:
```bash
$ arm-none-eabi-objcopy -O binary arm-none-eabi-ot-cli-ftd arm-none-eabi-ot-cli-ftd.bin
$ arm-none-eabi-objcopy -O binary ot-cli-ftd ot-cli-ftd.bin
```
## Flash Binaries
+2 -2
View File
@@ -67,14 +67,14 @@ To flash the images with [Flash Programmer 2][ti-flash-programmer-2], the files
must have the `*.elf` extension.
```bash
$ cd <path-to-openthread>/output/cc2650/bin
$ cp arm-none-eabi-ot-cli arm-none-eabi-ot-cli.elf
$ cp ot-cli ot-cli.elf
```
To load the images with the [serial bootloader][ti-cc2650-bootloader], the
images must be converted to `bin`. This is done using `arm-none-eabi-objcopy`
```bash
$ cd <path-to-openthread>/output/cc2650/bin
$ arm-none-eabi-objcopy -O binary arm-none-eabi-ot-cli arm-none-eabi-ot-cli.bin
$ arm-none-eabi-objcopy -O binary ot-cli ot-cli.bin
```
The [cc2538-bsl.py script][cc2538-bsl-tool] provides a convenient method
for flashing a CC2650 via the UART.
+1 -1
View File
@@ -38,7 +38,7 @@ Flash Binaries:
2. Return to previous terminal window and execute a command in order to flash the board:
```bash
$ ./cli_programmer gdbserver write_qspi_exec ../../../output/da15000/bin/arm-none-eabi-ot-cli-ftd.bin
$ ./cli_programmer gdbserver write_qspi_exec ../../../output/da15000/bin/ot-cli-ftd.bin
```
## Interact:
+2 -2
View File
@@ -26,7 +26,7 @@ After a successful build, the `elf` files can be found in
`<path-to-openthread>/output/nrf52840/bin`. You can convert them to `hex`
files using `arm-none-eabi-objcopy`:
```bash
$ arm-none-eabi-objcopy -O ihex arm-none-eabi-ot-cli-ftd arm-none-eabi-ot-cli-ftd.hex
$ arm-none-eabi-objcopy -O ihex ot-cli-ftd ot-cli-ftd.hex
```
## Flashing the binaries
@@ -37,7 +37,7 @@ part of the [nRF5x Command Line Tools][nRF5x-Command-Line-Tools].
[nRF5x-Command-Line-Tools]: https://www.nordicsemi.com/eng/Products/nRF52840#Downloads
```bash
$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/arm-none-eabi-ot-cli-ftd.hex
$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/ot-cli-ftd.hex
$ nrfjprog -f nrf52 -r
```