EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

IAR and programming to Flash...

Started by adrianunderwater February 20, 2007
Hello

I am currently using IAR worknench to design an application for the
lpc2138.

At one point in the near future I would like the output from IAR's
assembler to be programmed to the lpc2138 using the ISP fucntions
through the serial port. However I can't find where, in IAR, the
option to generate uuencode files...

Is it there? And if not does that mean I have to find/write a uuencode
file generator using another file format that comes out of IAR?

Thanks, Adrian

An Engineer's Guide to the LPC2100 Series

adrianunderwater wrote:
> Hello
>
> I am currently using IAR worknench to design an application for the
> lpc2138.
>
> At one point in the near future I would like the output from IAR's
> assembler to be programmed to the lpc2138 using the ISP fucntions
> through the serial port. However I can't find where, in IAR, the
> option to generate uuencode files...
>
> Is it there? And if not does that mean I have to find/write a uuencode
> file generator using another file format that comes out of IAR?
>

Without debug info for C-Spy:
Right Click project root, select options
Select Linker
Select Output tab
Format - Other
intel-extended w/ no variant.

With debug enabled:
Enable Allow C-SPY-specific extra output file
Select Extra output tab
Select Generate extra output file.
Rename extension to .hex
select intel-extended w/ no variant.

This tool is free and has a few more features than the NXP generated
utility:
http://www.flashmagictool.com
Joel
--- In l..., Joel Winarske wrote:
> adrianunderwater wrote:
> > However I can't find where, in IAR, the
> > option to generate uuencode files...
> >
> > Is it there? And if not does that mean I have to find/write a uuencode
> > file generator using another file format that comes out of IAR?
> >
>
> Without debug info for C-Spy:
> Right Click project root, select options
> Select Linker
> Select Output tab
> Format - Other
> intel-extended w/ no variant.
>
> With debug enabled:
> Enable Allow C-SPY-specific extra output file
> Select Extra output tab
> Select Generate extra output file.
> Rename extension to .hex
> select intel-extended w/ no variant.
>

Hi Joel,

Selecting "intel-extended w/ no variant" options generates uu-encoded
output? I ask because AFAIK uu-encoded format is not an Intel extension.

Regards,

Jaya
--- In l..., "jayasooriah" wrote:
>
> --- In l..., Joel Winarske wrote:
> > adrianunderwater wrote:
> > > However I can't find where, in IAR, the
> > > option to generate uuencode files...
> > >
> > > Is it there? And if not does that mean I have to find/write a
uuencode
> > > file generator using another file format that comes out of IAR?
> > >
> >
> > Without debug info for C-Spy:
> > Right Click project root, select options
> > Select Linker
> > Select Output tab
> > Format - Other
> > intel-extended w/ no variant.
> >
> > With debug enabled:
> > Enable Allow C-SPY-specific extra output file
> > Select Extra output tab
> > Select Generate extra output file.
> > Rename extension to .hex
> > select intel-extended w/ no variant.
> > Hi Joel,
>
> Selecting "intel-extended w/ no variant" options generates uu-
encoded
> output? I ask because AFAIK uu-encoded format is not an Intel
extension.
>
> Regards,
>
> Jaya
>

Jaya,

You know perfectly well what's being suggested here, and your comment
is not in the least bit helpful to anyone (so why make it?).

To the OP: although the download format is uuencoded the tools that
run on the host end of the connection typically take one or more
standard binary executable file formats as their input, typically
intel hex or S-record. They then convert formats (internally) to do
the download.

To answer your original question: if you want to write your own
download tool, yes you do have to uu-encode the data. However, if you
use one of the existing tools you just have to select the appropriate
format in the tool set you are using (see example above) to ensure it
will work.

Brendan.
Hi Jaya,
> Selecting "intel-extended w/ no variant" options generates uu-encoded
> output? I ask because AFAIK uu-encoded format is not an Intel extension.
>

No it does not. I read the thread title and my myopic engineering brain
took over.

What is the point of generating a uu-encoded file? What ISP tool takes
a uu-encoded file and what is the benefit of this?

If one really needs a uu-encoded file why not post process the file that
IAR generates?
Uu-encoding source code is plentiful via Googling.

If the intent is to "scramble" a bin file, it is very easy to visually
identify a uu-ecoded file.
Joel
Hi Joel,

I am not sure what you are asking.... The point of generating an uu
encoded file, is becasue that is what the LPC2138 ISP requires... And
after exploring the IAR workbench options I couldn't seem to generate
one... Having said that I did generate one but, the Philips flash
programmer rejected it because the file extension wasn't .hex...

What I didn't know, was which of the output formats was the uu encoded
one, and that the file needed to be renamed with a .hex extension.

So many thanks for your first answer that answered perfectly my query...

Adrian

--- In l..., Joel Winarske wrote:
>
> Hi Jaya,
> > Selecting "intel-extended w/ no variant" options generates uu-encoded
> > output? I ask because AFAIK uu-encoded format is not an Intel
extension.
> >
>
> No it does not. I read the thread title and my myopic engineering
brain
> took over.
>
> What is the point of generating a uu-encoded file? What ISP tool takes
> a uu-encoded file and what is the benefit of this?
>
> If one really needs a uu-encoded file why not post process the file
that
> IAR generates?
> Uu-encoding source code is plentiful via Googling.
>
> If the intent is to "scramble" a bin file, it is very easy to visually
> identify a uu-ecoded file.
> Joel
>
> So many thanks for your first answer that answered perfectly my query...
>
You're welcome.

Cheers
At 12:45 AM 2/21/2007 +0000, adrianunderwater wrote:
>I am not sure what you are asking.... The point of generating an uu
>encoded file, is becasue that is what the LPC2138 ISP requires...

No it doesn't. The download protocol uses uuencoding to encode the data
lines. Dumping a uuencoded file down the serial port would be a dismal
failure. All the serial download programs take an intel hex format file as
input.

Robert

Another sign of the end of civilization, our technical magazines are
getting chatty
From an EETimes product descriptions 2006/08/09
".... systems that can sample gobs of inputs simultaneously"
Now just what is the technical definition for gobs again?
http://www.aeolusdevelopment.com/
--- In l..., Joel Winarske wrote:
>
> Hi Jaya,
> > Selecting "intel-extended w/ no variant" options generates uu-encoded
> > output? I ask because AFAIK uu-encoded format is not an Intel
extension.
> >
>
> No it does not. I read the thread title and my myopic engineering
brain
> took over.
>
> What is the point of generating a uu-encoded file? What ISP tool takes
> a uu-encoded file and what is the benefit of this?
>
> If one really needs a uu-encoded file why not post process the file
that
> IAR generates?
> Uu-encoding source code is plentiful via Googling.
>
> If the intent is to "scramble" a bin file, it is very easy to visually
> identify a uu-ecoded file.
> Joel

Hi Joel,

Thanks for the clarification.

I am frequently asked how to generate for LPC variant of uu-encoded
format with checksums to handle ISP anamolies.

Generic uu-encode tools do not do this and thought you found a way.
Thats all. No other motives :)
Regards,

Jaya

The 2024 Embedded Online Conference