Table of Contents

BSP Overview


Product URL list

Board Support Packages

Third-Party Add-Ons

Starterkit

Hardware

Onboard I2C devices



I2C bus TQMa335x
I2C0 0x12
PMIC
0x1F
Tempsensor
0x2D
PMIC
0x50
EEPROM
0x57
EEPROM
0x68
RTC (optional DS1339)


I2C bus MBa335x
I2C0 0x18
Audio Codec
0x19
Tempsensor
0x20
PCA9554
0x21
PCA9554
0x51
EEPROM

Hardware Issues

Linux BSP

Version Matrix

BSP revision 0100 0101 0102 0115 0117 0119
PTXdist 2012.07 2013.12 2013.12 2013.12 2016.04 2016.04
OSELAS Toolchain 2011.11.0 2013.12.0 2013.12.1 2014.12.2 2014.12.2 2014.12.2
Platform mba335x mba335x mba335x mba335x mba335x mba335x
U-Boot 2013.07 2013.07 2013.07 2013.07 2013.07 2013.07
Linux Kernel 3.2 3.12.10 3.12.10 3.14.19 4.4.39 4.4.39
Qt Version 4.8.2 4.8.5 4.8.5 4.8.5 4.8.7 4.8.7


U-Boot

Supported features

Component Status Remarks
CPU + Cortex-A8
Ethernet + 1 x CPSW (100 MBit working, GiGE with hardware modification
(fixed with MBa335x Rev. ≥103))
eSDHC + eMMC / SD Card
UART +
I²C + EEPROM
SPI - SPI NOR Flash
eMMC / SD boot +
TFTP boot +
SPI NOR boot -
USB Host + tested with USB Mass Storage Device (USB-Stick)
Key: + tested | - untested | ? open

Kernel

Supported Features

Preliminary fearure list

Features planned for Linux-BSP for TQMa335x+MBa335x
Component Device Interface Function Pre-release Rev 0100 Rev 0101 Rev 0102 REV 0115 REV 0117 REV 0119 Remarks
TQMa335x AM335x UART0 RS485
AM335x UART1 Multiplexed
AM335x UART2 Multiplexed
AM335x UART3 TTL Not enabled by default
AM335x UART4 RS232
AM335x UART5 Multiplexed
AM335x USB0 USB HOST USB2517 Switch on mba335x
AM335x USB1 USB OTG USB Device
AM335x DCAN0 CAN 2.0B
AM335x DCAN1 CAN 2.0B
AM335x SGX PowerVR Graphics Framebuffer driver
No hardware acceleration
AM335x I2C0 EEPROM
Temp. Sensor
AM335x I2C1 Bus Access
AM335x I2C2 Multiplexed
AM335x MCASP Audio line-out tested
line-in working with BSP ≥ Rev.0115
AM335x SPI0 SPI NOR Flash
AM335x SPI1
AM335x SPI2 Multiplexed
AM335x SPI3 Multiplexed
AM335x GPIO
AM335x CPSW_3G RGMII FEC 1 Only 100Base-T works,
1000Base-T with hardware modification
(fixed with MBa335x ≥ Rev.103)
AM335x CPSW_3G RGMII FEC 2 Only 100Base-T works,
1000Base-T with hardware modification
(fixed with MBa335x ≥ Rev.103)
AM335x PRU-ICSS on request on request on request on request on request on request on request Muxed with LCD
On Request
AM335x TSC_ADC Touch BSP REV.0119
AM335x LCD Timing for ET0700G0DH8
AM335x MMCHS
AM335x BUZZER
AM335x MMC0 SD card interface Writing on SD-Card only with hardware modification
(fixed with MBa335x Rev. =103)
AM335x MMC1 EMMC TQMa335x Rev. =0203 have eMMC 5.0 devices assembled which are supported with BSP ≥ Rev.0115
A patch Linux BSP TQMa335x Rev.0102 - Fix eMMC 5.0 detection is available for BSP REV.0102
mba335x USB2517 USB1 USB 2.0
USB2517 USB2 USB 2.0
USB2517 USB3 USB 2.0
USB2517 USB4 USB 2.0 Not tested
USB2517 USB5 LVDS-CMD Not tested
USB2517 USB6 USB 2.0 Not tested
USB2517 USB7 Mini PCIe Not tested
USB2517 USB7 Mini PCIe Not tested

