EmbeddedRelated.com
Forums

IAR C compiler in-line assemble support

Started by bcbourdon June 27, 2003
microbit wrote:
>
> Hi John, Paul et al
>
> I thought it might be appropriate here and step in and put my "pearl of wisdon"

Was that Wisden? A famous Almanac (as opposed to the far more desirable
Almangac) Compiler? Or Wisdom, a sadly departed British Comic of the
50's and 60's. Notice by the use of the word Compiler I kept this
comment on topic.

>
> Now, I happily invested in EW430 based on my experience with IAR's AVR toolset.
> I had distinctively noticed that quite a few tests I did on AVR-C with IAR produced code that
> I simply COULD NOT beat in handwritten assembler. (I know you'll disagree here Al :-)

Would I disagree with anything?? ;@}



>
> After my last SUA I must say my dissapointment grew steadily, as my first SUA provided me with
> 2 upgrades :
> - The first upgrade introduced PIC (Position Independent code)
> - The second upgrade (V1.26A) introduced the stack mislignment bug, which I found to be "out
> of character" for IAR.
> In the interim my SUA expired, which meant I had to pay another 20% to, above all, have V1.25A's
> bug fixed.
> It is worthwile noting that IAR made an arrangement that made me a lot more happy again.
> After all, fair is fair, and IAR had at that time actually been responding to queries of mine within 24 hours.
> The following should be noted too :
> (i) At the time when I was pretty disgruntled with IAR, several individuals on ICC's AVR forum claimed that
> they were receiving more than satisfactory support from IAR.
> (ii) I have noticed a distinctive pattern where many people that have "bagged" IAR in the past years
> don't actually OWN a single $ of IAR product themselves, which I think is unfair too.
> It is after all a common syndrome of people to tend to bag things they can't afford.
> (iii) Not that there's anything wrong with being unable to purchase IAR product, but I find that these individuals
> should at the same time state that they ... actually don't own any (licensed) IAR SW.

The last company I was part of purchased the IAR AVR compiler prior to
me rocking up. The existing engineers preferred C. When I arrived the
project was a mess, most of it seemed compiler related, and support was
well below what I'd expect, to the point where I yanked most of the
existing design, leaving only one module using AVR, as it was already
built. We bought in ICC for that, and, despite not being a frequent user
of C compilers two late night calls (after installation) to Richard, one
email and within 8 hours I not only had the compiler running smoothly
but by the end of the day had the system operational. Not fully debugged
I hasten to add, but nothing glaring. This is why I am not a great fan
of IAR, I solved in days what had been dragging on for weeks. Small
companies bleed cash when this sort of thing happens.

Al

Beginning Microcontrollers with the MSP430

Ralph it seems that your program is running, but the comms code is not
operating. You will need to dive into a debug cycle. this basically
involves placing 'BREAKPOINTS' at various points in the code and
tracking the operational logic of the beast. But, you knew that, sorry!
I would start by checking the comms system. continuously send some dummy
data to the serial port, and monitor it. Once you've confirmed that
works make sure that you are reading the A/D signal correctly. use a
small voltage and a volume control to check this. If both of these work
then the fault lies in the transfer of the data to the comms manager.

On another issue though. I design biomonitoring systems, amongst other
things. Why use a 24 bit A/D converter on human tissue? There are too
many other factors involved that make 24 bit resolution a waste. The 12
bit A/D converter in the MSP430 is more than adequate. Secondly the
LTC2440 is a very slow converter IIRC. You will get more meaningful
information using a higher sampling rate and filtering the data. Finally
you must have a voltage differential across the tissue to obtain a
measurement. Unfortunately when you apply DC voltages like this to the
skin chemical reactions take place at the electrodes which skew any
readings you might gather. Often these are more influential than any
real changes going on. You must reverse the polarity of the electrodes
at a reasonable rate to prevent this.

