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

Tutobot – Sysboot Configured!

Hello everybody,

Good news! We managed DirectC to program the Sysboot of SmartFusion and now it is working! xD. Now it goes automatically to fix a position in the memory at start-up where we can load the user program.

Tomorrow (actually today) we will complete the rest of the libraries, sensors and motors mainly.

Bye.

Helen Fornazier

Tutobot – Project News

Hello everybody,

Updates of the project:

  • SmartFusion A2F200 and OpenOCD

After preparing the patch to OpenOCD to support writing in the flash memory, we sent the patch. It was refused due the amount of code from Actel we used to generate the embedded bin program. We could provide a cleaner code, removing the unused things from Actel’s driver, but it is working and we don’t have much time, after Rose we can work more in the patch.

If you are still interested in this patch you can found it here. Or send us an email :) .

  • PCB

Our PCB has arrived! \o/    Seems that we are going to weld the components tomorrow :)

  • Libero (FPGA and project configuration)

The routing of FPGA is done, a map between MSS ans FPGA, which are the things that can be connected directly with a GPIO and which can not. So after we have our robot, we will be able to drive the peripherals which doesn’t need a complex FPGA support.

Necessary HDL modules will be done together with the peripheral’s drive.

  • FreeRTOS

We integrated FreeRTOS to our project. There is just some minor things we need to configure, as the code work in the Ram but doesn’t in Rom memory =/

  • SPI Flash Memory
SPI driver is done and tested for SmartFusion Evaluation Board, we will need to adjust some aspects of the drive to our SPI flash memory
  • DirectC

After the OpenoCD patch, we tested DirectC in flash it is working but it is not fully integrated with the project. Tomorrow we hope to have the FPGA programing environment working and tested with our Robot.

 

More updates tomorrow.

 

Tutobot’s Team

 

Helen Fornazier

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.

New planning defined for Tutobot

Hello all,

Today we did a presentation to show the status of the project and to show how the last part of the project will be done. We defined a more detailed planning for the Tutobot since now we have the architecture of the PCB closed, so we can think about how to program everything. Our deadlines are long since we don’t know the arrival of the first unit. The following table show the attributed responsibilities and deadlines for each task:

Task Deadline Responsible
eNVM using OpenOCD 17/04 Helen
Libero project (IOMUX) 18/04 Thalita
FPGA fabric programming 18/04 Gabriel
FTDI configuration 23/04 Thalita
App libraries – Motor/Encoder 26/04 Gabriel
App libraries – FreeRTOS/Zigbee 26/04 Helen
App libraries – Sensors 26/04 Thalita
App libraries – LCD/Buzzer 29/04 Gabriel
App : Tutogrid 03/05 Helen
App : Tutobrush 03/05 Thalita

The two last tasks, Tutogrid and Tutobrush, are the development of two applications that will show some of the potential of the Tutobot.

Tutogrid is an application that discover the path from one predefined point to another over a grided floor filled with obstacles. The reactions are to be shown by the LCD and the buzzer. This app will show the usage of the line and collision sensors.

Tutobrush is an application that, using a pencil attached under the Tutobot, will draw over a paper a predefined picture and draw it in the LCD on the fly. The picture will be streamed by the Zigbee. This app shows the precision of the encoder

Gabriel Teixeira

Tutobot – Development News

Hello everybody,

 

Saturday our PCB was completed, some screen shots :

 

 

Gabriel is working in the DirectC, a set of code to implement In-application programming (IAP) for the Cortex and FPGA. The main goal is to program the FPGA from an image.dat file generated by Libero IDE as we won’t be using a FlashPro chip and we are not sure if the FlashPro software can be used without it.

We also studied how to work with Libero, route pins of FPGA and generate an image.dat file. The program is not complicated and the Libero Project of Tutobot should be ready soon.

 

Now Thalita and I, we are working in a patch to OpenOCD to be able to write in the flash memory of SmartFusion by OpenOCD. The idea is loading a code in RAM which writes on the Flash as we didn’t find any documentation about driving the Flash memory directly through JTAG.

 

More updates tomorrow.

 

Tutobot’s team.

Helen Fornazier

Tutobot – MSS Programing and PCB

Hello everybody,

These two days we are a bit slow because the most part of the group has classes about human formation from 8:30 am to 6:30pm, so we are just working at night.

The bootstrap of programming the MSS (Microcontroller SubSystem, the non-FPGA part of SmartFusion) in Linux is done, now we are able to embed a bootloader and a OS, but unfortunately just in ram.

Programing in flash will be done latter as we need to find out how to program the SmartFusion FPGA part in Linux as we use the most part of our peripherals in FPGA. We will start this tomorrow.

For the PCB, Thalita is advancing in our model, placing the components and making the shape of our robot. Now she knows how to perform holes in the board for the wheels. Models of the motors and the wheels will be added soon in the Expedition Library to help making a good placement and avoid errors.

 

Tutobot’s Team.

Helen Fornazier

Tutobot – Schematic and Software

Hello,

Our PCB is 99% finished, the others 1% is about the decoupling capacitors. SmartFusion documentation recommends the use of capacitor of several different values to filter different frequencies with a small resistance for each frequency. It recommends using capacitors multiple of 10, for example eight capacitors of 0,01µF, four of  0,1µF, two of 1µF and one electrolytic capacitor, to maintain a certain capacitance and resistance in some frequencies.

However, we couldn’t find anything about how to calculate the numbers of capacitors to use in our PCB. In the Evaluation Kit, seems that they tried to use as many capacitors they could fit near the VCCs of the µC.

We worked in the software too, finally programming the SmartFusion in Linux is working. We played with the UART.

This week, Gabriel and me, we will be developing the software, Thalita will be responsible of the decoupling capacitors and routing as this can not be divided in several tasks, but of course we don’t forget that we are a team :)

 

Tutobot’s Team.

Helen Fornazier

Preparing for schematic

This last week we decided to drop the STM32 microcontroller for using a SmartFusion SoC. It is a mixed IC that contains a ARM CortexM3 core (called Microcontroller SubSystem – MSS), a FPGA and an analog bloc. This would allow students to practice not only microcontroller programming but also do logic exercises by programming the FPGA in some HDL.

Since this decision we all started to research about the SmartFusion, and from the moment we had already got some overall knowledge, each one is following an specific task. I’m working on the PCB schematics. I first listed all SmartFusion pins and descriptions. Now I’m trying to close the peripherals choice. I choose a motor driver IC, and then went to check the FTDI chip we had chosen. I found out it needs an external EEPROM attached, so I’m chosing one right now. I also discovered the FTDI chip resets in a USB to UART mode, and some sort of programming must be performed so it works in a different mode (JTAG for instance). The programming is performed via the USB port on the chip. FTDI provides some drivers and libraries. There is a Linux version of them, but it seems that Windows has a better support. That is an issue that will need further research when we try to program the FTDI.

Next thing is choosing an SPI Flash memory. It is a way to program the FPGA, and even if we don’t use it right now, as it is a cheap chip, we are going to put one. After that I think all ICs and major components are chosen.

After that I have to solve a little dilemma :  which peripherals connect with the MSS IO pins, which ones connect to FPGA IO pins. Maybe multiplex some of them so they can be controlled either directly by the FPGA or by the MSS, but having in mind that the MSS has a lot less IO pins than the FPGA. If we programmed the FPGA with some IO controller bus, I think we could use FPGA IO pins from the MSS. This bus would be a slave to the main MSS’s AHB bus. Well, when we decide that I’ll surely write another post. Any suggestions on this issue are welcome =).