Changelog Ptxdist

2018/05/18 -REV 0119

2017/07/07 -REV 0117

2016/04/18 - REV 0115

2014/09/22 - REV 0102

Adapt BSP

we suggest to read the following pages before you proceed with this page

The BSP was developed for the starterkit . To use it in a product with special needs or a different basebord we suggest to define an own platform. To start with it make a copy of the platform definition and select the new platform definition

$ cd <BSPROOT>
$ cp -r <BSPROOT>/configs/platform-tq-@mb_name_code@ to <BSPROOT>/configs/<your-cool-platform>
$ ptxdist platform <BSPROOT>/configs/<your-cool-platform>/platformconfig

To start configuring your new platform type

$ ptxdist platformconfig

The first thing to change should be the platform name. Adapt things like kernel configuration, image creation etc. to your needs.

The new system will be built under <BSPROOT>/platform-<platformname_from_platformconfig>

Please read the build system documentation howto go further. Keep in mind that custom mainboards may need changes in bootloader and device tree. Give the new bootloader config and device tree a new name to cleanly distinguish them from the starterkit mainboard configuration.

If creating BSP for a new motherboard, make sure to create new configurations for bootloaders and device tree.

Changing packages

PTXdist uses release tar balls for software it loads from the net. You have to work with patches, if you need to make changes to the source code. Follow the instructions of the developers section in the PTXdist manual.

Changes that are made in the build directories will be deleted, when PTXdist needs to redo a buildstep.

Adding own packages

PTXdist needs a package for every bit you need in your root FS to guarantee reproducible builds. To add your software, files etc. you have to provide local packages. Follow the instructions of the developers section in the PTXdist manual. PTXdist provides templates as starting point for own packages. Type

$ ptxdist newpackage

to see what package templates exist.

Deployment

we suggest to read the following pages before you proceed with this page

To update bootloader / kernel in a running system you have to copy the images in your tftp directory and download them to the eMMC.

To install a new firmware use SD cards. To copy the built images on the host system to a connected card type:

$ cd <BSP project>/platform-<platform_name>/images
$ sudo dd if=@mod_name_code@_hd.img of=/dev/sdf bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdf

To find out what device file the SD card has, type “dmesg” after you connect the card to see the system messages. At the bottom you'll see some “Attached scsi …” messages along with something like:

[ 8197.588395]  sdf: sdf1

Installation from bootable SD card

This procedure overwrites the MBR and all partitions on the eMMC with images from the SD card.
The U-Boot environment is preserved.

See dip_switches for selecting the boot medium on the @mb_name@.

Install script usage

Current U-Boot versions provide a script that copies the MBR and partition contents from the SD card to the eMMC. This script is called via “run install_firmware” command at the U-Boot prompt. Due to memory limitations the root partition must be copied in a loop, each run copies the maximum memory amount available. To tell the script the size of your rootfs partition you have to use the rootblks16 variable.

This variable holds the hexadecimal number of 512-byte blocks your rootfs partition has in size.

setenv rootblks16 0x40000 

This sets a 128MB partition.

Updating existing firmware from bootable SD card

Please note: At this state there is no way to extract the image sizes from the SD card.
Without them calculation of required sectors to store the images is not possible.
Therefore using this update method will grab and overwrite whole uboot/dtb/kernel partitions respectively.

  1. Boot from eMMC
  2. Plug in card, power on device and stop autoboot
  3. To update U-Boot type:
    run upd_uboot_sd
  4. To update device tree type:
    run upd_fdt_sd
  5. To update Kernel type:
    run upd_kernel_sd

Updating existing firmware over ethernet

  1. Boot from eMMC and stop autoboot
  2. Connect device via ethernet to a tftp server supplying the image
  3. Provide the correct network configuration:
    setenv serverip 0.0.0.0
    setenv netmask 255.255.255.0
    setenv ipaddr 0.0.0.0
  4. Provide U-Boot the file name of the desired image on the server:
    For U-Boot: setenv uboot filename
    For device tree: setenv dtb filename
    For Kernel: setenv kernel filename
  5. Perform Update:
    For U-Boot: run upd_uboot_net
    For device tree: run upd_fdt_net
    For Kernel: run upd_kernel_net

