ELECINF344/381

Interactive web site of Télécom ParisTech's ELECINF344/ELECINF381 Robotics and Embedded Systems classes (a.k.a. ROSE, 2012 session).

Categories

OpenOCD + SmartFusion

This weekend me and Helen worked more on the OpenOCD’s patch to write in the SmartFusion eNVM flash. We finally got it working, now we can load and execute code in flash \o/. Helen is now making some adjustments and organizing the git tree so we can commit it to OpenOCD.

We used Actel’s eNVM driver to create a stub that OpenOCD places in RAM and uses to perform the writing. The stub is compiled, the elf is converted into a binary image which is converted to a char array that is included in the OpenOCD source. After that, we wrote a OpenOCD flash driver for SmartFusion. A OpenOCD flash driver demands certain functions to be implemented, but as we’re in quite a hurry, we minimally implemented only the ones we needed: probe and write. The probe function initializes information that OpenOCD  has on the flash bank. We saw in other drivers that it usually does more things, but we implemented only the basic to allow the write function to work.  The write function places the stub in RAM, then repeatedly places a part of the image in RAM  and runs the stub to write them to flash.

I’ll now move to creating the Libero project for our robot. Libero is the Actel’s development plataform for SmartFusion, and we need to use it to redirect the GPIOs to the FPGA pads. For now, it will generate a FPGA image that contains only this routing of GPIO to pads. Latter, as we work on the app libraries, we will insert the modules to control the motors, LCD, and other peripherals. Then we will use  it to generate the final FPGA image that we will load into the Tutobot.

Possibly related posts:

  1. Tutobot – Openocd, SPI Flash and Organization for tomorrow
  2. Tutobot – Development News
  3. Tutobot – Smartfusion Software
  4. DirectC compiled for SmartFusion
  5. RoseAce : FPGA

1 comment to OpenOCD + SmartFusion