I can't upgrade firmware over ethernet

Technical questions regarding the XTC tools and programming with XMOS.
hellogood
New User
Posts: 2
Joined: Fri Apr 29, 2011 9:53 am

I can't upgrade firmware over ethernet

Post by hellogood »

Hi.
I am from Korea and my English is poor.
Please excuse my mistakes in English.

I need to upgrade xmos firmware over ethernet .
And I am testing FTP server included in LED Reference Software 10.4.1.

My system is as follows.

Target board: Own board based on XC-3
OS: Windows XP
XDE: version 11.2.0
LED Reference Software: version 10.4.1

I tested in the following order.

1. My Led driver is MBI5026 so I modified the source 'led.h' in LedRefDesign.10.4.1.
And built the project in XDE.
XDE is in default setting.

2. I wrote the firmware to my board using XDE Flash Programmer(xflash).

3. To reset the gamma tables, used following command in 'ledconfig.exe' command prompt.

g A 255.255 1.8

4. My board displayed 'XMOS' logo very well.

5. To test upgrading firmware over ethernet, I modified the LedRefDesign.10.4.1. source.

I modified the file 'ledbuffer.xc',

From:
//#define SINGLELINETEST
//#define SHADETESTX
//#define SHADETESTY
//#define GAMMATEST
#define LOGO

To:
#define SINGLELINETEST
//#define SHADETESTX
//#define SHADETESTY
//#define GAMMATEST
//#define LOGO

6. I built the project in XDE again.

7. To upgrade firmware over ethernet I typed the following command in the DOS prompt.

tftp -i 192.168.0.254 PUT ledrefdesign.xb firmware

And then 'Tftp' shows me the message "Transfer successful: 28248 bytes in 1 second, 28248 bytes/s"

8. To reset my board, I turned off my board, and turned on it.

Finally, I expected the board to display a single line in the LED panel.
But It displayed 'XMOS' logo still.
Maybe Upgrading is not completed.

Would you please give me some advice?


User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

Hi,

I am the matainer of the Led Tile Application over at https://github.com/xcore/sw_led_tile_controller and working to improve the code.
So I am really interested in any understanding or improvment of the code.

Are you using the downloaded code or the code from github?
Both are the same, but if you e.g. fork the project on github it is easier to integrate your improvements.

I have had a look into the code and in theory it should work (even though the code is very complex in the TFTP area).

Does your fimware work if you flash it to the device using the XDE (or letting it run as XCORE Application)?

In theory it looks like it should work even though there are some oddities in the code.
Is it possible for you to debug the firmware uload? I am curious what the content of the variable 'sector' in 'flashmanager.xc' in line 125 (refering to the github version of the code) is.

BTW: Is it possible for you to do the following:
a) I would be really interested in the schematics of the led driver - so if you can share them (or tell me where you found it) I would be really happy
b) If you made other changes to the code than selecting the initial pattern I would be really interested in integrating it in the current solution - so I think it would be a great idea to fork the project on github and share your changes there.

Thanks

Marcus
hellogood
New User
Posts: 2
Joined: Fri Apr 29, 2011 9:53 am

Post by hellogood »

Hi Marcus,

Thank you for your reply.

I am using the code form https://www.xmos.com/applications/refer ... controller

And my firmware works well after flashing it to my target board using the XDE.

I debugged my firmware and the content of the variable 'sector' in 'flashmanager.xc' is 1, 2, or 3 when I enter the 'tftp' command.

Now, there is one question.

When I import the archive file 'LED-Tile-Controller(10.4.1).zip' into XDE, two of the project is generated.
One is 'LedRefDesign_Bootloader.9.10.0' and the other is 'LedRefDesign.10.4.1'.
I built the only project 'LedRefDesign.10.4.1' and flashed it into my board. (didn't flash 'LedRefDesign_Bootloader.9.10.0' )
Is this the cause of my failure?

I am beginner of XMOS environment.
Please give me any advice.

Best Regards,
Jinseong.
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

Hi Jineseong,

from my point of view it looks all quite OK.
I do not know which bootloader is installed in the XC-3 kit as default (I think in theory there is a special boot loader for the XC-3 kit).
At least it seems that the firmware got written somewhere. The question is just if is read from there or if the dev kit simply boots from the 'default' firmware location'.

I currently do not have a test board here but will try to get one as fast as possible.

How fast d you need a solution for the TFTP update (I know in theory as soon as possible)?

Is it possible for you to
a) use the code from github and
b) it would be best if you can forge the repository on github - but that needs a good understnding of git to do so.

I think it is worth to either use or fork the github project that may be worth the effort since then you can be sure to get the latest software version and I can integrate any bugfix or similar you have made.

If there is enough time in your project I would be glad to help you to get the git version up & running.

In the mean time I try to understand a bit more of the TFTP/Bootloader issue.

If this is not fast enough for you you can perhaps get some support via th XMOS ticket system - but XMOS people are checking the threads here often enough that you may get help from inside XMOS as well.

Marcus