The u-boot update scripts automatically implement the selection of the primary copy to boot.

Using different boot media

NFS

To boot the @mod_name@ from network you need a working bootloader in eMMC or SD-card which is able to get the kernel image over tftp and to provide the kernel with commandline settigns for NFS. You have to provide the images via tftp and nfs and to configure the bootloader (cf. U-Boot variables boot_nfs, addnfs, kernel, dtb, serverip, rootpath) to work with your tftp-server and your nfs-server.

Finally, you will find the built images in platform-<platformname>/images.

PTXdist Images

we suggest to read the following page before you proceed with this page
1. preparing Development Host

We suggest to build the BSP with the default configuration for the fist time.

Getting help

1. The manual is your friend. See Downloads where to get it.
2. See the README in your BSP root folder
3.Executing ptxdist -help to see the available ptxdist commands

Compilation

PTXdist downloads some packages. If it reports some errors please

  • verify your internet connection or proxy settings.
  • make sure the package source is correct. Some package source pages will change from time to time.
    (You can always try to download the source package manually and copy it to your package pool (by default: <BSP project>\src))
  • some packages like bootloaders and kernels where you can select versions need to know about their hash sums. You have to calculate them using md5sum and enter the correct hash in the ptxdist configuration.
  • run
    $ ptxdist get

Configuration

To configure the system use the PTXdist menu:

$ ptxdist menuconfig    →   configure the project filesystem
$ ptxdist kernelconfig  →   configure the kernel
$ ptxdist platform      →   configure the platform

PTXdist menu

To add additional packages to your root filesystem simply use the ptxdist tool. The ncurses based UI is the same that is used by the linux kernel with “make menuconfig”. It can be used the following way:

  • use the up / down arrow keys to navigate in the menu
  • use the left / right arrow keys to navigate between buttons
  • select / deselect packages and options using the SPACE key
  • enter submenus or press buttons using the ENTER key

Dependencies between packages should be ?automagically? resolved. Software is organized in sections.

Downloads

TQ Board Support Packages

The Board Support Packages (BSPs) usually provide source code as well as precompiled images for one or more platforms. Please see the version matrix for details on each revision of the BSP.


Linux BSP Rev.0119 for TQMaXX☚ current revision
MD5SUM: B26ACB00737A50D8E4222826E409AD4D


Linux BSP Rev.0117 for TQMaXX
MD5SUM: B26ACB00737A50D8E4222826E409AD4D

Linux BSP Rev.0115 for TQMaXX
MD5SUM: 03ADD8D8F7B3A2B499B2BEEEDCF7A3AA

Linux BSP REV.0102 for TQMa335x
MD5SUM: 583083338CCA0EBA2589CDAB89C80FB0

Linux BSP REV.0101 for TQMa335x
MD5SUM: EF3272FC79D14739F2765CCC7A7D9551

Linux BSP Rev.0100 for TQMa335x
MD5SUM: 2DD44DA435F21577EDCC231BC5812533

Linux Source BSP for TQMa335x Pre-release
MD5SUM: 1FD569CB04D55A95C56BDFB4A3AE579A

Binary Linux Images for TQMa335x Pre-release
MD5SUM: 8B272FF68240CA9317F251C0AE7B051C

Build System / Toolchains

PTXdist version XXXX.YY.0 is required to compile an OSELAS Toolchain XXXX.YY.Z. The version of PTXdist and toolchain required to build a given BSP revision is shown in the version matrix.


Build System PTXdist 2016.04

Build System PTXdist 2013.12

Build System PTXdist 2013.03

Build System PTXdist 2012.07

OSELAS Toolchain 2014.12.2

OSELAS Toolchain 2013.12.1

OSELAS Toolchain 2013.12.0

OSELAS Toolchain 2011.11.0

PTXdist projects for compiling OSELAS toolchains

