MM SDK
MM SDK
The mm-sdk contains eveything you need to build a MadMachine project, either a library or an executable.
A MadMachine project is structured like a SPM package. A Python script is used to build the project now and it would be replaced by Swift Package Manager in the futrue.
The latest features would be added to this SDK first and then integrated into the MadMachine IDE.
Download the latest release depending on your operating system.
What is inside the SDK
tools_linux/tools_mac/tools_win:
Swift compilier and standard libary for ARM-Cortex M7
ARM-GCC compiler and binutils
Compiled Python scripts
scripts:
Python scripts which used to build the project
hal:
Board abstraction library based on Zephyr
Examples & Library:
Latest examples and libraries
Usage (Take macOS for example)
Download and unzip the sdk to the directory ~
Run ~/mm-sdk/tools_mac/scripts/dist/mm/mm -h command for quick help.
Run ~/mm-sdk/tools_mac/scripts/dist/mm/mm init -h command for quick help about initializing a project.
Run ~/mm-sdk/tools_mac/scripts/dist/mm/mm build -h command for quick help about building a project.
Initialize a library DemoLibrary
DemoLibraryInitialize an executable DemoProgram
DemoProgramAdd the DemoLibrary as a dependency to DemoProgram
DemoLibrary as a dependency to DemoProgramOpen the
DemoProgram.mmpby any text editorAdd
"DemoLibrary"in thedependeciesSave and quit
Then you can
import DemoLibraryin projectDemoProgram
Build a library
Build an executable
When building a project (either library or executable), the Python script would try to find the dependent libraries in the speicified directory.
If the dependent library is not builded yet, the Python script would build the library first. Use --rebuild to force rebuild all dependent libraries.
Download an executable
After a successful building, there would be .build/swiftio.bin in your project directory. Note that the .build directory is hiden by default.
Follow those steps to download the executable:
Insert SD card and confirm USB connection(Press the Download button and wait the onboard RGB turns to green)
A USB drive would be mounted on your computer
Copy the
swiftio.binto the SD card root directoryEject the USB drive and the program would run automatically
Usage (Take Windows10 for example)
Download and unzip the sdk to the directory D:\
Press the Win + R keys on your keyboard, then type cmd, and press Enter on your keyboard or click OK to run a Command Prompt.
Run D:\mm-sdk\tools_win\scripts\dist\mm\mm.exe -h command for quick help.
Run D:\mm-sdk\tools_win\scripts\dist\mm\mm.exe init -h command for quick help about initializing a project.
Run D:\mm-sdk\tools_win\scripts\dist\mm\mm.exe build -h command for quick help about building a project.
Initialize a library DemoLibrary
DemoLibraryInitialize an executable DemoProgram
DemoProgramAdd the DemoLibrary as a dependency to DemoProgram
DemoLibrary as a dependency to DemoProgramOpen the
DemoProgram.mmpby any text editorAdd
"DemoLibrary"in thedependeciesSave and quit
Then you can
import DemoLibraryin projectDemoProgram
Build a library
Build an executable
When building a project (either library or executable), the Python script would try to find the dependent libraries in the speicified directory.
If the dependent library is not builded yet, the Python script would build the library first. Use --rebuild to force rebuild all dependent libraries.
Download an executable
After a successful building, there would be .build/swiftio.bin in your project directory.
Follow those steps to download the executable:
Insert SD card and confirm USB connection(Press the Download button and wait the onboard RGB turns to green)
A USB drive would be mounted on your computer
Copy the
swiftio.binto the SD card root directoryEject the USB drive and the program would run automatically
Last updated
Was this helpful?