Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - robots

556
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
can you tell me which is the liker script you use ?

I have mplab with C30 compiler, and when i try to load the hex with ds30loader, it tells me that it will overwrite bootloader.
I think this way the development cycle will be far shorter :)
557
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
right now we recieve message , process it, copy from the buffer to another and send the second buffer.
Do we need separate buffer for outgoing messages ?

There is also a mistake in the copying. You copy 3 bytes less than you should :)

Removing the "answer" buffer would save a lot of troubles.
558
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
BIT 4 is SRST
BIT 5 is TRST

I checked with the usbprog firmware (as i own one :) )
My BP was updated to v4 bootloader (sucessfully). I have made a cable that should work with my ARM starter kit.

Ill let you know in few hours, how it went.
560
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
I messed up: (lines 121, 148 and 205 of main.c)
Code: [Select]
j=(j/8)+1;
it should give the number of bytes used by bits, but returns +1 if (j % 8 == 0)

This should work better
Code: [Select]
j = (j >> 3) + (j & 0x07)?1:0;

Another thing is to route the TRST signal to the output port, i guess that  AUX could do it.
Code: [Select]
#define BIT5        0b01//jp2right(?)
could be
Code: [Select]
#define BIT5        AUX

And you can remove all of those BITx_1 stuff (it was in usbprog for backward compatibility)

Too bad we are missing one IO for the SRST. :-/

After these changes i should be able to test it on real hw !
561
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
Atmega32 and PIC different meaning of the direction registers !

My buspirate now blinks as the openocd says ;)

Edit: I have accidentally fried the pullup driver on the pgc pin :(( but i can still enter bootloader

I have found mistake in the main.c WRITE_AND_READ handler.

should be something like:
Code: [Select]
case WRITE_AND_READ:// buf[1]+buf[2] extra bytes?????
      i = ((uint8_t)buf[1]*256)+(uint8_t)buf[2];
      write_and_read(buf+3, i);        // skip 3 bytes on buf,  size from openocd is actually number of bits used in the buffer (max 61 * 8 = 488)
....
      CommandAnswer(i/8+1); // for future use :) bigger packets
    break;


also in main()
Code: [Select]
case WRITE_AND_READ:// buf[1]+buf[2] extra bytes?????
                                buf[1]=UART1RX();//get extra byte
                                buf[2]=UART1RX();//get extra byte
                                j=((uint8_t)buf[1]*256)+(uint8_t)buf[2]; //get data packet size
                                j=j/8+1;
                                for(i=0;i<j;i++){
                                        buf[2+i]=UART1RX();
                                }
                                break;
567
OpenOCD JTAG / Re: First port of OpenOCD firmware to Bus Pirate
You are wondering (in the source code), why do they use 320 byte long packets.

But usbprog jtag has one problem . They are using interrupt transfers on usb, and they send one packet every 1ms - resulting in 300-400 bytes/sec flashing speed. http://forum.embedded-projects.net/viewtopic.php?id=344

The FT232 that is on BP uses Bulk transfers, so the same problem "should not" occur here.

I would be more than happy to help with this project as I want something a bit better than just wiggler cable ;)