EmbeddedRelated.com
Forums

lpc2148, newlib-lpc, math functions...

Started by tahoe_nanci February 23, 2009
On Wed, 25 Feb 2009, tahoe_nanci wrote:

> I can't figure it out.
...
> Not much help in this group,

I only hope you're giving up for expediency's sake, and not 'cause it's
"too hard". I'm lucky enough now to have an intelligent, standalone JTAG
to debug devices, but there's been times where I didn't have even printf()
available (no serial port), just a single available LED connected to a GPIO
pin, and I was able to debug (slowly!) by having a routine that flipped that
LED on, and I'd move that call lower and lower in the program 'till it
stopped coming on and I could tell where the fault was.

All we were asking was to put a method in where if one of your trap
vectors were called (as it appears to be happening) to let you know
and you could at least get an idea of what's happening.

We can't debug from all the way on the other side of the planet w/o
more information, ya know ....

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181

An Engineer's Guide to the LPC2100 Series

> We can't debug from all the way on the other side of the planet w/o
> more information, ya know ....

I thought I was providing all my info, code, project, toolchain info,
etc. I have a feeling the error is obvious, but I've stared at it so
long I can't see it.

On Wed, 25 Feb 2009, tahoe_nanci wrote:

> I thought I was providing all my info, code, project, toolchain info,
> etc. I have a feeling the error is obvious, but I've stared at it so
> long I can't see it.

I understand, but once I had a the "right" toolchain spit out an instruction
my chip couldn't handle and I was halted in the UNDEF vector; it could be
something as simple as that (or something entirely different).
-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
tahoe_nanci wrote:
>> We can't debug from all the way on the other side of the planet w/o
>> more information, ya know ....
>
> I thought I was providing all my info, code, project, toolchain info,
> etc. I have a feeling the error is obvious, but I've stared at it so
> long I can't see it.

When you replaced _sbrk_r what did you do to ensure it was compatible
with the one you replaced?

Out of curiosity why did you replace it?

Robert

--
http://www.aeolusdevelopment.com/

From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time? 37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live....
we currently have stock."
To finalize this thread...

I could not get a newlib-lpc built on my mac with the variety of
toolchains that I installed from binary and source. I took the
newlib-lpc stuff and created a syscalls.c in my project dir so I could
those calls compiled and available (the availability wasn't happening
anyways). I couldn't get gdb to work with the mac toolchains either
so I could never see where issues were creeping.

Well, the crossworks on windows and winarm on windows is working great
for me now. I can even compile lpc2148_demo (jcwren) on my systems
and happily create new tasks, etc. I can even do floating point math
and call the math functions from math.h.

I think I realized one of my problems with the floating point code is
that failure on my part to allocate appropriate heap properly or at
all. In my going through the documentation and examples, my feeling
was the heap was readily available for me to use under the unused
stack areas. NOT.

Outside of my technical problems and feedback/lack thereof on my
posts, I would like to make the following commentary. I code for a
living, approaching 25 years - windows, linux, mac, avr. I decided to
play with arm. It should have been slamdunk to get a dev environment
going. I have no desire to be QA for open source projects/toolchains.
I want a system to be functional and I'll go at it. If its open
source great, if I need to pay for it I will. I've never had issues
with my gnu toolchain for all other development. So, in this time,
I've used the net quite often when I run into the little problems that
creep up in my world. And as I've seen in other dev forums, there are
those in the know who use that position of having that knowledge to
create a superiority complex. And not that anyone responded in kind
to my posts, but it is scattered throughout this forum and caused me
to be hesitant to seek help here in the first place. RTFM, go through
tutorials, I'm not doing your work, etc. When there is a fundamental
technical issue such as all the toolchains building different sized
binaries on the same source code and then behaving differently when in
operation, that is an issue that someone is seeking to resolve. It
ain't homework. And my belief is that others on these types of forums
have experienced similar difficulties, and its those experiences that
I seek to learn from, and I think others the same. I did all the
standard stuff people do when having problems, post code. I don't
think anyone looked at what I posted because I was probably thrown in
the student/n00b category.

Ultimately, my problems aren't resolved. I can't develop arm code on
my mac. But I have a workable environment and I dont have to waste
hours upon hours of time on toolchain builds.

cheers

--- In l..., Robert Adsett wrote:
>
> tahoe_nanci wrote:
> >> We can't debug from all the way on the other side of the planet w/o
> >> more information, ya know ....
> >
> > I thought I was providing all my info, code, project, toolchain info,
> > etc. I have a feeling the error is obvious, but I've stared at it so
> > long I can't see it.
>
> When you replaced _sbrk_r what did you do to ensure it was compatible
> with the one you replaced?
>
> Out of curiosity why did you replace it?
>
> Robert
>
> --
> http://www.aeolusdevelopment.com/
>
> From the Divided by a Common Language File (Edited to protect the
guilty)
> ME - "I'd like to get Price and delivery for connector Part # XXXXX"
> Dist./Rep - "$X.XX Lead time 37 days"
> ME - "Anything we can do about lead time? 37 days seems a bit high."
> Dist./Rep - "that is the lead time given because our stock is live....
> we currently have stock."
>