Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Current »

Introduction

The emtrion SBC is a platform based on the Renesas RZN1D cpu. It consists of a CM3 core and a A7 core. For the CM3 core a firmware containing PROFINET, EtherNet/IP and EtherCAT stack is available. Ethernet ports J8 and J9 are exclusively used by the CM3 core. Ethernet ports J1 and J2 are exclusively used by linux.

Required resources

  • Emtrion SBC

  • 24 V power adapter

  • USB Serial converter

  • Network cables

  • a ARM (arm-none-eabi) gcc compiler (e.g. version 9.2.1 20191025)

  • optionally the Emtrion SBC SDK: https://cloud.emtrion.de/index.php/s/Fd7XWdmjZrBlOhI

  • Emtrion hardware documentation (SBC-RZN1D-Hardware_Manual_v008en.pdf)

  • Emtrion SDK and software documentation (sbc-rzn1d-yocto-manual_v005en.pdf)

  • updated device tree

  • updated uboot

  • cm3 firmware

  • port application sdk

  • Industrial Communication Explorer

Device setup

Entering the boot loader

You will need a USB serial converter connected to the device (header J5). UART speed is 115200 baud. After bootup of the device you will have the possibility to enter the uboot boot loader. From there the following steps can be executed.

Update of uboot

Please refer to the documentation from emtrion (sbc-rzn1d-yocto-manual_v005en.pdf) on how to update the uboot boot loader (u-boot.img). This is possible using a NFS or a TFTP server. The correct version shown should be “U-Boot 2017.01 sbc-rzn1d v01.0xp (Feb 02 2021 - 11:46:11 +0000)”.

Update of the device tree

Now you need to boot into linux (power cycle or u-boot command "boot"). The device is initially configured to use DHCP. Ethernet ports J1 and J2 are used by the linux system. To login into linux, use the account root with no password (default settings).

Please place the dtb into the /boot folder of the filesystem accessible within linux.

Programming of the CM3 firmware

This step is done from the u-boot bootloader. Following commands show the procedure. Update is done using tftp here:

# set cm3_max_fw_size
env set cm3_max_fw_size 0xC0000
env set CM3 yes
env save

# load scripts
run import.uboot_script

# set mode to tftp
setenv lmode tftp

# set ip mode to dhcp
setenv ip-method dhcp

# get ip address
dhcp

# set server ip address
setenv serverip 192.168.178.103

# set nfsroot to anything, even required of tftp is used
setenv nfsroot "/System/Volumes/Data/Users/Shared/nfs"

# set boot for tftp mode
setenv bootdir /private/tftpboot

# update the cm3
run update_cm3 

If successful, following log messages are shown:

SBC-RZN1D U-Boot > run update_cm3
Speed: 1000, full duplex
Using dwmac.44002000 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.2
Filename '/private/tftpboot/cm3_fw.bin'.
Load address: 0x80008000
Loading: #############
         3.4 MiB/s
done
Bytes transferred = 180287 (2c03f hex)
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB, mapped at 10000000
SF: 196608 bytes @ 0xe0000 Erased: OK
device 0 offset 0xe0000, size 0x2c03f
SF: 180287 bytes @ 0xe0000 Written: OK

Setup of the port SDK

The port SDK can be be used on any linux machine capable of cross compiling for the arm platform (see compiler requirements). To install the SDK create a folder and unpack the delivered archive (2021015_20210816_2_22_1_port_emtrion_sbc_CCM_ci968.zip).

To compile a profinet example application, do the following steps:

> cd projects/2015013_irj45/ac/01_pnio_io_mirror/gcc
> make select
No platform selected, choose a platform - OR - press <CTRL+c> and set the
PLATFORM environment variable.

Choose platform:
  [ 1] emtrion_sbc_rzn1d_a7            (gcc)
  [ 2] linux_x86                       (gcc)

Choice [1-2]:
> 1

> make
[CC] appl/2015013_irj45/ac/01_pnio_io_mirror/goal_appl.c
[CC] appl/2015013_irj45/ac/01_pnio_io_mirror/goal_appl_http.c
[CC] appl/2015013_irj45/rpc/ccm_rpc_ac.c
[CC] goal/cm/goal_cm_cm.c
[CC] goal/cm/goal_eth_cm.c
[CC] goal/cm/goal_lm_cm.c
[CC] goal/cm/goal_queue_cm.c
[CC] goal/goal_alloc.c
[CC] goal/goal_bm.c
[CC] goal/goal_cm.c
[CC] goal/goal_heap.c
[CC] goal/goal_inst.c
[CC] goal/goal_lm.c
[CC] goal/goal_lock.c
[CC] goal/goal_log.c
[CC] goal/goal_main.c
[CC] goal/goal_queue.c
[CC] goal/goal_rb.c
[CC] goal/goal_reg.c
[CC] goal/goal_stat.c
[CC] goal/goal_task.c
[CC] goal/goal_timer.c
[CC] goal/goal_util.c
[CC] goal_global/goal_global.c
[CC] goal_media/cm/goal_mi_mctc_cm.c
[CC] goal_media/goal_ma_led.c
[CC] goal_media/goal_ma_mbox.c
[CC] goal_media/goal_ma_nvs.c
[CC] goal_media/goal_ma_uart.c
[CC] goal_media/goal_mi_dm.c
[CC] goal_media/goal_mi_mctc.c
[CC] goal_media/goal_mi_mctc_ram.c
[CC] goal_media/goal_mi_nvs.c
[CC] plat/arch/linux/goal_target.c
[CC] plat/arch/linux/goal_target_cmdline.c
[CC] plat/board/emtrion/sbc_rzn1d_a7/goal_target_board.c
[CC] plat/drv/led/linux/led_emtrion_sbc.c
[CC] plat/drv/mbox/kernel/mbox_kernel.c
[CC] plat/drv/nvs/file/nvs_file_posix.c
[CC] plat/drv/uart/linux/uart_linux.c
[CC] protos/dd/rpc/goal_dd_rpc_ac.c
[CC] protos/goal_mctc/src/goal_mctc.c
[CC] protos/goal_mctc/src/goal_mctc_rb.c
[CC] protos/http/goal_http_ac.c
[CC] protos/lm_emit/goal_lm_emit.c
[CC] protos/lm_emit/goal_lm_emit_ma_uart.c
[CC] protos/lm_emit/goal_lm_emit_raw.c
[CC] protos/pnio/targets/goal/goal_pnio_rpc_ac.c
[CC] protos/snmp/server/goal_snmp_ac.c
[CC] ext/base64/src/cdecode.c
[CC] ext/base64/src/cencode.c
[LD] projects/2015013_irj45/ac/01_pnio_io_mirror/gcc/build/emtrion_sbc_rzn1d_a7/goal_emtrion_sbc_rzn1d_a7.bin

