Skip to content

harmut01/mbed-os-example-psa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mbed-os-example-psa

This is an example application showing how to query the PSA version. It also blinks an LED to indicate it is working.

Prerequisite

  • Mbed CLI - to build the example program. For installation and usage instructions, see the documentation.

Building the Mbed OS application

Import the example

  1. From the command line, clone the repository containing the example:

    $ git clone https://github.com/ARMmbed/mbed-os-example-psa
    
  2. Change the current directory to where the project was imported.

  3. Update mbed-os sources by running mbed deploy.

Compile the example

Invoke mbed compile, and specify the name of your platform and toolchain (GCC_ARM, ARM, IAR). For example, for the CY8CKIT_064S2_4343W platform and GCC_ARM toolchain:

mbed compile -m CY8CKIT_064S2_4343W -t GCC_ARM

Once its compiled, you should see the following result:

[snip]
| Module           |         .text |       .data |          .bss |
|------------------|---------------|-------------|---------------|
| [fill]           |       98(+98) |     10(+10) |       45(+45) |
| [lib]/c.a        |   4940(+4940) | 2108(+2108) |       89(+89) |
| [lib]/gcc.a      |     832(+832) |       0(+0) |         0(+0) |
| [lib]/misc       |     224(+224) |       4(+4) |       28(+28) |
| [misc]           |         0(+0) |       0(+0) |         0(+0) |
| main.o           |     168(+168) |       0(+0) |         0(+0) |
| mbed-os/drivers  |     480(+480) |       0(+0) |         0(+0) |
| mbed-os/features |   1754(+1754) |       1(+1) |     288(+288) |
| mbed-os/hal      |   2608(+2608) |       8(+8) |     248(+248) |
| mbed-os/platform |   5538(+5538) |   260(+260) |     416(+416) |
| mbed-os/rtos     |   8404(+8404) |   240(+240) | 23472(+23472) |
| mbed-os/targets  | 24874(+24874) |   297(+297) |   1210(+1210) |
| Subtotals        | 49920(+49920) | 2928(+2928) | 25796(+25796) |
Total Static RAM memory (data + bss): 28724(+28724) bytes
Total Flash memory (text + data): 52848(+52848) bytes

Image: ./BUILD/CY8CKIT_064S2_4343W/GCC_ARM/mbed-os-example-psa.hex

Run the example

  1. Connect your Mbed Enabled device to the computer over USB.
  2. Copy the binary or hex file to the Mbed device.
  3. Connect to the Mbed Device using a serial client application of your choice.
  4. Press the reset button on the Mbed device to run the program.

Note: The default serial port baud rate is 9600 baud.

Expected output:

PSA Framework Version : NNN
Executing from NS Core... LED Blink rate : 1000 ms

where NNN is the PSA framework version number.

About

PSA example for Mbed OS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%