Skip to content

Removing old version content #1292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/api/memory/memory_intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Memory optimizations

Beginning with Mbed OS 5, new features such as RTOS created an increase in flash and RAM usage. This guide explains how to visualize the memory model in Mbed OS and how to instrument and optimize program memory use for release builds using Mbed OS 5.

<span class="notes">**Note:** More information about the memory usage differences between Mbed OS 2 and Mbed OS 5 is available in [a blog post](https://os.mbed.com/blog/entry/Optimizing-memory-usage-in-mbed-OS-52/).</span>
This guide explains how to visualize the memory model in Mbed OS and how to instrument and optimize program memory use to understand the flash and RAM impact of features.
12 changes: 0 additions & 12 deletions docs/api/networksocket/networksocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ sock.recv(buf, 100);
sock.close();
```

## Changes in Mbed OS 5.10

The 5.10 release refactors the Mbed OS Socket API. For most of the applications, these changes are not noticeable because the `TCPSocket` and `UDPSocket` classes still emulate legacy behavior.

The new design contains an abstract socket interface that applications can use directly. Casting `Socket` pointers back to `TCPSocket` or `UDPSocket` is no longer necessary.

Upcasting any protocol specific class to `Socket` has no side effect and is a recommended API design. Knowing the exact type is only required when you create the socket.

The new design also emphasizes use of `SocketAddress` for holding the IP addresses, instead on textual format. `SocketAddress` is a container class that protocols other than IP can use in the future. Legacy string versions of `connect()`, `bind()` and `sendto()` functions do not exist in the `Socket` base class, but they exist in `TCPSocket` and `UDPSocket` classes.

The new design also renders the TCPServer API unnecessary, moving its functionality directly into TCPSocket itself. The legacy TCPServer class still exists and is fully functional.

## Using DNS names

IP stacks operate only on binary IP addresses, but in Internet, servers are known by their symbolic domain name (DNS). To use these names with Socket interface, each name has to be resolved before.
Expand Down
160 changes: 85 additions & 75 deletions docs/api/tutorials_intro.md → docs/introduction/tutorials_intro.md

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions docs/porting/psa/TLS-on-PSA.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ If an application was built with Mbed TLS that was not PSA enabled, you can stil

_Please note that this is likely to change at a later date though, as existing interfaces are likely to be deprecated in favor of the new, PSA-based APIs - if, when and how it happens is outside the scope of this document._

If your application doesn't use any of the PSA-specific APIs described below, then you can use it with the version in Mbed OS 5.12 by just recompiling it. (Note that relinking is not enough, though.)

If your application uses one of the PSA-specific APIs described below, then you need to change its source code because the APIs have changed in an incompatible way between Mbed OS 5.11 and Mbed OS 5.12 to reflect changes in PSA Crypto, whose API wasn't stable as of Mbed OS 5.11.
If your application doesn't use any of the PSA-specific APIs described below, you can use it with the version in Mbed OS by just recompiling it. (Note that relinking is not enough, though.)

# PSA-based APIs in Mbed TLS

Expand Down
2 changes: 1 addition & 1 deletion docs/porting/tools/exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The export subsystem is organized as a group of common code and a group of IDE o

The **common code** is contained in three files:

* `tools/project.py` contains the command-line interface and handles the differences between Mbed OS 2 tests and Mbed OS 5 projects.
* `tools/project.py` contains the entry point of the script to export projects from the Mbed tools to any of the supported IDEs or project structures.
* `tools/export/__init__.py` contains an API used by the Arm Mbed Online Compiler and `project.py`. This file is responsible for boilerplate actions that every exporter must do, such as scanning for resources or collecting toolchain flags.
* `tools/export/exporters.py` contains the base class for all plugins. It offers useful exporter-specific actions.

Expand Down
2 changes: 0 additions & 2 deletions docs/program-setup/bare_metal/bare_metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ The Mbed OS bare metal profile is a compact profile of Mbed OS without an RTOS.
| Storage | Ecosystem libraries | Available |
| Mbed TLS | Not available | Available |
| Mbed PSA | Not available | Available |

To begin using the Mbed OS bare metal profile from Mbed OS 2, please follow our [instructions](../tutorials/migrating-to-mbed-os-5.html).
2 changes: 0 additions & 2 deletions docs/program-setup/runtime/static_memory_optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ You can also take advantage of the fact that these programs only run on embedded
- It implies dynamic memory allocation and thus requires the binary to include `malloc`, even when the application does not use it.

When you run an application on an embedded device, you don't need handlers to destroy objects when the program exits, because the application will never end. To save more RAM and flash memory, [remove destructor registration](https://github.com/ARMmbed/mbed-os/pull/2745) on application startup and eliminate the code to destruct objects when the operating system calls `exit()` at runtime.

<span class="notes">**Note:** Mbed OS 5.2.0+ enables removing destructor registration by default.</span>
8 changes: 0 additions & 8 deletions docs/tools/CLI/cli-test-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,3 @@ $ mbed compile -t GCC_ARM -m K64F -f --sterm
### Various issues when running Mbed CLI in the Cygwin environment

Mbed CLI is not currently compatible with the Cygwin environment and [cannot be executed inside it](https://github.com/ARMmbed/mbed-cli/issues/299).

### Downloading Mbed 2 library builds

Mbed 2 library builds can be large and may require a download manager on slower connections. You may download the library manually with the following steps:

1. Go to Mbed OS 2 releases, and choose a revision - https://os.mbed.com/users/mbed_official/code/mbed/graph/
1. Click on revision of your choice, for example, the revision 4f6c30876dfa is located at https://os.mbed.com/users/mbed_official/code/mbed/rev/4f6c30876dfa/
1. In the URL, change rev to archive and append zip. For example, the URL above, https://os.mbed.com/users/mbed_official/code/mbed/rev/4f6c30876dfa/, is modified to https://os.mbed.com/users/mbed_official/code/mbed/archive/4f6c30876dfa/zip
28 changes: 0 additions & 28 deletions docs/tools/toolchains/export_to_third_party.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,6 @@ We will do our best to maintain the exported libraries and project files, but pl

## Third party tool notes

### Makefiles and Arm Mbed OS 2 projects

When you export an Arm Mbed OS 2 project with a Makefile exporter or an exporter that uses a Makefile, you may have to modify the flags to remove some linker flags. You may see an error, such as the one below, in your compiler output.

```
link: mbed_blinky.elf
/opt/gnuarm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc.a(lib_a-fflush.o): In function `__sflush_r':
fflush.c:(.text.__sflush_r+0x80): undefined reference to `__wrap__free_r'
/opt/gnuarm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc.a(lib_a-fclose.o): In function `_fclose_r':
fclose.c:(.text._fclose_r+0x4a): undefined reference to `__wrap__free_r'
fclose.c:(.text._fclose_r+0x58): undefined reference to `__wrap__free_r'
fclose.c:(.text._fclose_r+0x7a): undefined reference to `__wrap__free_r'
/opt/gnuarm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc.a(lib_a-svfprintf.o): In function `_svfprintf_r':
vfprintf.c:(.text._svfprintf_r+0x13d6): undefined reference to `__wrap__malloc_r'
/opt/gnuarm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc.a(lib_a-mprec.o): In function `_Balloc':
mprec.c:(.text._Balloc+0x24): undefined reference to `__wrap__calloc_r'
mprec.c:(.text._Balloc+0x40): undefined reference to `__wrap__calloc_r'
/opt/gnuarm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-ar/thumb/fpu/libc.a(lib_a-svfiprintf.o): In function `__ssprint_r':
vfprintf.c:(.text.__ssprint_r+0x60): undefined reference to `__wrap__malloc_r'
vfprintf.c:(.text.__ssprint_r+0xc8): undefined reference to `__wrap__realloc_r'
vfprintf.c:(.text.__ssprint_r+0xd6): undefined reference to `__wrap__free_r'
collect2: error: ld returned 1 exit status
make[1]: *** [mbed_blinky.elf] Error 1
make: *** [all] Error 2
```

If you see such an error, remove the `-Wl,--wrap,_malloc_r`, `-Wl,--wrap,_free_r`, `-Wl,--wrap,_realloc_r` and `-Wl,--wrap,_calloc_r`from the `LD_FLAGS` variable in the Makefile.

### Make and Eclipse (GNU Arm Embedded Toolchain, IAR Compiler, Arm Compiler 5)

<span class="notes">**Note:** Our Eclipse CDT projects use Makefile. Therefore, Makefile advice also applies to using Eclipse.</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/tools_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The three Mbed OS development tools are Mbed Studio, Mbed CLI and the Mbed Onlin

We developed Mbed OS using the Mbed CLI tool, which is a Python program that coordinates builds and fetches all the dependencies of an Mbed OS application. As this runs on your local development machine, you also need compilers and other build tools installed.

`os.mbed.com` provides the tools, libraries and programs that work with Mbed OS, so you can also use Mbed Studio or the Mbed Online Compiler for building Mbed OS examples and programs. Beginner developers or those who are not comfortable with the command-line may prefer Mbed Studio or the Online Compiler. Furthermore, you can use the exporters to third party development tools that were part of the Arm Mbed OS 2 ecosystem.
`os.mbed.com` provides the tools, libraries and programs that work with Mbed OS, so you can also use Mbed Studio or the Mbed Online Compiler for building Mbed OS examples and programs. Beginner developers or those who are not comfortable with the command-line may prefer Mbed Studio or the Online Compiler.

## Arm Mbed Online Compiler

Expand Down