How to complie ARM926 Arduino Framework

1. ARM926 arduino Framework

The arduino framework source code place in the nonos/arduino_core_sunplus.

The code structure:

nonos/arduino_core_sunplus -----| cores

-----| libraries

-----| system ---| drivers ----| CMSIS

----| sp7021_hal_driver

---| Middlewares ---| OpenAMP

-----| variants ---|sp7021_evb

The HAL drivers place in the system/drivers/sp7021_hal_driver. The HAL drivers support the uart/timer/spi/i2c/pwm/icm/external interrupt/mailbox.

ARM926 audunio communicate with the Linux CA7 though the vitural serail by the OpenAMP.

Now , the framwork can’t support the arduino IDE.

 

2. Step by Step compile

 

  • Modify uboot

boot/uboot skip boot arm926 in the uboot:

The funnction sp_nonos_go() in the borad/sunplus/pentagram_board/sp_go.c

 

  • Linux kernel support vitural serail tty, enable RPMSG

1) Add the RPMSG config in your config file.

CONFIG_REMOTEPROC=y CONFIG_SUNPLUS_REMOTEPROC=y CONFIG_RPMSG_CHAR=y CONFIG_RPMSG_TTY=y

2) make config; make all

  • ARM926 Arduino Framework

1)Modify the ARM926 runtime memory address in the file

arduino_core_sunplus/variants/sp7021_evb/ldscript.ld

2) make && cp bin/rom ../../../../linux/rootfs/initramfs/disk/lib/firmware

3)make kernel rom

Remark:the defalut example is timer appliaction.

  • boot sp7021 evb & test

1)when the sp7021 boot to the rootfs ,you enter the follow command, the first command load the firmware to arm925, the second command boot the arm926.

echo rom > /sys/class/remoteproc/remoteproc0/firmware

echo start > /sys/class/remoteproc/remoteproc0/state