Utils: pyvar.cm.core

Cortex-M Class

../_images/arm_cortex_m.png

pyvar.cm.core

platform:

Unix/Yocto

synopsis:

Class to handle Cortex-M applications.

class pyvar.cm.core.CortexM(core_n=0, tty_offset=3)[source]
Variables:
  • module – SoM type;

  • core – Cortex-M core being used;

  • tty_rpmsg – virtual port to communicate with rpmsg applications;

  • firmwares – list all the available Cortex-M firmwares;

property core

Get which Cortex-M core is being used.

Returns:

An integer representing the Cortex-M core.

property firmware

Get the current Cortex-M firmware.

Returns:

A string containing the Cortex-M firmware.

read()[source]

Reads a message from a Cortex-M application via virtual serial port.

run(firmware)[source]

Run a given firmware into the Cortex-M.

Parameters:
  • firmware (str) – the firmware that is going

  • Cortex-M. (to run into the) –

property state

Get the current Cortex-M state.

Returns:

A string containing the Cortex-M state.

write(message)[source]

Send a message to a Cortex-M application via virtual serial port.

Parameters:

message (str) – message the is going to be sent.