Al
I don't buy protected software. Nor do I pirate. I pay for what I use.
I'm just very tight fisted, I won't even entertain functionally limited
evaluations. How can you evaluate a product if you can't create
something real world with it? To me protection schemes say "TRUST YOUR
LIVELIHOOD TO US, EVEN THOUGH WE DON'T TRUST YOU". Frankly why should I.
Software protection schemes are bad enough, but hardware dongles are
ridiculous. The simple fact is that just about anyone buying this sort
of product probably has the skills to crack any protection scheme
anyway, but why should they have to bother.

Al
Hi Al,

> > I thought it might be appropriate here and step in and put my "pearl of
> wisdon"

> Was that Wisden? A famous Almanac (as opposed to the far more desirable
> Almangac) Compiler? Or Wisdom, a sadly departed British Comic of the
> 50's and 60's. Notice by the use of the word Compiler I kept this
> comment on topic.

Heh :-)

I refer to your post of 25 June (hehehe) :

> ....of your mail, and skip the grabage.

Listen Mr "Grabage" :-)

It was WINSTON, as in Churchill, ok ?

With love and kisses XXX
Kris
Hi Kris. I have an excuse! 1.25 tonnes dropped on my back left me with
little or no coordination. Not much common sense either.

microbit wrote:
>
> Hi Al,
>
> > > I thought it might be appropriate here and step in and put my "pearl of
> > wisdon"
>
> > Was that Wisden? A famous Almanac (as opposed to the far more desirable
> > Almangac) Compiler? Or Wisdom, a sadly departed British Comic of the
> > 50's and 60's. Notice by the use of the word Compiler I kept this
> > comment on topic.
>
> Heh :-)
>
> I refer to your post of 25 June (hehehe) :
>
> > ....of your mail, and skip the grabage.
>
> Listen Mr "Grabage" :-)

When you're old like me you'll grab anything, hence GRAB AGE was
perfectly correct. I wanted to skip the GRAB AGE, and get right into
senility. ;@{

Al
microbit wrote:
>
> > Hi Kris. I have an excuse! 1.25 tonnes dropped on my back left me with
> > little or no coordination. Not much common sense either.
>
> I recall your spinal injury of late 2000. I was pretty sorry to hear about
> that.

Thanks.

> It's great though to see you approach it from a humorous point of view.

No point bleating over it, life goes on. I learnt long ago, when working
bomb disposal in Northern Island, that as long as you don't allow
yourself to suffer from sense of humour failure you can get you through
anything.

>
> My excuse ? none, apart from many dendrites not connecting my synapses
> properly anymore :-)

Damn those pesky Dendrites, no doubt we'll climb them one day, all we
need's a Sherpa.

Al
> Hi Kris. I have an excuse! 1.25 tonnes dropped on my back left me with
> little or no coordination. Not much common sense either.

I recall your spinal injury of late 2000. I was pretty sorry to hear about
that.
It's great though to see you approach it from a humorous point of view.

My excuse ? none, apart from many dendrites not connecting my synapses
properly anymore :-)

Kris.
On Sun, 29 Jun 2003 00:59:25 +0930, you wrote:

>I don't buy protected software.

Nor do I. And I recommend against them, almost always. But
it's not a complete single-issue for me. So there are times
when I do decide it's appropriate -- but only after some careful
discussions to make sure we fully apprehend the risks.

>Nor do I pirate. I pay for what I use.

Absolutely. And I especially encourage those vendors who don't
intentionally place me and my clients at risk. It just galls
me, personally, that anyone would defend that practice to a
paying client. They should instead bow their heads in shame and
beg forgiveness for their behavior -- not necessarily change
that behavior, but they darned well should act uppity about it.
It may be a necessary evil, from their point of view, but it's
certainly *not* something to be proud of.

Paying customers don't deserve to be treated that way. End of
story.

>I'm just very tight fisted, I won't even entertain functionally limited
>evaluations.

You know. Interesting you should say that. My evaluations of
two MSP430 C compilers, started last December, was the very
first time in years I'd even bothered to consider the idea of
trying something I knew had a 30 day limit on it. I don't even
let these things on my machines, as a rule. I don't trust the
mechanisms and I don't trust the motivations behind them.

