Convert SAM-BA scripts

This page can help you convert your SAM-BA script from one revision of SAM-BA to the other. We made some little changes to the SAM-BA API and SAM-BA QML Scripts as slightly different.

SAM-BA tool revision

You can verify the revision of your SAM-BA tool by running the following command:

sam-ba -v
SAM-BA Command Line Tool v3.2.0
Copyright 2015-2017 ATMEL Corporation

SAM-BA module revisions

At the beginning of your script, you have some lines which state the revision of each module that are used by the QML script. These are the import lines that give the revision number of the modules that shall be used in the core of the script. So, while moving to a more recent revision of SAM-BA, make sure to update these numbers accordingly.

import SAMBA 3.2
import SAMBA.Connection.Serial 3.2
import SAMBA.Device.SAMA5D2 3.2

SAM-BA QML conversion table

SAM-BA API changes SAM-BA 3.1.x SAM-BA 3.2.y Comments
AppletLoader {} needed removed Removed AppletLoader object. Connection object can now be used directly when working with applets.
device example
device: SAMA5D2 { 
	board: "sama5d2-xplained" 
device: SAMA5D2Xplained {
Board selection is not done using a board property on the device anymore.
Instead, the boards are defined using inheritance:
for example, the SAMA5D2Xplained QML object inherits from SAMA5D2 QML object.
applet initialization call appletInitialize() initializeApplet()  
applet erase/write functions appletErase()
applet Boot Config manipulation appletWriteBootCfg()

Example QML script for SAM-BA 3.2.y

The demo archive for Linux4SAM 5.6 onwards support newer revision of SAM-BA. But if you want to run an older demo package with SAM-BA 3.2.y you can take example on this script for Linux4SAM 5.5 converted to SAM-BA 3.2.y revision.

Boards Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained
Components SAM-BA
Summary SAM-BA API revisions
r6 - 03 Apr 2018 - 13:27:40 - LudovicDesroches
Linux & Open Source related information for AT91 Smart ARM Microcontrollers

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. This site is powered by the TWiki collaboration platform

ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM