Hi everyone,
I am currently working on a project which is going to have 3 EK-TMC123GLX Tiva C boards that communicate with an ARM Linux SBC (single board computer) through SSI (SPI actually). This Linux SBC is also going to be responsible for updating the Tivas' firmware, thus they must be able to run a boot loader in order to get updated.
I decided to call the ROM boot loader from the board's application and update them running the "sflash" program from the Linux SBC.
I first took a look to the sflash program, and realised that it uses the standard serial port interfaces in order to communicate to the boards. Therefore here goes my first question:
1) If I manage to map the Linux board's SPI interface to one of the ports of /dev/ , would I be able to communicate with the boards via SPI, specifying this port when y call sflash without modifying it, or should I change something in its source code? (the Tiva has of course ran ROM_UpdateSSI() ).
In order to start testing the firmware updating procedure, I decided to start doing it through the board's virtual serial port that the ICDI provides (updating through UART instead of SSI). I wrote a simple app that flashes the LEDs and calls ROM_UpdateSSI() afterwards.
I flashed this app at address 0x00 with LMFlasher from Windows, through the ICDI and afterwards (when this app is has already called the UART boot loader) I flash this app again, but this time through UART using the COM port that the ICDI enumerates. This way I can flash the app over and over again without any problems.
The LMFlasher config was: Baudrate: 115200; Transfer Size: 60; Auto Baud support: Disabled; Reset MCU after Program: enabled; Program Address: 0x0
2) When I try to do the same with sflash in Linux (which I compiled just issuing "make") the program gets stuck and doesn't update the firmware.
I issued: ./sflash bin/Program.bin -c /dev/ttyACM0 -b 115200 -s 60 -p 0x0 -d Or ./sflash bin/Program.bin -c /dev/ttyACM0 -b 115200 -s 60 -p 0x0 -r 0x0 -d
And I get:
Application : bin/Program.bin
Program Address: 0x0
COM Port: /dev/ttyACM0
Baud Rate: 115200
Erasing Flash:
And it gets stuck there, instead of transfer the program.
Have I compiled sflash wrong? Is there something that I missed? does sflash need some modifications in order to work properly? Should the sflash command be different from the ones stated above?
Thanks in advance to everyone.