[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Using a custom ISP programming tool
From: |
Sterling Peet |
Subject: |
Re: [avr-chat] Using a custom ISP programming tool |
Date: |
Tue, 19 Aug 2014 14:04:36 -0400 |
Daniel,
A serial emulator is the first idea that I originally began to consider,
and may well be the initial solution.
I'm not sure if I don't quite understand some of your proxy suggestion, or
if I didn't quite provide enough information in my previous email.
The FPGA contains it's own network stack, and is not connected directly to
the computer that is attempting to load the firmware onto the ATmega328 (except
via TCP/IP). Since the FPGA already translates data I send it in a UDP packet
to the hardware bit toggling, I am currently mostly just concerned with packing
and unpacking the the UDP packets in such a way that avrdude can communicate
with the remote FPGA.
The FPGA could be described as having an ATmega328 connected to a normal
usb programmer on a computer with IP address 10.0.0.5, and a UDP to USB serial
bridge deamon listening on a particular port. I want to run avrdude on a
different computer with IP address 10.0.0.9 to program the ATmega328.
Since the AVR is usually programmed directly from the computer the
programmer is connected to, I didn't think there was already a provision for
using avrdude over a network connection.
It would be preferable to avoid running a separate deamon to bridge avrdude
to the network, but if that is likely to significantly increase the amount of
work then I can tolerate it. Should I try to pursue developing a new
programmer type for avrdude?
Thanks,
Sterling Peet
Embedded Developer
Gamma-Ray Camera Group
CTA Gamma-Ray Observatory Development
School of Physics & Center for Relativistic Astrophysics
Georgia Institute of Technology
837 State Street NW, Atlanta, GA 30332-0430
On Aug 19, 2014, at 11:50 AM, "Ing. Daniel Rozsnyó" <address@hidden> wrote:
> One of the simpler approaches would be to emulate some simple serial line
> programmer - with a proxy program, which presents itself on a socket (which
> will be used by avrdude) and translate the high level commands to your bit
> toggling in actual hardware.
>
> And later updates might move your software translation piece into the
> hardware side.
>
>
> Daniel
>
>
> On 08/19/2014 05:14 PM, Sterling Peet wrote:
>>
>> I think that I need to write/modify a programmer definition in avrdude
>> to write the firmware into an AVR project that I am working on. I would
>> like to avoid re-inventing the wheel where I can, and I am interested in
>> suggestions regarding where to start and how to approach this problem.
>>
>> I have inherited a project that contains virgin ATmega328 behind an
>> FPGA that needs to be programmed. I do not easily have direct access the to
>> pcb hardware. I do know how the FPGA is connected to the ATmega328, and the
>> FPGA has access to the SPI and Reset lines for the ATmega328. I also know
>> how to communicate with the FPGA over a UDP socket. Currently, the FPGA can
>> communicate with the ATmega328 using either SPI or UART, but the
>> communication between the computer and the FPGA uses 32-bit words.
>>
>> It is likely that I can convince the FPGA engineer to make small
>> firmware changes, if that makes programming the ATmega328 firmware
>> significantly easier. Unfortunately, I do not have the full control of the
>> hardware design that I am used to having, so my normal method of using a
>> standard AVRISP header and programmer tool is not an option.
>>
>> The FPGA engineer has provided me a script that toggles the reset line
>> and demonstrates FPGA interaction described in the firmware programming
>> section of the ATmega328 data sheet, so I believe I should be able to write
>> some relatively basic plumbing code to connect between avrdude and the FPGA
>> to program the ATmega328.
>>
>> How should I proceed? Are there any recommendations for this type of
>> setup?
>>
>> Thanks,
>>
>> Sterling Peet
>>
>> Embedded Developer
>> Gamma-Ray Camera Group
>> CTA Gamma-Ray Observatory Development
>> School of Physics & Center for Relativistic Astrophysics
>> Georgia Institute of Technology
>> 837 State Street NW, Atlanta, GA 30332-0430
>> _______________________________________________
>> AVR-chat mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/avr-chat
>>
>
> _______________________________________________
> AVR-chat mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/avr-chat