User forums > Embedded development

CB and Arduino 1.6.x

<< < (3/13) > >>

AZ:

--- Quote from: yvesdm3000 on June 18, 2016, 06:14:37 pm ---Your compiler is saying that it can't link some functions, normally this is because some libraries are not specified or missing.

Yves

--- End quote ---

correct. I'm not at the stage where i can build the project yet.
Learning how to get all the o files together.

AZ:

--- Quote from: oBFusCATed on June 18, 2016, 07:02:06 pm ---You need to build the files inside the Arduino that contain the code that is not defined.
In my wizard (probably in the original, too) this is done by adding files that are named the same as the on being compiled and their content is #include <Blabla.cpp>. Make sure you use <> instead of "".

--- End quote ---

Can you please elaborate a bit on what did you mean by "You need to build the files inside the Arduino that contain the code that is not defined."?

Did you mean this:
b. arduino copies all the c/cpp files into single temp location. One of these files is "main.cpp" that has calls to the functions in the Blink.cpp
 c. then arduino calls g++ to compile each of these files separately and links them into one file
 

Also, are you saying that your wizard parses the file and adds all "includes" prior to compilation?

stahta01:
I got the linked to Wizard to work. https://github.com/obfuscated/cb_arduino_template


--- Code: ---#include <Arduino.h>

/*
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
*/

void setup()
{
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);     
}

void loop()
{
digitalWrite(13, HIGH);   // set the LED on
delay(1000);              // wait for a second
digitalWrite(13, LOW);    // set the LED off
delay(1000);              // wait for a second
}

--- End code ---

My Full build log is too large to put in code tags ( total message was over 20,000 characters).

No idea of what fixes I did in the past; this is NOT the first time I tried to use this wizard; will try to post what I think is needed later today.

Edit: Attached log.

Tim S.

stahta01:
I think I have the steps I used.

https://github.com/stahta01/cb_misc/blob/master/Notes/Arduino/CodeBlocks_Arduino_noSim_setup.txt

The steps in link above are in the Code Tags below; no idea where the idea for the steps came from; I did them in trial and error using info found on Internet.

--- Code: ---## Code::Blocks IDE should already be installed.
## But, the Code::Blocks IDE should NOT be running!

#  See if arduino wizard exists already.
ls  /usr/share/codeblocks/templates/wizard/arduino/

#  If not copy form the location it was downloaded.
cd ~ && pwd     # /home/stahta01
su              # Enter su mode
cp -p --recursive /home/stahta01/cb_arduino_template-master/ /usr/share/codeblocks/templates/wizard/arduino/
exit            # Exit su mode

# Start Code::Blocks IDE
# Check if the "Arduino Project" Wizard exists.

# If "Arduino Project" wizard missing, add the next line to the startup script.
RegisterWizard(wizProject,     _T("arduino"),      _T("Arduino Project"),       _T("Embedded Systems"));


## Run "Arduino Project" Wizard; I used "Arduino Uno" option to test.

# First error I get when building "Arduino Uno" Project.
fatal error: CDC.cpp: No such file or directory


mkdir -p ~/.codeblocks

cd ~/.codeblocks

ln -s ~/sketchbook sketches

pwd  # /home/stahta01/.codeblocks

su
ln -s /usr/share/arduino /home/stahta01/.codeblocks/arduino
exit  # su mode

--- End code ---

Tim S.

AZ:

--- Quote from: stahta01 on June 18, 2016, 09:15:48 pm ---I think I have the steps I used.

https://github.com/stahta01/cb_misc/blob/master/Notes/Arduino/CodeBlocks_Arduino_noSim_setup.txt

The steps in link above are in the Code Tags below; no idea where the idea for the steps came from; I did them in trial and error using info found on Internet.

--- Code: ---## Code::Blocks IDE should already be installed.
## But, the Code::Blocks IDE should NOT be running!

#  See if arduino wizard exists already.
ls  /usr/share/codeblocks/templates/wizard/arduino/

#  If not copy form the location it was downloaded.
cd ~ && pwd     # /home/stahta01
su              # Enter su mode
cp -p --recursive /home/stahta01/cb_arduino_template-master/ /usr/share/codeblocks/templates/wizard/arduino/
exit            # Exit su mode

# Start Code::Blocks IDE
# Check if the "Arduino Project" Wizard exists.

# If "Arduino Project" wizard missing, add the next line to the startup script.
RegisterWizard(wizProject,     _T("arduino"),      _T("Arduino Project"),       _T("Embedded Systems"));


## Run "Arduino Project" Wizard; I used "Arduino Uno" option to test.

# First error I get when building "Arduino Uno" Project.
fatal error: CDC.cpp: No such file or directory


mkdir -p ~/.codeblocks

cd ~/.codeblocks

ln -s ~/sketchbook sketches

pwd  # /home/stahta01/.codeblocks

su
ln -s /usr/share/arduino /home/stahta01/.codeblocks/arduino
exit  # su mode

--- End code ---

Tim S.

--- End quote ---

Tim, does this run on Arduino 1.5+ ? 
looks pretty cool.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version