larsbrinkhoff / xForth

Experimental Forth cross compiler for tiny devices
GNU General Public License v3.0
61 stars 13 forks source link

Test the 8051 board #24

Open larsbrinkhoff opened 6 years ago

larsbrinkhoff commented 6 years ago

Maybe use this for flash programming?

https://github.com/Guntermann-Drunck/c2tool

larsbrinkhoff commented 6 years ago

Or this:
https://github.com/tridge/ec2

Newer version?
https://github.com/paragonRobotics/ec2-new
https://github.com/setarcos/ec2-newer

Newer version?
https://github.com/four0four/ec2
http://www.rpi.edu/dept/ecse/mps/LITECLinuxGuide2014.pdf

larsbrinkhoff commented 6 years ago

Or use SiLab's "Simplicity Studio".
https://www.silabs.com/products/development-tools/software/simplicity-studio

Or use their Windows command line tool in Wine.
https://www.silabs.com/documents/login/software/utildll.exe

larsbrinkhoff commented 6 years ago

There is a command line flash tool in Simplicity Studio. Secret revealed by SiLabs support:

If you have installed Simplicity Studio on the Linux machine then the 8051 command line tool for flashing images is also installed. The file will be in the [SIMPLICITY_STUDIO_INSTALLATION]/developer/adapter_packs/c8051. The name of the tool is flash8051 and typing flash8051 -? will give a usage summary.

larsbrinkhoff commented 6 years ago

My 8051 board is putting up resistance. I haven't been able to program it from Simplicity Studio, or the flash8051 command line tool.

The tools says

OSX firmware update in progress.Bootload Run Command failure: status:00, FWresponse:00.
Firmware execution error: status:00.
Incorrect Firmware version download!Communication could not be established with the specified adapter.
Please confirm the current adapter selection and cable connection.flash8051 [ERROR: Bootloader returned failure response.]

And I see this in the system log when I attach the board through USB:

hid-generic 0003:10C4:8253.0004: usb_submit_urb(ctrl) failed: -1
hid-generic 0003:10C4:8253.0004: timeout initializing reports
larsbrinkhoff commented 6 years ago

Link to SiLabs forum post:
http://community.silabs.com/t5/8-bit-MCU/Can-t-access-ToolStick-C8051F330/m-p/212690

mretallack commented 6 years ago

Hi,

I had the same issue and found that the following line to the GRUB_CMDLINE_LINUX_DEFAULT option fixed the issue:

usbhid.quirks=0x10c4:0x8253:0x20000000

This removed the usb_submit_urb(ctrl) failed: -1 issue and the Linux version of flash8051 now returns the correct reply.

larsbrinkhoff commented 6 years ago

Wow, thank you very much for this hint!