11- after reading the IMMO file (EEPROM or Flash) use one of our IMMO OFF software to turn IMMO OFF on the IMMO bin file, then save the immo off file and write it back to the EEPROM by your serial programmer or to the ECU with the flashing tool as mentioned above. Dfu-util -d 1d50:607f -a 0 -s 0x080 -U eeprom.bin Edited, the eeprom.bin file with a hex editor, and am now just trying to write it back: dfu-util -v -d 1d50:607f -a 0 -s 0x08004000 -D eeprom.bin And getting: 'Error: Last page at 0x080043ff is not writeable'. Eeprom Bin File Editor. Windows Me Pl Torrent Iso Converter. BSI, PSA, UCH, IMMO Box, CID dump file, EWS Editor. The s19 file extension is related to Motorola EEPROM programming language. AVR Libc Reference Manual A simple project. If we specify the EEPROM segment, we can generate a.hex file that can be used to program the EEPROM.
NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
This article describes how TwinCAT software running on a PC can be used to control AM335x based EtherCAT slave controller, and monitor inputs from it. TwinCAT is a software system from BeckHoff which turns almost any compatible PC into a real-time controller with a multi-PLC system. TwinCAT can be used to control the digital ouputs and monitor the digital inputs on AM335x over EtherCAT. There are eight digital LED's on AM335x IDK/ICE which represents eight digital outputs; there are eight pairs of jumper pins respresenting eight digital inputs.
1. Install TwinCAT (One month evaluation is available for free download from Beckhoff website www.beckhoff.de/tcatweb/twincat_download_e.aspx - select PLC mode of installation and check IO drivers box. TwinCAT works best on 32 bit Windows XP/Vista machines.
2. Copy sdkprotcolsethercatecat_applesiTI_ESC.xml and sdkexamplesethercatesiTiEtherCATLib.xml to <Drive>:TwinCATIoEtherCAT folder
3. Start TwinCAT system manager
4. Goto Options > Show Real Time Ethernet Compatible Devices and Install TwinCAT RT Ethernet intermediate driver. For best performance - it is recommended to use compatible NIC card listed here, infosys.beckhoff.com/index.php. If the network interface is listed as incompatible device, you can still proceed by installing the driver, enabling it and use TwinCAT.
5. Goto I/O - Configuration > I/O Devices - right click and select Append device and then select EtherCAT > EtherCAT. Device1 (EtherCAT) will be added to I/O devices
6. Connect CAT5 Ethernet cable from TwinCAT PC to ECAT IN/Port0(J8 of IDK, J2 of ICE) . If you have multiple ICE/IDKs in chain, please connect from ECAT OUT/Port1 (J9 of IDK, J3 of ICE) to Port0 of next ICE/IDK.
7. Now right click Device1(EtherCAT)> select Scan Boxes.
8. Or to scan a device right click on 'I/O Devices' and Select 'Scan Devices'. A dialog box will appear for 'Scan for boxes'. Select Yes.
9. TI Boxn(ti-esc) (full application) or Box n(TIESC-00m) (demo application) will be detected automatically.
10. Now select Device1 (EtherCAT) and goto Actions > Select Set/Reset TwinCAT to Config Mode or use shortcut SHIFT-F4
11. A dialog will pop asking Load I/O Devices, select Yes
12. Next dialog asks confirmation to Activate Free Run - select Yes. This will put the Slave into OP mode
1. Now user can control digital out leds using TwinCAT. Select TI Boxn(ti-esc)>DO Outputs > LED1-8 to control the output LEDs .
2. To turn an LED on/off right click on the LED, select 'Online Write' and enter the value 1/0.
1. Now user can control digital out leds using TwinCAT. Select Boxn(TI-ESC)>RxPDO >32Bit Output to control the output LEDs .
2. To turn an LED on/off right click on the 32Bit Output, select 'Online Write' and enter the value 1/2/4 etc to turn on the first second or third LED. A value of 0xFF would turn all LEDs on and 0x0 would turn all of them off.
1. There are jumper pins marked J9 (ICE) and J15 (IDK) on the AM335x board next to the digital output LEDs. The last 8 of them (adjacent to resistors) can be used to supply Digital Inputs.
2. If you are running the Demo application, go to Box (TIESC-001) > TXPDO > 32Bit Input. If you are running the Full application, go to TI Box (ti-esc) > DI Inputs > Switch n. Open the Online Tab.
3. In the Demo version, placing jumpers across the Digital Input pins sets bits in the LSB of the Value. Placing a jumper across the first pair of pins will set the least significant bit (bit 0), placing a jumper across the second pair of pins will set bit 1, and so on. In the full version, placing a jumper across the first pair of pins will set Switch 1, placing a jumper across the second pair of pins will set Switch 2, and so on. The value can be read by choosing the appropriate switch, and opening the online tab.4. The following reading will be obtained with jumper placed across the sixth pair of pins.
TI PRU-ICSS EtherCAT Slave running on supported platforms can be upgraded online using FoE.
To use this feature from TwinCAT, EtherCAT Slave Information (ESI) file needs to be updated to have the FoE feature enabled.
Steps to modify the ESI file are as follows:
- Go to ${TWINCAT_INSTALL_FOLDER}3.1ConfigIoEtherCAT
- Open ESI file (TI_ESC.xml or TiEtherCATLib.xml) with an editor and search for ‘CoE’.
- Add a new tag <FoE /> after to CoE tag as given below.
<Mailbox DataLinkLayer='true'>
<CoE SdoInfo='true' SegmentedSdo='true' CompleteAccess='true' />
<FoE />
Eeprom Bin File Editor Download
</Mailbox>- Save the file.
- Restart TwinCAT
Note: In order to have the option to upgrade TI EtherCAT slave application via FoE you need to run full-fledged EtherCAT slave.
The following section describes the procedure to upgrade TI EtherCAT slave application during runtime.
- Configure TwinCAT as mentioned in previous sections.
- Click on TI Box, Select 'Online' tab.
- Click 'Bootstrap' (Label 1 on picture) button. ( This will take the Slave to BOOT state).
- Once the state has changed to 'BOOT', Click 'Downoad' button ( Label 2 on picture).
- Rename your EtherCAT application binary (.bin) as ECATFW__, and use this file as your new EtherCAT application firmware.
- Locate the new firmware to be dowloaded click 'Open'.
- Click OK on the new dialog shown.
- This will downlload the new firmware. The progress bar will show the status of download.
- Once the download has finished, change the state back to 'Init' by clicking 'Init' button. This will cause a reload of the application.
The following steps explain how to convert the ESC configuration file into an EEPROM binary file. This binary file can later be used for generating equivalent header file to be used to build the EtherCAT Application.
1. Configure TwinCAT as mentioned in previous sections.
2. Click on the TI Box. Select EtherCAT. Click on the tab 'Advanced Settings'.
3. Select ESC Access->E2PROM->Hex Editor. Select 'Write to File' and save the binary as a '.bin' file.
NOTE: Please make sure that upload button is not clicked any time before during this step - this will load the EEPROM data from TI ESC to TwinCAT memory.
Eeprom Bin File Editor Tool
Eeprom Bin File Editor Freeware
TwinCAT is a software product developed and supported by BeckHoff. For further product details and for support information on TwinCAT please visit http://www.beckhoff.com/english.asp?twincat/default.htm
{{
Please post only comments related to the article Configuring TwinCAT For AM335x here. | Keystone=
Please post only comments related to the article Configuring TwinCAT For AM335x here. | C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Configuring TwinCAT For AM335x here. | For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Configuring TwinCAT For AM335x here. }} |
Links | |||
|
Comments
- edited 2011-11-03 - 11:37:39When you say the drive 'failed', what happened exactly? If the drive itself isn't completely toast, you might be able to remove it from its housing, install it in a computer via its IDE or SATA interface, and use Knoppix to retrieve the files.
-Phil - edited 2011-11-03 - 11:59:34This is a recuring question.
The answer is 'you don't, your program is history'.
The good news is that it forces you to rewrite and therefor rethink the whole thing again and it will be better than it was before:) - edited 2011-11-03 - 12:00:31You didn't say what you have on the EEPROM. Assuming that you're talking about a Propeller's EEPROM and a Spin / PASM program, first thing you need to do is get it off the EEPROM into a file. You can use DongleBasic (from the OBEX) to do this if you have an SD card (or can connect an SD card) to your Propeller board. The COPY statement can copy the 32K EEPROM contents to a file (a *.eeprom file). You can put the SD card into a PC card reader to get it into the PC. There's a disassembler called GEAR that you can use to try to make sense of the program's binary dump. You'll have to learn a lot about the format of the binary program and it will take a lot of work to make sense of GEAR's output since it doesn't decompile into Spin, but disassembles the Spin compiler's output into a kind of assembly language that would then have to hand decompiled into meaningful Spin code.
- edited 2011-11-03 - 12:10:45I thought BST had something that would read the EEPROM and convert it to Spin code. You'd loose variable names etc.
At least that's what someone said when this topic came up before (IIRC).
Duane - edited 2011-11-03 - 12:14:32The message says I need to format the drive. I immediately took it to the guy who fixes my computer who told me he only a sees 10% success rate in retrieving data from portable hard drives. He's pretty good and I'll pay what he asks. I'm kicking myself because the program was finished, bug-free and I planned to build a robotic version from that code. I've been away since March and (violins begin) I'll have to retrace a lot of steps.
- edited 2011-11-03 - 12:30:57Mike, It's Spin. I'll check the obex. It's good to hear from you guys again. I've been involved with 2D animation which I thought would be over in a month. I have a dual passion.
- edited 2011-11-03 - 12:55:40Heater, If it's a recurring question then it's actually encouraging. I can recover from this. My goals will get pushed back and I will make the adjustment so it doesn't happen again.
- edited 2011-11-03 - 13:03:31Lardom
I have built and repaired literary hundreds of computer in my life time and I've only had one situation when I could not retrieve the data from a HDD. There are tricks you can use to get the data back.
If the message...
'need to format the drive. ' Seriously try mounting with Linux live disk
Try using a live Linux disk and mount the HDD in question then copy fiels.
Using Windows Install HDD in another computer and copy files off it.
Use software to recover Data even after a format has taken place.
If HDD is faulty
replace circuit board from another HDD that is the same model as yours.
I have even went as far as freezing the HDD.
Moral of the story is to not panic, think smartly and get that data. - edited 2011-11-03 - 13:14:24Although I made some suggestions, I don't want to encourage you too much. It is extraordinarily difficult to recover high level language source from compiled binary code. There are tools that sometimes can do this for PCs. There are disassemblers for a variety of microcontrollers, but don't fool yourself. The result requires a tremendous amount of hand tweaking and a lot of information in the variable names, labels, and comments is gone forever. Go ahead and experiment, but don't expect much. You'll learn about the process and about the format of the binary program and Spin's interpretive code, but that may be all and it will absorb a lot of time. Heater's advice is good. The next rewrite is often better than the version you lost.
Regarding Duane's comment ... I believe BST used GEAR as a model for its disassembler. Neither converts the binary to Spin source. They depend on being able to merge the original source file with the Spin disassembler output. - edited 2011-11-03 - 13:36:46There seems to be two questions here now:
1) How do I recreate my Spin/PASM program from the EEPROM binary image?
2) How do I recover my Spin/PASM source from my dead hard drive.
For 1) I would say it is unlikely. The compilation process throws away a lot of information.
For 2) Well, you may be lucky. I have never have been. - edited 2011-11-03 - 13:57:09If you can get the EEPROM image you could run it under SpinSim and print out a Spasm (Spin assembly) listing of the executed instructions. With a bit of work I could generate a complete Spasm listing for you. The Spasm code could be converted into a Spin source file, but it wouldn't contain the symbolic names that you used. However, you could use a text editor to replace the generated symbols with the original variable names.
- edited 2011-11-03 - 14:16:21Mike, I'm not discouraged. To be honest, rewewing a dialogue with this forum gives me a big lift. Perhaps my greatest accomplishment in life was creating two patentable machines because of the help I got through this forum while in my fifties. I'm still amazed. I really appreciate the replies which helped put things in perspective.
Dave Hein, could you tell me more? - edited 2011-11-03 - 14:46:55I looked through BST. I couldn't see anything that looked like it might decompile an EEPROM image. Sorry for the false lead. I am pretty sure I read that BST could do that in a forum thread.
I looks like Hippy thought decompiling a Spin program should be possible. I wonder if he made any progress?
He mentioned his interest in this thread. (From 'Similar Threads' at the bottom of this page.)
I wish you well in your efforts.
Duane - edited 2011-11-03 - 14:56:401. DO NOT LET WINDOWS DO ANYTHING TO THE DRIVE!
2. Get a PROFESSIONAL file recovery program that doesn't 'edit' the disk, onlly scans it and saves the contents onto another disk. (This means it won't do any damage. No tool included with Windows is safe... )
Personally, I prefer File Rescue Professional from http://www.essentialdatatools.com/
It's NOT a free program, and it's definitely NOT a quick one, but it is thorough. The free downloadable version is limited to rescuing about 500KB, I think, and should be enough to see if the license is worth buying.
copying in the license code will unlock all the functions.
(I've used it to rescue files from physically damaged drives, Memorysticks and CF-cards, in addition to recovering deleted or formatted files/partitions)
For those who speak other languages than is currently supported, it's possible to get a FREE license by translating the program to another language.(It's just editing a text file. )
Edit: fixed link. - edited 2011-11-03 - 16:31:47
With SpinSim you could run the binary from a program like thisand it would produce a listing that looks like this.Of cousre, what you would really need would be just a static disassembly instead of the disassembly from an execution of the program. I could probably write the static disassembler in an hour or so. The disassembler generates Spasm, which has a one-to-one correlation with instructions in Spin. A program could be written to convert Spasm into simple Spin instructions. I did something like that when I wrote a quine that generated its Spin source from its bytecodes. However, the quine program used a restricted set of bytecodes to keep things simple.Dave Hein, could you tell me more? - edited 2011-11-03 - 18:08:37http://www.driveservice.com/
The above guys have been around for ages and are really quite reliable. Having been in the tax preparation and bookkeeping business, there is always someone that gets hit with an IRS audit and finds that they need to recover data from bad CDS, bad BU tape, or a failed hard drive.
These guys will take on anything reasonable and give you an honest assessment before spending your money. - edited 2011-11-04 - 07:30:09I thought I read somewhere that Hippy reverse engineered Prop ROM? The notion that the Propeller was vulnerable because the source code is in an external eeprom and not burned in like the PIC is the major reason I haven't applied for a patent.
My name appears on the LCD upon reset which I thought would make the device harder to steal. Hmm...Any knowledgeable programmer could duplicate the actions of a PIC which doesn't use an eeprom.
So unless I create a device that makes finding the chemical composition of a substance as easy as the common 'stud sensor' finds wall density, I probably shouldn't worry someone stealing source code. - edited 2011-11-04 - 07:48:52FWIW, here at work I have copies of my work -- including past work -- in two locations each on two computers in my cube, and one location on the network drive, and in SourceSafe also on the network. If something goes wrong, I should be able to restore my work. I hope.
Remember, 'the chief purpose of computers is to irritate humans and annoy them forever!'
--Rich - edited 2011-11-04 - 07:59:55Yes, the Prop ROM routines were decoded and disassembled, but they were written in assembly, not Spin, and they're relatively small ... 500 instructions or so for the Spin interpreter for example. Their behavior was also very well documented at the time ... essentially all of the interpretive codes were known. The source code, whether for Spin or assembly, has never been put into the Propeller's EEPROM, just the highly compressed Spin bytecodes.
- edited 2011-11-04 - 22:12:311. DO NOT LET WINDOWS DO ANYTHING TO THE DRIVE!
2. Get a PROFESSIONAL file recovery program that doesn't 'edit' the disk, onlly scans it and saves the contents onto another disk. (This means it won't do any damage. No tool included with Windows is safe... )
Personally, I prefer File Rescue Professional from http://www.essentialdatatools.com/
It's NOT a free program, and it's definitely NOT a quick one, but it is thorough. The free downloadable version is limited to rescuing about 500KB, I think, and should be enough to see if the license is worth buying.
copying in the license code will unlock all the functions.
(I've used it to rescue files from physically damaged drives, Memorysticks and CF-cards, in addition to recovering deleted or formatted files/partitions)
For those who speak other languages than is currently supported, it's possible to get a FREE license by translating the program to another language.(It's just editing a text file. )
Edit: fixed link.
Yes to most all of the suggestions in this and preceding posts with the exception of ANYTHING that attempts to modify the drive. When the s#@@$ is in the fan, er HDD, the very first thing to do is go into forensics mode. ALTER NOTHING!!! As several have mentioned, boot into a live knoppix (CD/USB) session and then mount the damaged drive. I think it may do this read only mode, but make sure. Make sure also that you know what it was identified as and mounted as and then make a forensic copy using dd to a separate drive. There are other alternatives, but I have used and trust dd. Work only on the copy. Damage / alter the original and you are likely well done (toast ?) if you can not duplicate it bit for bit. You may need to tell it to ignore errors as well.
If you have a master copy to work from and all else has been tried, you could use a program called SpinRite to attempt recovery of the original disk. I have seen this one work miracles to the point of recovering a clients disk after having its PC barbequed in an office fire. I first found this program back around 1986. If you have an identical drive, you may also be able to swap the controller electronics board if that is the failure. Others have used professional services that actually move your platters into another identical drive and recover the data that way. $$$$
Not much to add to this thread, mainly just protect the original at all costs until there is nothing left to try save SpinRite or some others mentioned here. Treat your original as though it were evidence.
If doubt your have, lots of experts can you find.
Frank - edited 2011-11-05 - 01:54:48Frank. All good suggestions. I would just note
that you do not need to mount the drive in order to use dd to copy it. In fact it's better not to although I guess mounting read only would be OK.
This thread is making me very nervous. I have some backing up to do... - edited 2011-11-05 - 07:50:09Heater said,This thread is making me very nervous. I have some backing up to do...
I can console myself that this thread may benefit someone. I'm still waiting for a call from the repairman. I knew he was backed up and that he stays up late working on clients' computers. At the moment I still hold out hope that he can salvage what represents a couple year's work. If not, I have no choice but to start over much wiser. This is my 3rd time using him. The 1st disaster was a fried cap on the motherboard. The 2nd was that my anti virus software had hidden the boot sector partition and would not boot. He 'surgically' removed the AV software and replaced it with AVG.
(Admitting such extraordinary studipity makes me wince but hiding from it would have been worse.) - edited 2011-11-05 - 16:19:08Well, I just picked up a couple half TB drives, and made copies of basically everything, including some system images. Never a bad time for that.
- edited 2011-11-05 - 17:00:32Off site backup:
http://www.carbonite.com/en/
Saved my butt twice in two years. Well worth the price.Very happy with the service.
And it's automatic. Create a file...it's saved automatically. Change a file, bingo, it's saved. - edited 2011-11-05 - 18:23:00Frank. All good suggestions. I would just note
that you do not need to mount the drive in order to use dd to copy it. In fact it's better not to although I guess mounting read only would be OK.
This thread is making me very nervous. I have some backing up to do...
True on the mount, attempting that gives me an idea of how screwed up the drive is going to be. If it can mount, maybe some things can be salvaged immediately. If it can not mount, then I know I am in for a significantly harder time of it. And yeah, I need to do some backing up myself because even though in my world, nothing can go wrong, goe rong, gW@WEjl; jk';lkk l;a'sdf
Frank - edited 2011-11-05 - 18:36:42Well, I just picked up a couple half TB drives, and made copies of basically everything, including some system images. Never a bad time for that.
Used to be that death and taxes were the only certainty, now we must add 'hard drives all die' to the saying. Actually when it comes to system images, you really can not go wrong at all. I have a habit of backing up system images of certain devices just before releasing them to use after all the system, network, and DICOM configuration is complete. This can be a huge time saver in recovering critical systems. (A large medical OEM now does that to all of their systems at installation and after software changes) Not to mention money saver since downtime can cost thousands or more per day. Another advantage of doing a system image is that not only are all of your apps loaded, after a while you generally have some preferences set up among them, and to go back and set or relearn why you had a particular setting in place would be a PITA. Especially since you would probably end up rediscovering all the ones you forgot because they were taken for givens after a while. Very frustrating and time wasting.
Time to go to Fry's soon,
Frank
Comments are closed.