Author Topic: Err... Help please?....  (Read 4962 times)

Offline Code::Basher

  • Single posting newcomer
  • *
  • Posts: 3
Err... Help please?....
« on: April 22, 2008, 07:02:06 pm »
Hi...

Well, here we are...   Please bear with me, this is the ramblings of the megga confused and befuddled.... :?

I'm an experienced programmer, having used such things as various dialects of basic, pascal(Delphi) assembler and some C (The only formal training I ever had in the art, was C based, but.......)

As part of my justification for holding down the chair to the floor, I have to support some software products, one of which, the part I'm involved with is created and maintained with C, and C::B now (was Borland CPP)

As I'm also "coming back to C" after a  l o n g  period away in Delphi land, and having been sent C::B to install and use (instalation went "OK" by the way, at least AFIK)  And the sources from our benefactors compile OK, if somewhat slowly..

OK...

Working my way back into all this, I went and found my K&R book, and started working through the various parts..  As they say, it's all coming back now.

But..  Try as I might, I cant seem to get the debugger to, well, debug anything.   I can set a breakpoint (I think) at least I get a red spot OK, but build/run, it just run's with no break.   This being simple stand alone console app's for the moment.

At one point, I ended up with a message on shutting down C::B, that an active debug session will be closed.  Hmmm...  What active debug session?   I couldnt get anything debug wise to be active.

As I also have an interest in using single chip devices, (Pic's & AVR's etc) I also found that C::B had "detected" SDCC on here too, but it insists on using whateve else it has for AVR's, that for whatever reason don't seem to support just about any of the popular current bacth of AVR chips.  Well, it spits fethers at them shall we say...

"Here" is an XP laptop btw.  All up to date, with 1.5G of ram etc, and generaly stable, even at my hands! :lol:....

Using the project wizards also highlights some strange things...

Most of the "default" ones I have tried all load, compile and run just fine.  Nice job whoever did them.  But the wxWidgets one doesnt compile/run, at all.  (wxWidgets is installed, and built, again afik OK, but it's an alien environment to me, and I was told once it was compiled, I need not mess with it.)

The AVR project wizard is also confusing me, in particular, I can't find any way to specify the processor to use as the target, other than when specifying the initial project.  Now, there are times when one would have to move from one chip to another, often because we out grow the things, or they become dificult to find etc.

When I do try to compile even the basic framwork source the AVR wizard gives you, I get a message to the extent that an "illegal compiler" was used.  !!!!   AFIK, at that moment it was trying to use the default offering, I got no choice about that, the compiler selection item was fixed and greyed out.

I'm also seeing some file/folder paths in the "Open Existing Project" dialog, that don't physicaly exist on this system.   I sort of suspect that is not good :shock: as A reboot didnt' fix it either...


OK...

To all the experts out there...

Does this sound like a crap installation on my or my suppliers part, or just finger trouble on my part?

I saw mentioned somewhere the existance of a C::B "Manual"..  Guess what I was not given...   So, where do I get it from?  (I've tried looking on svn/sourceforge, but those sites are   s o o  s l o w  to respond, I gave up.

Anyway, all this relates to C::B Build Jan 10 2008, 17:13:42 - wx2.8.7 (Windows, unicode)

Comments, advice, bouquets, brickbats etc etc all greatfully accepted.

Cheers All.  Time to go home, and find some loopy juice...

C::Basher.

Offline orel

  • Multiple posting newcomer
  • *
  • Posts: 96
Re: Err... Help please?....
« Reply #1 on: April 22, 2008, 10:34:17 pm »
Maybe you could post your simple CB project with its files so one of us could look at it closer?

[EDIT] which compiler are you using to build the project ? [/EDIT]
« Last Edit: April 22, 2008, 10:36:08 pm by orel »
windows XP SP2
mingw gcc 3.4.5
svn Code::Blocks and M$ Visual Studio 2005 and .NET to eat!! SVNInside plugin :http://forums.codeblocks.org/index.php/topic,7063.0.html

Offline Code::Basher

  • Single posting newcomer
  • *
  • Posts: 3
Re: Err... Help please?....
« Reply #2 on: April 23, 2008, 03:00:48 pm »
Hi...

OK...

Easier to follow this...   In regard to the AVR trouble....


Launch C::B, then at the "Start Here" window, select "Create New Project".
Double click the "AVR project" icon top left.
Click "Next".

Fill in the form, with the project title ("Test" in this case") and select appropriate paths etc...
Click "Next".

In the next dialog where you select the compiler to use, there is only one option showing
"GNU AVR GCC Compiler" and it's "greyed out" too, so unable to select anything else that may exist.

Note:  During the install of C::B, it announced it had detected SDCC, as that indeed does exist on this PC here.

Otherwise, both "Debug" and "Release" options are left selected, as they were by default. 
Also the associated selections, showing the Bin and Obj paths etc...
Click "Next".

Select a processor (AVR5 for example)   At this time, this is the only time I can see a choice of processor to use for the target, it does not seem posible to change it after the project has been created..

Also, select whatever other options you want.  I have Symbol, Hex and Extended listing files selected.  Others left at the defaults.
Click "Finish"...

In the "Management" pane, select the "Projects" tab, then Find and double click on the main.c file under the Sources item, and this shows up in the edit field.

/*
 */

#include <avr/io.h>

int main(void)
{

    // Insert code

    while(1)
    ;

    return 0;
}


OK, so it doesnt do a lot!   But I'd have expected it to at least compile and produce something as an output file...

But this is what you get in the Build log, if you try a build...

"test - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.

It's the "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" bit that's confusing me!..

Why?...

Also, if the C::B install had detected SDCC, why does it not allow it to be selected?


C::Basher.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Err... Help please?....
« Reply #3 on: April 23, 2008, 08:52:49 pm »
I think you may have trouble getting answers because your posts fall through the common post screening scheme. :P


The algorithm most people use to read posts is approximately like this (pseudocode):

void ReadPost()
{
  if(title.Matches("help|help me|he{3-10}lp me{3-10}|plz"))
    return;

  if(contents.Matches("codeblocks") == false)
  {
    Flame();
    if(m_moderator)
      Lock();
    return;
  }

  if(text.lines > 30)
  {
  if(text.ExtractLines(0, 5).Parse() == false)
    return;
  }

  problem = text.Parse();

  if(FiguredAnswer(problem) == true)
  {
    Answer();
  }
  else if(problem.VeryInteresting())
  {
    Google();
    AskFriends();
    Answer();
  }
  else
  {
    WTF();
  }
}
« Last Edit: April 23, 2008, 08:55:44 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Err... Help please?....
« Reply #4 on: April 23, 2008, 09:06:06 pm »
that was fun  :lol:

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Err... Help please?....
« Reply #5 on: April 23, 2008, 11:43:43 pm »
@thomas:

HELP me please, what's the meaning of WTF() ?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Err... Help please?....
« Reply #6 on: April 24, 2008, 12:08:55 am »
what the fuc?

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Err... Help please?....
« Reply #7 on: April 24, 2008, 10:48:25 am »
 :D thank's, that's a simple one... :D

Offline Code::Basher

  • Single posting newcomer
  • *
  • Posts: 3
Re: Err... Help please?....
« Reply #8 on: April 25, 2008, 03:42:30 pm »
Not a lot of use asking for help here then?......

'basher.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Err... Help please?....
« Reply #9 on: April 25, 2008, 04:06:53 pm »
Hi !

I think Thomas is right.
You should make your problem description shorter.
Too long ones are skipped.

I have lots of books of specification at work  :)

Dje