If you need to specify the cross compiler, you can do so by calling make in the following way:

make CROSS_COMPILE=/opt/toolchain/armv8-rpi3-linux-gnueabihf/bin/armv8-rpi3-linux-gnueabihf-

The resulting binary is located in the sub folder build/emtrion_sbc_rzn1d_a7. It can be transfered to the device using scp:

scp build/emtrion_sbc_rzn1d_a7/goal_emtrion_sbc_rzn1d_a7.bin root@192.178.178.103:

The binary can be started on the device:

root@sbc-rzn1d:~# ./goal_emtrion_sbc_rzn1d_a7.bin
GOAL Start

mbox: Created device mbox_2.
[AC_I|goal_taskCreate:117] creating task: GOAL Timer
[AC_I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[AC_I|goal_tgtTaskCreate:1252] task scheduler priority: 99
[AC_I|goal_taskCreate:160] Created task GOAL Timer with priority 100/100 and stack 0 byte sucessfully.
[AC_I|goal_cmInit:220] Calculated config size of 240 in 3 modules modules
[AC_I|goal_taskCreate:117] creating task: /dev/mbox_2
[AC_I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[AC_I|goal_tgtTaskCreate:1252] task scheduler priority: 54
[AC_I|goal_taskCreate:160] Created task /dev/mbox_2 with priority 50/100 and stack 0 byte sucessfully.
[AC_I|goal_miMctcRamReg:148] setting media timeout to 1000:
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 1159, len: 4296
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 1159, len: 4296
[AC_I|goal_snmpInitRpc:103] SNMP Application Core successfully started
[AC_I|goal_taskCreate:117] creating task: GOAL Main
[AC_I|goal_tgtTaskCreate:1210] task stack size: 8388608 byte
[AC_I|goal_tgtTaskCreate:1252] task scheduler priority: 10
[AC_I|goal_taskCreate:160] Created task GOAL Main with priority 0/100 and stack 0 byte sucessfully.
[AC_I|goal_init:181] GOAL initialized
[AC_I|goal_miMctcRpcSyncLoop:1208] RPC state synchronized, running appl_setup
[AC_I|goal_miMctcRpcSyncLoop:1212] configuring timeout values for peer
[AC_I|goal_pnioNewAc:264] auto data mapper for DP is disabled
[AC_I|goal_pnioNewAc:265] auto data mapper for APDU is disabled
[AC_I|goal_pnioNewAc:339] PROFINET Application Core successfully started
[AC_I|appl_setup:239] Initializing device structure
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 0, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 0, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 1, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 1, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 2, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 2, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 3, len: 2
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 3, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 5, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 4, len: 2
[AC_I|goal_miDmPartRegInt:275] part added to 'Write to CC', pos: 6, len: 1
[AC_I|goal_miDmPartRegInt:275] part added to 'Read from CC', pos: 6, len: 1
[AC_I|appl_setup:456] PROFINET ready
[AC_I|appl_setup:458] Configuring DD
[AC_I|appl_setup:482] DD ready
[AC_I|appl_httpSetup:100] setup web server
[AC_I|goal_httpNewAc:954] HTTP Application Core successfully started
[AC_I|appl_httpSetup:178] web server setup done
[AC_I|appl_setup:504] CCM version : 2ab72cd22
[AC_I|appl_setup:505] CCM device : 1
[AC_I|appl_setup:507] CCM Serial : 01:00:00:00:8c:e2
[AC_I|goal_miMctcRpcSyncLoop:1253] local setup done
[AC_I|goal_memInitDone:152] fixed memory usage: 109916/262144 bytes bytes
[AC_I|goal_memInitDone:157] fixed memory usage: (42%)

Installation of the port Industrial Communication Explorer

The Industrial Communication Explorer is a management tool including PLC capabilities for EtherCAT, PROFINET and EtherNet/IP. Please refer to it’s documentation for installation and usage:

https://portgmbh.atlassian.net/wiki/spaces/ICE

Example Applications

iRJ45 / SoM - GOAL examples

Limitations

The currently delivered CM3 firmware has following restrictions:

  • time limited to 180 minutes

  • EtherCAT support is missing

  • not fully tested, no conformance testing done

  • LED support not fully implemented, LED colors on the hardware limit possible protocol conformance (EtherCAT, EtherNet/IP)

  • firmware update functionality from A7 or over Ethernet (HTTP, EtherCAT) not implemented, required to do using u-boot

  • Exception Log not supported

  • CM3 reset not possible, a restart of the A7 application requires reboot of the whole system

  • No labels