How-To

Boot from eMMC

Copy the image to the eMMC-Card

Copy the gzipped SD-Card image to the rootfs of the SD-Card:

gzip sd.hdimg
cp sd.hdimg.gz $SD_MOUNT

On the target:

dd if=sd.hdimg | gunzip | dd of=/dev/mmcblk1

Alternative: copy the running image from SD-Card to the MMC:

dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=1M count=400
Booting Linux from the eMMC:

Change the DIP-Switches to boot from eMMC.

Hit any key to stop autoboot:  0
U-Boot# mmc dev 1
mmc1(part 0) is current device
U-Boot# set bootpart 1:1
U-Boot# run loaduimage
reading /uImage
3102000 bytes read in 351 ms (8.4 MiB/s)
U-Boot# run mmcboot
Booting from mmc ...

DIP-Switch settings

S2 Setting for MMC1 / eMMC:

Boot-Order: eMMC, SD

1 2 3 4 5
ON ON OFF OFF OFF
S2 Setting for MMC0 / SD-Card:

Boot-Order: SD, SPI-NOR

1 2 3 4 5
OFF OFF OFF ON OFF
S2 Setting for SPI-NOR:

Boot-Order: SPI-NOR, eMMC

1 2 3 4 5
ON ON ON OFF OFF



Workflow Linux kernel configuration and device tree TQ-ARM-BSP-REV.0115

kernel configuration

to configure the TI Kernel use the following command

ptxdist menuconfig kernel-ti
Workflow
  1. Customise kernel respectively devicetree
  2. ptxdist drop kernel-ti compile
  3. ptxdist drop u-boot install
  4. ptxdist images –git

Set RTC on STKa335x

There are two RTC's on the TQMa335x:

  • rtc0 = RTC Sitara AM335x
  • rtc1 = RTC Module PMIC
An optional RTC DS1339 is available for the TQMa335x module
The RTC of the Sitara AM335x CPU is not usable on TQMa335x ≥ revision 0202.
Please see the TQMa335x for further information
Supply RTC from licell on MBa335x
Command to set RTC0
hwclock -w hwclock -f /dev/rtc0 -w
Command to read RTC0
hwclock -f /dev/rtc0 --show


Command to set RTC1
hwclock -w hwclock -f /dev/rtc1 -w
Command to read RTC1
hwclock -f /dev/rtc1 --show




Load / Change / Save the Device Tree under U-Boot


Devicetree can be edit with the fdt commands under U-Boot.

Tested with Linux BSP Rev.0117 for TQMaXX

1) At first the fdt file has to be loaded from the current boot medium (mmc) into RAM.

U-Boot# run loadfdt

2) Next step is to set the predefined U-Boot environment variable fdtaddr through the fdt addr command.

U-Boot# fdt addr $fdtaddr

3) Afterwards the size of the fdt has to be increased (to the next 4K divider) in order to have some space for modifications. This is simply done by entering:

U-Boot# fdt resize 

4) List device in the tree you want to change to have a look at the default settings.

Example

5) To modify a value of a propertie use the fdt set command.

U-Boot# fdt set <path> <property> <value> 

Example

6) Optional: If you want to save your modified Devicetree back to mmc you'll have to run the following command:

U-Boot# fatwrite mmc $bootpart $fdtaddr $fdtfile <totalsize> 

You can find out <totalsize> of the modified fdt by entering the command fdt header

Otherwise you can boot your module with the changed Devicetree right after the modification.



Known Issues PTXdist

Hardware

Writing on SD Card
Affects writing on SD Card doesn't work for now
Issue
Effect
Solution / Workaround Fixed with MBa335x Rev. ≥103

Hardware

Ethernet Speeds
Affects Only 100Base-T works
Issue
Effect
Solution / Workaround Fixed with MBa335x Rev. ≥103

FAQ

Yocto

DevHost

Build BSP

Adapt BSP

Partition scheme
SD / eMMC images
SPI NOR

Deployment

FAQ

(Deployment)

QNX BSP

U-Boot

Kernel

FAQ

Deployment

VxWorks BSP

U-Boot

Kernel

FAQ

Deployment