Skip to content

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems

License

Notifications You must be signed in to change notification settings

komori-t/micropython

 
 

Repository files navigation

TOPPERS SafeG-M MicroPython demo

This branch implements a demonstration of TOPPERS SafeG-M. The demo program runs MicroPython while protecting TOPPERS ASP3 kernel.

Supported hardware and functionality

  • STM32L552 - GPIO, SysTick, Internal flash storage

Common setup sequence

Run the following commands to initialize a repository

$ git clone https://github.com/mtkrtk/micropython
$ cd micropython
$ git checkout SafeG-M
$ make -C mpy-cross
$ git submodule init

Hardware specific configurations

STM32L552

  1. Run the following commands to clone submodule.

    $ git submodule update lib/stm32lib/
    
  2. Setup option bytes as shown below.

    • DBANK = 1
    • TZEN = 1
    • SECWM1_PSTRT = 0x00
    • SECWM1_PEND = 0x51
    • SECWM2_PSTRT = 0x7F
    • SECWM2_PEND = 0x00

    Note: DBANK cannot be changed if there is any secure or write protected area.

  3. Launch STM32CubeIDE and specify safeg-m/target/stm32l552/ as the workspace.

  4. Select "File" → "Import..." → "General" → "Existing Projects into Workspace" and specify the workspace directory to "Select root directory:" Then import all the projects.

  5. Right clink sample/sample_Secure/configure.launch and select "Run As" → "configure" to generate Makefile of ASP3.

  6. Build projects.

  7. Connect any USB-Serial device to PD_8 and PD_9 since the serial terminal of MicroPython is routed to those pins.

  8. Connect ST-Link.

  9. Right clink sample/sample_Secure/sample.launch and select "Debug As" → "sample" to debug.

External links

About

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 87.4%
  • Python 7.8%
  • C++ 3.5%
  • Makefile 1.1%
  • Shell 0.1%
  • Assembly 0.1%