But, in this case, with careful discussions with those whose
interests I'm serving, I decided to cautiously step into this
arena, once again. But for this project, this time. Like I
said, I'm not a single-issue guy. If there are good reasons,
I'll bite.

>How can you evaluate a product if you can't create
>something real world with it?

That's true in many ways, but I'm fine with taking a risk on a
product if the price is acceptable and the risks appear to be
low enough. For very high priced products, I think they should
simply have to realize that there must be a refund policy, with
some objectively measurable parameters they fail to meet in the
first project development cycle. But at a few hundred dollars?
I can tolerate a risk or two.

>To me protection schemes say "TRUST YOUR
>LIVELIHOOD TO US, EVEN THOUGH WE DON'T TRUST YOU".

It does say a little of that, indeed. More so, to those of us
who work out of our homes, as I have for more than 20 years. I
have FULL control over my environment. No one, no one, has
access to my files or software except me (and my wife.) This
isn't a case where there is some "bad employee" who can come in
the dark of night, after being fired or let go, and sneak away
with the software. And so, the fact that vendors aren't willing
to consider my situation in their business models *does* bother
me. And it makes me feel just a little bit uncomfortable with
those relationships, if I'm not in their mental equations.
Because, not being there means that someday they may change the
card deck once again, without thinking about me. And make my
situation untenable, as a result.

It's not something which gives me comfort.

But I can live with people not trusting me, I guess. What I
cannot tolerate is their putting my clients at risk for products
which may last 10 and 20 years and more. That has no excuse.
None. And I don't like it one bit.

An interesting side note. I was involved in writing a software
package for national sales. This product won reviews in
national publications as the best package of its kind for
several years in a row. We were looking to port it to the
Macintosh...

When I first got a chance to look at Apple's developer contract,
in about 1984, it basically said that Apple reserves the final
right to allow a product to be sold. Any software product which
used their operating environment had to meet with their
approval. If anyone tried to sell a product without their
approval, they'd sue them. And they wouldn't give their
approval *until* the product was fully complete and ready to be
shipped.

This was totally unacceptable to a small company. Large
companies could afford the legal talent to renegotiate this
one-sided contract *before* starting their projects. But small
companies could not. And this level of control was rediculous.

We never even bothered to port it, of course.

Protection schemes don't exactly do this kind of thing, but it
feels a little familiar, to me. It puts my projects at risk and
it does so, only because they want to protect themselves from
someone else. It's not even my fault!

Again, it's a behavior that is dirty. And vendors using it
should wear it like it was a bit of snot hanging from their
nose. They should beg our forgiveness at every turn.

There is nothing to be proud of, in it. Not when talking to a
customer, anyway.

>Frankly why should I.

Hehe. We are in concert, here.

>Software protection schemes are bad enough, but hardware dongles are
>ridiculous. The simple fact is that just about anyone buying this sort
>of product probably has the skills to crack any protection scheme
>anyway, but why should they have to bother.

I hate being *put* in a position of having to even consider
doing something like that.

Jon
Hi Kris

Just dropped you an email...
Yes I'm looking forward to v1.1, though I'm fairly satisfied with v1.0 as
well. I still have one issue with placing constants in the INFO memory, but
since I have this sorted out in IAR, I use the IAR compiler on this project,
and Crossworks on other.
I have received help from Paul on this issue, and it is not his fault that I
haven't been able to solve it - it is my lack of patience.
BTW I received the telephone bill for our one conversation, and it was USD
15.-, but it was worth every penny, I enjoyed talking to you.
B.Reg
Geir Atle
On Sun, 29 Jun 2003 00:24:37 +0930, onestone wrote:

><snip>
>We can't rely on ANY vendor being around in
>the future, common sense dictates that we retain the ability to maintain
>any old design that is currently active.

Yup! That's exactly the deal.

Jon